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