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:
my $client = IO::Socket::SSL->new(PeerAddr => 'destination.server.com'
+, PeerPort => 12345, Proto => 'tcp');
And the server uses:
use constant PORT => 43968;
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)