Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

IO::Socket::SSL - Timeout IO::Socket::INET configuration failed

by heyrobot (Initiate)
on Dec 24, 2002 at 08:24 UTC ( #222069=perlquestion: print w/ replies, xml ) Need Help??
heyrobot has asked for the wisdom of the Perl Monks concerning the following question:

I'm working on a client/server application where I'm needing an encrypted socket. I've tried using IO::Socket::SSL to do this, but keep coming up with $@ eq "IO::Socket::SSL: Timeout" and &IO::Socket::SSL::errstr() eq "IO::Socket::INET configuration failed" errors. The server does recognize that a connection is attempted and runs the necessary code to open the connection, but it fails immediately on the client-side. The client uses:
use IO::Socket::SSL; my $client = IO::Socket::SSL->new(PeerAddr => 'destination.server.com' +, PeerPort => 12345, Proto => 'tcp');
And the server uses:
use IO::Socket; use IO::Socket::SSL; use IO::Select; use constant PORT => 43968; my %client; my $socket = IO::Socket::SSL->new(LocalPort => PORT, Listen => SOMAXCO +NN, Proto => 'tcp', SSL_key_file => "./myserver.key", SSL_cert_file = +> "./myserver.cert", SSL_server => 1, Reuse => 1);
Anything obviously wrong with this? .. and are there any useful examples or documentation out there for IO::Socket::SSL? I've looked everywhere.. and everything I find is either contradictory to one another .. or it's just plain useless. Thank ya!

update (broquaint): title change (was IO::Socket::SSL)

Comment on IO::Socket::SSL - Timeout IO::Socket::INET configuration failed
Select or Download Code
Re: IO::Socket::SSL
by Jaap (Curate) on Dec 24, 2002 at 11:33 UTC
    Did any errors pop up while installing the SSL modules? Did you do the 'make test' parts?
      Nope, worked great.. and this happens on multiple machines.. not just the one.
Re: IO::Socket::SSL
by shotgunefx (Parson) on Dec 24, 2002 at 23:08 UTC
    I have a similar problem with using SSL with LWP. It only works for the local ssl server. I've never been able to figure out why it fails only on remote sites, but removing the Timeout paramerter in LWP::Protocol::https fixes it. (It succeeds immediatelly BTW).

    Couldn't tell you why. Everything else that is compiled with the current version of SSL works fine. (This bug has been going on for several versions.) But removing the timeout magically makes it succeed in negotiating. If it helps, the box I have the problem on is a sparc running linux. (Don't have the version handy)

    -Lee

    "To be civilized is to deny one's nature."
Re: IO::Socket::SSL - Timeout IO::Socket::INET configuration failed
by beernuts (Pilgrim) on Jan 16, 2003 at 23:11 UTC
    Dunno if this'll help or not, but if you use openssl on the server or client side like this:
    in place of your client code: openssl s_client -debug -connect servername:port
    or
    in place of your server code: openssl s_server -debug -accept port
    and make (or receive) a connection you should get a wealth of info that might help figure out the timing problem.


    -beernuts

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://222069]
Approved by fireartist
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (18)
As of 2014-10-30 18:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (208 votes), past polls