Subject: | Can't upgrade IO::Socket::INET object using start_SSL () |
I've been attempting to upgrade IO-Socket-SSL from v2.012 to v2.029. The latest release passes all it's test cases, but when I attempt to use it with Net::FTPSSL, the call to start_SSL() basically barfs and no longer works.
I'm basically trying to understand what changed in this area so that I can fix my code to take advantage of the latest release of IO-Socket-SSL going forward. This test case is not using certificates.
Perl: 5.10.1, OS: AIX, openssl: 0x1000105f (as shown in your Makefile.PL)
Net-SSLeay: 1.74
Code snippet:
my %socketArgs = ( PeerAddr => $host, PeerPort => $port, Proto => 'tcp', Timeout => $timeout );
my $socket = IO::Socket::INET->new ( %socketArgs );
--- Read the banner reply.
--- Send "AUTH TSL" over the socket
--- Read the successful reply.
my $obj = IO::Socket::SSL->start_SSL ( $socket, %ssl_args );
With IO::Socket::SSL qw (debug3) logging turned on gives the following output:
SKT >>> AUTH TLS
SKT <<< 234 SSLv23/TLSv1
DEBUG: .../IO/Socket/SSL.pm:2724: new ctx 542609864
DEBUG: .../IO/Socket/SSL.pm:1467: start handshake
DEBUG: .../IO/Socket/SSL.pm:659: ssl handshake not started
DEBUG: .../IO/Socket/SSL.pm:695: not using SNI because hostname is unknown
DEBUG: .../IO/Socket/SSL.pm:746: set socket to non-blocking to enforce timeout=120
DEBUG: .../IO/Socket/SSL.pm:759: call Net::SSLeay::connect
DEBUG: .../IO/Socket/SSL.pm:762: done Net::SSLeay::connect -> -1
DEBUG: .../IO/Socket/SSL.pm:772: ssl handshake in progress
DEBUG: .../IO/Socket/SSL.pm:782: waiting for fd to become ready: SSL wants a read first
DEBUG: .../IO/Socket/SSL.pm:802: socket ready, retrying connect
DEBUG: .../IO/Socket/SSL.pm:759: call Net::SSLeay::connect
DEBUG: .../IO/Socket/SSL.pm:762: done Net::SSLeay::connect -> -1
DEBUG: .../IO/Socket/SSL.pm:772: ssl handshake in progress
DEBUG: .../IO/Socket/SSL.pm:782: waiting for fd to become ready: SSL wants a read first
DEBUG: .../IO/Socket/SSL.pm:802: socket ready, retrying connect
DEBUG: .../IO/Socket/SSL.pm:759: call Net::SSLeay::connect
DEBUG: .../IO/Socket/SSL.pm:762: done Net::SSLeay::connect -> -1
DEBUG: .../IO/Socket/SSL.pm:772: ssl handshake in progress
DEBUG: .../IO/Socket/SSL.pm:782: waiting for fd to become ready: SSL wants a read first
DEBUG: .../IO/Socket/SSL.pm:802: socket ready, retrying connect
DEBUG: .../IO/Socket/SSL.pm:759: call Net::SSLeay::connect
DEBUG: .../IO/Socket/SSL.pm:762: done Net::SSLeay::connect -> -1
DEBUG: .../IO/Socket/SSL.pm:765: SSL connect attempt failed
DEBUG: .../IO/Socket/SSL.pm:765: local error: SSL connect attempt failed error:14082174:SSL routines:SSL3_CHECK_CERT_AND_ALGORITHM:dh key too small
DEBUG: .../IO/Socket/SSL.pm:768: fatal SSL error: SSL connect attempt failed error:14082174:SSL routines:SSL3_CHECK_CERT_AND_ALGORITHM:dh key too small
DEBUG: .../IO/Socket/SSL.pm:2756: free ctx 542609864 open=542609864
DEBUG: .../IO/Socket/SSL.pm:2768: OK free ctx 542609864
TLSv1: SSL connect attempt failed error:14082174:SSL routines:SSL3_CHECK_CERT_AND_ALGORITHM:dh key too small
at -e line 1