Subject: | SSL connect attempt failed with unknown error |
Date: | Tue, 12 Feb 2013 13:28:47 -0800 |
To: | bug-IO-Socket-SSL [...] rt.cpan.org |
From: | Alex Krohn <alex [...] gt.net> |
Hi,
This code with IO::Socket::SSL 1.83 and Net::SSLeay 1.52 fails:
use lib 'IO-Socket-SSL-1.83/blib/lib';
use IO::Socket::SSL qw/debug2/;
print "version: $IO::Socket::SSL::VERSION\n";
my $certclient = IO::Socket::SSL->new( PeerHost => "www.greencart.in:443") || die "failed";
with:
version: 1.83
DEBUG: .../IO/Socket/SSL.pm:247: set domain to 2
*******************************************************************
Using the default of SSL_verify_mode of SSL_VERIFY_NONE for client
is deprecated! Please set SSL_verify_mode to SSL_VERIFY_PEER
together with SSL_ca_file|SSL_ca_path for verification.
If you really don't want to verify the certificate and keep the
connection open to Man-In-The-Middle attacks please set
SSL_verify_mode explicitly to SSL_VERIFY_NONE in your application.
*******************************************************************
at test line 7
DEBUG: .../IO/Socket/SSL.pm:420: socket not yet connected
DEBUG: .../IO/Socket/SSL.pm:422: socket connected
DEBUG: .../IO/Socket/SSL.pm:440: ssl handshake not started
DEBUG: .../IO/Socket/SSL.pm:1395: SSL connect attempt failed with unknown error
DEBUG: .../IO/Socket/SSL.pm:510: fatal SSL error: SSL connect attempt failed with unknown error error:14077458:SSL routines:SSL23_GET_SERVER_HELLO:reason(1112)
failed at test line 7.
If I use IO::Socket::SSL 1.35 (what was previously installed), works
fine:
version: 1.35
DEBUG: .../IO/Socket/SSL.pm:191: set domain to 2
DEBUG: .../IO/Socket/SSL.pm:332: socket not yet connected
DEBUG: .../IO/Socket/SSL.pm:334: socket connected
DEBUG: .../IO/Socket/SSL.pm:347: ssl handshake not started
DEBUG: .../IO/Socket/SSL.pm:445: ssl handshake done
Most domains work, it's just this one in particular that causes a
problem.
I suspect what is weird about this domain is www.greencart.in common
name is 'greencart.in', but does supply alternative subject names of
'www.greencart.in'.
So I think something needs updating to work with alternative subject
names, but I'm not finding it. I suspect this might actually be a bug in
Net::SSLeay, but having trouble getting a small test case to reproduce
(as I think what is different between IO::Socket::SSL is the
initialization to Net::SSLeay).
Thanks for any help you can offer!
Cheers,
Alex