Subject: | possible bug/issue in IO::Socket::SSL v1.94 |
Date: | Thu, 30 Oct 2014 09:08:00 -0700 |
To: | <bug-IO-Socket-SSL [...] rt.cpan.org> |
From: | Brian Biggs <brian.biggs [...] sonoma.edu> |
Hi,
I've run into an issue where it seems that the use of certain global
variables in IO::Socket::SSL have caused failures under certain
circumstances. Specifically when a second SSL connection is made within
the same program to a different host with a different SSL cert.
I was able to mitigate the problem by clearing the globals like this:
# Call this to mitigate a bug in IO::Socket::SSL which has some
# global settings that don't get cleaned up between connections.
# We also check for set_defaults() because the RHEL6 version of
# IO::Socket::SSL doesn't have a set_defaults() function.
defined(&IO::Socket::SSL::set_defaults) &&
IO::Socket::SSL::set_defaults(
verifycn_name => undef,
SSL_verifycn_name => undef,
SSL_verifycn_scheme => undef,
SSL_verify_mode => undef
);
This program (a CGI) first makes a connection to LDAP and then makes a
call to CAS to authenticate a user.
This program is running fine on a RHEL6 distro using the following versions:
perl v5.10.1
IO::Socket::SSL v1.31
Linux redacted_name 2.6.32-431.29.2.el6.x86_64 #1 SMP Sun Jul 27
15:55:46 EDT 2014 x86_64 x86_64 x86_64 GNU/Linux
Migrating to RHEL7 caused this problem to exhibit. Our RHEL7 environment
has the following versions:
perl v5.16.3
IO::Socket::SSL v1.94
Linux redacted_name 3.10.0-123.8.1.el7.x86_64 #1 SMP Mon Aug 11 13:37:49
EDT 2014 x86_64 x86_64 x86_64 GNU/Linux
The error message we received when we migrated to RHEL7 was:
Not a GLOB reference at /usr/share/perl5/vendor_perl/IO/Socket/SSL.pm
line 1377
With the mitigation code in place we see the following issues in the web
server logs:
Use of uninitialized value $verify_mode in numeric ne (!=) at
/usr/share/perl5/vendor_perl/IO/Socket/SSL.pm line 1649
and
Use of uninitialized value in subroutine entry at
/usr/share/perl5/vendor_perl/IO/Socket/SSL.pm line 1776
but the code runs successfully.
If this is not a bug/issue with IO::Socket::SSL I do apologize.
-Brian
--
Brian Biggs
Sonoma State University