CC: | <Steffen_Ullrich [...] genua.de> |
Subject: | thread safety issues |
Date: | Mon, 20 Aug 2007 10:27:04 +0300 |
To: | <bug-IO-Socket-SSL [...] rt.cpan.org> |
From: | "Ionut Turturica" <iturturica [...] ixiacom.com> |
Hi Steffen,
I suspect some nasty thread safety issues at setting the verify_callback routine. I noticed many random crashes and managed to track them down to that "Net::SSLeay::CTX_set_verify" sub.
In fact the Net::SSLeay author also mentions this:
"It is desirable to reset these callbacks to undef immediately after use to prevent
thread safety problems and crashes on exit that can occur if different threads
set different callbacks."
Which happens to be true for IO::Socket::SSL.
The actual setup of the callback is done in SSL.pm at around line 946:
Net::SSLeay::CTX_set_verify($ctx, $verify_mode, $verify_callback);
Thanks,
IonuĊ£