Unfortunately, Net::SSL and Crypt:SSL do not have a neat debug
feature like LWP.  I tried inserting print statements in the Net/SSL.pm
module, but none of the prints appear in the output.

I added a print into the Crypt/SSLeay.pm module and into https.pm.
The additional prints don't show too much more (beginning with
"transmogrify":

LWP::Protocol::https::request: Transmogrifying our socket,
IO::Socket::INET=GLOB(0x833823c)
LWP::Protocol::https::request: Socket blessed: Net::SSL=GLOB(0x833823c)
   
  Crypt::SSLeay: CTX Crypt::SSLeay::CTX=SCALAR(0x834334c) version 23
   
LWP::Protocol::https::request: Socket: 
Crypt::SSLeay::CTX=SCALAR(0x834334c)
LWP::Protocol::https::request: SSL error:0
Net::SSL: SSL negotiation failed at
/usr/lib/perl5/site_perl/5.005/LWP/Protocol/https.pm line 120
LWP::UserAgent::request: Simple response: Internal Server Error    

I suspect that the "new" method is trying to do a socket connect
and fails to do so in this statement from https.pm:
my $ssl = Crypt::SSLeay::Conn->new(*$socket->{'ssl_ctx'}, $socket);

      - Fred Noz

Chris Hiner wrote:
> 
> I'm not sure what to suggest.  As far as I can tell, your trace looks
> the same as mine, up to the Transmogrifying section.
> I had a few problems at first with SSL negotiation failures that turned out
> to be lwp sending some extra header info after it'd made the connection to
> the remote server, but before the negotiation.  The extra info sent
> to the server when it wasn't expecting it, was causing the failure.
> 
> Try adding these, and see if the extra info in the output helps.
> LWP::Debug::level('+conns');
> LWP::Debug::level('+trace');
> LWP::Debug::level('+debug');
> 
> The only differences I see, are that I'm using
> Crypt-SSLeay-0.16 and Perl 5.6.0 with a TIS FWTK proxy.
> 
> I suggest trying to see if you can turn on debugging for the Net:SSL or
> Crypt:SSL layer, and see if you can get it to tell you why the
> SSL negotiation failed.  Worst case, add some print's in the SSL code
> to show you what exactly it's doing.
> 
> Good luck, and let me know what turns out the be the solution.
> 
> Chris Hiner
> [EMAIL PROTECTED]
> 
> On Fri, Sep 08, 2000 at 08:40:51PM -0400, Fred Noz wrote:
> > I am unable to do a GET a page from an HTTPS server vi a proxy.
> > I applied Chris Hiner's patch to libwww-perl-5.48 and specified
> > https for the proxy as in:
> > $browser->proxy('http' => 'http://dante.xxx.com:80');
> > $browser->proxy('https' => 'https://dante.xxx.com:80');
> > The proxy is Gauntlet (TIS).
> >
> > The trace of LWP shows an SSL negotiation failure after hanging a minute
> > after showing "Transmogrifying our socket".  This is the trace:
> > LWP::UserAgent::new: ()
> > Using proxy http://dante.xxx.com:80
> > LWP::UserAgent::proxy: http http://dante.xxx.com:80
> > LWP::UserAgent::proxy: https https://dante.xxx.com:80
> > LWP::UserAgent::request: ()
> > LWP::UserAgent::simple_request: GET https://summer.xxx.com/
> > LWP::UserAgent::_need_proxy: Proxied to https://dante.xxx.com:80
> > LWP::Protocol::https::request: ()
> > LWP::Protocol::https::request: Trying to CONNECT through the proxy
> > server
> > LWP::Protocol::http::request: ()
> > LWP::Protocol::http::request: CONNECT summer.xxx.com:443 HTTP/1.0
> >
> > LWP::Protocol::http::request: reading response
> > LWP::Protocol::http::request: HTTP/1.0 200 OK
> >
> > LWP::Protocol::http::request: HTTP/1.0 200 OK
> > LWP::Protocol::https::request: Transmogrifying our socket
> > LWP::Protocol::https::request: SSL error:0
> > Net::SSL: SSL negotiation failed at
> > /usr/lib/perl5/site_perl/5.005/LWP/Protocol/https.pm line 116
> > LWP::UserAgent::request: Simple response: Internal Server Error
> > <HTML>
> > <HEAD><TITLE>An Error Occurred</TITLE></HEAD>
> > <BODY>
> > <H1>An Error Occurred</h1>
> > 500 SSL negotiation failed.
> > </BODY>
> > </HTML>
> >
> > Line 116 in https.pm is:
> > $socket->_error("SSL negotiation failed");
> >
> > The perl modules I am using are:
> > Crypt-SSLeay-0.17
> > Digest-MD5-2.11
> > HTML-Parser-3.11
> > HTML-Tagset-3.02
> > MIME-Base64-2.11
> > URI-1.09
> > libnet-1.0703
> > libwww-perl-5.48
> > openssl-0.9.5a
> > perl 5.5.3 on Red Hat Linux 6.2.
> >
> > Any help is appreciated.
> >
> >         - Fred Noz
> >         New York City, USA

Reply via email to