I don't know what you did and how your certificate looks like, but this is what I did and which works with the current version of IO::Socket::SSL.
# create a self-signed certificate perl -MIO::Socket::SSL::Utils -e ' my ($c,$k) = CERT_create(CA => 1, subject => { CN => q[foo.bar]}); print PEM_cert2string($c).PEM_key2string($k)' \ > self-signed.pem # start a server with this certificate (default port 4433) openssl s_server -cert self-signed.pem -key self-signed.pem & # connect to this server perl -Ilib -MIO::Socket::SSL=debug4 -e ' my $cl = IO::Socket::SSL->new( PeerAddr => q[127.0.0.1:4433], SSL_hostname => q[foo.bar], SSL_ca_file => q[self-signed.pem] ) or die "$SSL_ERROR,$!"; warn "SUCCESS cipher=".$cl->get_cipher();'
This gives me (among all the debug output) "SUCCESS cipher=ECDHE-RSA-AES128-SHA256" which means, that the SSL connection was successfully established. You might check with your certificate to make sure, that the problem is not the certificate itself.

In reply to Re: HTTPS connection with LWP and self-signed certificate by noxxi
in thread HTTPS connection with LWP and self-signed certificate by Anonymous Monk

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.