Thank you, Mark.  That single line - using Net::SSL - did the trick.

I agree that a little more documentation along the lines of what you
described would definitely have helped a Perl-novice.  Not knowing
the evolution of LWP, and the dated documentation on SOAPLite
definitely made this a, somewhat, harrowing experience.

I will update the SOAPLite list and point them to this thread for
the solution.

I appreciate your help, Mark; thanks again.


On 06/07/2012 11:02 AM, Mark Allen wrote:
I've hit this bug a bunch myself.

The basic issue is that there are two different implementations of the
SSL guts that LWP may use. One old one based on Net:SSL (which comes
from a virtually unmaintained module called Crypt::SSLeay) and a modern
one based on IO::Socket::SSL. By default, LWP chooses IO::Socket::SSL,
and IO::Socket::SSL does not honor the environment variable settings
you're specifying in your script - only Net::SSL uses those.

The easiest fix is probably to specify explicitly that you want LWP to
use the Net::SSL implementation. You can do this by adding

use Net::SSL ();

somewhere after your environment variable declarations near the top of
your program.

If that doesn't work, you can find out how to make IO::Socket::SSL use
your client certs/CA certs by consulting Stack Overflow (see, for
example, this answer: which has a
pretty nice answer.)

This is an area of LWP which requires far better documentation as it is
very confusing.


*From:* Arshad Noor <>
*Sent:* Thursday, June 7, 2012 12:39 PM
*Subject:* Problem with LWP, SSL and ClientAuth

I have small problem that appears to be related to the LWP module even
though I'm using SOAPLite. I'm new to Perl, so figuring this out has
been difficult. I've documented the problem at the following URL, but
have not heard from anyone yet on that forum.

Is there any light that someone knowledgeable from this forum can
throw on this? I would appreciate it. Thanks.

Arshad Noor

Reply via email to