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)


In reply to IO::Socket::SSL - Timeout IO::Socket::INET configuration failed by heyrobot

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.