Skip Menu |

This queue is for tickets about the Net-HTTP CPAN distribution.

Report information
The Basics
Id: 29704
Status: resolved
Priority: 0/
Queue: Net-HTTP

People
Owner: Nobody in particular
Requestors: amefford [...] corp.untd.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: SSL module negotiation
Date: Mon, 1 Oct 2007 17:46:04 -0700
To: <bug-libwww-perl [...] rt.cpan.org>
From: "Mefford, Aaron" <amefford [...] corp.untd.com>
It appears there is a bug in your SSL module negotiation. While the documentation stats Crypt::SSLeay is preferred, IO::Socket::SSL will be used instead if loaded. I came across this after trying to determine why some P12 SSL transactions were failing. The cause was found to be having loaded IMAP::Client which loaded IO::Socket::SSL; Crypt::SSLeay uses env vars for P12 but IO::Socket::SSL doesn't seem to honor the same vars. This illustrates the problem: perl -e 'use Net::SSL;use Crypt::SSLeay; use IO::Socket::SSL; use Net::HTTPS; print $Net::HTTPS::SSL_SOCKET_CLASS,"\n";' It seems that the Net::SSL::VERSION is not being set until after using all the modules where IO::Socket::SSL::VERSION is being set. The difference I think is that IO::Socket::SSL::VERSION uses a BEGIN block to set the Version where Net::SSL does not. Now that I have found my issue there are many work-a-rounds, but this was quite difficult to track down so I thought I'd let you know. Aaron Mefford Software Developement Manager United Online Webservices Desk: 801.437.6055 AIM: aaronmefford
migrated queues: libwww-perl -> Net-HTTPS
On Mon Oct 01 20:46:50 2007, amefford@corp.untd.com wrote: Show quoted text
> It appears there is a bug in your SSL module negotiation. While the > documentation stats Crypt::SSLeay is preferred, IO::Socket::SSL will be > used instead if loaded. I came across this after trying to determine > why some P12 SSL transactions were failing. The cause was found to be > having loaded IMAP::Client which loaded IO::Socket::SSL; Crypt::SSLeay > uses env vars for P12 but IO::Socket::SSL doesn't seem to honor the same > vars. > > > > This illustrates the problem: > > perl -e 'use Net::SSL;use Crypt::SSLeay; use IO::Socket::SSL; use > Net::HTTPS; print $Net::HTTPS::SSL_SOCKET_CLASS,"\n";' > > > > It seems that the Net::SSL::VERSION is not being set until after using > all the modules where IO::Socket::SSL::VERSION is being set. The > difference I think is that IO::Socket::SSL::VERSION uses a BEGIN block > to set the Version where Net::SSL does not. > > > > Now that I have found my issue there are many work-a-rounds, but this > was quite difficult to track down so I thought I'd let you know. > > > > Aaron Mefford > > Software Developement Manager > > United Online Webservices > > Desk: 801.437.6055 > > AIM: aaronmefford > > >
Current status, running file attached. ##### $ perl cpan-29704.pl Perl version: v5.24.1 $Net::SSL::VERSION 2.86 $Crypt::SSLeay::VERSION 0.72 $IO::Socket::SSL::VERSION 2.043 $Net::HTTPS::VERSION 6.12 $Net::HTTPS::SSL_SOCKET_CLASS: IO::Socket::SSL ##### But if I comment out the lines referring to IO::Socket::SSL, I get: ##### $ perl cpan-29704-no-io-socket-ssl.pl Perl version: v5.24.1 $Net::SSL::VERSION 2.86 $Crypt::SSLeay::VERSION 0.72 $Net::HTTPS::VERSION 6.12 $Net::HTTPS::SSL_SOCKET_CLASS: Net::SSL ##### Hence, problem persists. Thank you very much. Jim Keenan
Subject: cpan-29704-no-io-socket-ssl.pl
# perl use strict; use warnings; use Net::SSL; use Crypt::SSLeay; #use IO::Socket::SSL; use Net::HTTPS; printf "%-40s%s\n" => 'Perl version:', $^V; printf "%-40s%s\n" => '$Net::SSL::VERSION', $Net::SSL::VERSION; printf "%-40s%s\n" => '$Crypt::SSLeay::VERSION', $Crypt::SSLeay::VERSION; #printf "%-40s%s\n" => '$IO::Socket::SSL::VERSION', $IO::Socket::SSL::VERSION; printf "%-40s%s\n" => '$Net::HTTPS::VERSION', $Net::HTTPS::VERSION; print "\n"; printf "%-40s%s\n" => '$Net::HTTPS::SSL_SOCKET_CLASS:', $Net::HTTPS::SSL_SOCKET_CLASS;
Subject: cpan-29704.pl
# perl use strict; use warnings; use Net::SSL; use Crypt::SSLeay; use IO::Socket::SSL; use Net::HTTPS; printf "%-40s%s\n" => 'Perl version:', $^V; printf "%-40s%s\n" => '$Net::SSL::VERSION', $Net::SSL::VERSION; printf "%-40s%s\n" => '$Crypt::SSLeay::VERSION', $Crypt::SSLeay::VERSION; printf "%-40s%s\n" => '$IO::Socket::SSL::VERSION', $IO::Socket::SSL::VERSION; printf "%-40s%s\n" => '$Net::HTTPS::VERSION', $Net::HTTPS::VERSION; print "\n"; printf "%-40s%s\n" => '$Net::HTTPS::SSL_SOCKET_CLASS:', $Net::HTTPS::SSL_SOCKET_CLASS;
On Tue Mar 28 16:01:04 2017, JKEENAN wrote: Show quoted text
> On Mon Oct 01 20:46:50 2007, amefford@corp.untd.com wrote:
> > It appears there is a bug in your SSL module negotiation. While the > > documentation stats Crypt::SSLeay is preferred, IO::Socket::SSL will be > > used instead if loaded. I came across this after trying to determine > > why some P12 SSL transactions were failing. The cause was found to be > > having loaded IMAP::Client which loaded IO::Socket::SSL; Crypt::SSLeay > > uses env vars for P12 but IO::Socket::SSL doesn't seem to honor the same > > vars. > > > > > > > > This illustrates the problem: > > > > perl -e 'use Net::SSL;use Crypt::SSLeay; use IO::Socket::SSL; use > > Net::HTTPS; print $Net::HTTPS::SSL_SOCKET_CLASS,"\n";' > > > > > > > > It seems that the Net::SSL::VERSION is not being set until after using > > all the modules where IO::Socket::SSL::VERSION is being set. The > > difference I think is that IO::Socket::SSL::VERSION uses a BEGIN block > > to set the Version where Net::SSL does not. > > > > > > > > Now that I have found my issue there are many work-a-rounds, but this > > was quite difficult to track down so I thought I'd let you know. > > > > > > > > Aaron Mefford > > > > Software Developement Manager > > > > United Online Webservices > > > > Desk: 801.437.6055 > > > > AIM: aaronmefford > > > > > >
> > Current status, running file attached. > ##### > $ perl cpan-29704.pl > Perl version: v5.24.1 > $Net::SSL::VERSION 2.86 > $Crypt::SSLeay::VERSION 0.72 > $IO::Socket::SSL::VERSION 2.043 > $Net::HTTPS::VERSION 6.12 > > $Net::HTTPS::SSL_SOCKET_CLASS: IO::Socket::SSL > ##### > > But if I comment out the lines referring to IO::Socket::SSL, I get: > > ##### > $ perl cpan-29704-no-io-socket-ssl.pl > Perl version: v5.24.1 > $Net::SSL::VERSION 2.86 > $Crypt::SSLeay::VERSION 0.72 > $Net::HTTPS::VERSION 6.12 > > $Net::HTTPS::SSL_SOCKET_CLASS: Net::SSL > ##### > > Hence, problem persists. > > Thank you very much. > Jim Keenan
First file attached was incorrect; correcting.
Subject: cpan-29704.pl
# perl use strict; use warnings; use Net::SSL; use Crypt::SSLeay; use IO::Socket::SSL; use Net::HTTPS; printf "%-40s%s\n" => 'Perl version:', $^V; printf "%-40s%s\n" => '$Net::SSL::VERSION', $Net::SSL::VERSION; printf "%-40s%s\n" => '$Crypt::SSLeay::VERSION', $Crypt::SSLeay::VERSION; printf "%-40s%s\n" => '$IO::Socket::SSL::VERSION', $IO::Socket::SSL::VERSION; printf "%-40s%s\n" => '$Net::HTTPS::VERSION', $Net::HTTPS::VERSION; print "\n"; printf "%-40s%s\n" => '$Net::HTTPS::SSL_SOCKET_CLASS:', $Net::HTTPS::SSL_SOCKET_CLASS;