Subject: | Cannot handle errors with IO::Socket::SSL::errstr() |
code:
-----------------------------------------------
use IO::Socket::SSL;
my $sock = IO::Socket::SSL->new( PeerHost => 'pause.perl.org',
PeerPort => '443',
SSL_verify_mode => SSL_VERIFY_PEER,
);
warn $@;
warn IO::Socket::SSL::errstr();
-----------------------------------------------
Result:
-----------------------------------------------
IO::Socket::SSL: SSL connect attempt failed with unknown error error:14090086:SSL
routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed at ssl-bug.pl line 15.
IO::Socket::INET configuration failed error:00000000:lib(0):func(0):reason(0) at ssl-bug.pl line
16.
-----------------------------------------------
Problem:
I can't get a good error message with IO::Socket::SSL::errstr() when I got a certification error.