Checking -W as well produces the same error as Andrew
Argument "SSL negotiation failed" isn't numeric in scalar assignment at
/usr/local/lib/perl5/5.6.0/IO/Socket/INET.pm line 90.
Use of uninitialized value in hash element at
/usr/local/lib/perl5/site_perl/5.6.0/sun4-solaris/Net/SSL.pm line 53.
500 Can't connect to www.mysite.com:443 (Timeout)
Cobbling the following script
#!/usr/bin/perl -W
use Crypt::SSLeay;
use Net::SSL;
my $sock;
my $url;
unless (@ARGV == 1) {
die "\nUsage: $0 <url>\n\n"
}
($url) = @ARGV;
$sock = Net::SSL->new(PeerAddr => $url,
PeerPort => '443',
Proto => 'tcp',
Timeout => '999',
);
unless ($sock) {
die "Can't connect to $url:443 ($@)";
}
$sock->print;
Also produces that same message. (As it is all the HTTP::Request new method
is really calling)
With the extra :
Can't connect to www.mysite.com:443 (Net::SSL: Timeout) at ./sslcon line 23.
It would seem via the "SSL Negotiation failed" error returning back to
INET.pm that we are truly not negotiating properly.
Hmmm time to dig into INET.PM.
P.S. Poor form to assume numeric response by INET.pm
Luke Butcher
Network Analyst
buy.com
Em: [EMAIL PROTECTED]
-----Original Message-----
From: Andrew C.M. McClintock [mailto:[EMAIL PROTECTED]]
Sent: 09 June 2000 16:28
To: [EMAIL PROTECTED]
Cc: Gisle Aas
Subject: Re: LWP::Protocol::https missing methods
I too have gotten the erro that Luke describes. Here is the output from
perl -W
when I try the same thing:
LWP::UserAgent::new: ()
LWP::UserAgent::request: ()
LWP::UserAgent::simple_request: GET https://www.xxx.com/
LWP::UserAgent::_need_proxy: Not proxied
HTTP::Cookies::add_cookie_header: Checking www.xxx.com for cookies
HTTP::Cookies::add_cookie_header: Checking .xxx.com for cookies
LWP::Protocol::http::request: ()
Argument "SSL negotiation failed" isn't numeric in scalar assignment at
/usr/local/lib/perl5/5.6.0/IO/Socket/INET.pm line 90.
Use of uninitialized value in hash element at
/usr/local/lib/perl5/site_perl/5.6.0/sun4-solaris/Net/SSL.pm line 53.
LWP::UserAgent::request: Simple response: Internal Server Error
Query failed. 500 Can't connect to www.xxx.com:443 (Timeout)
I still haven't figured out what the problem is--perhaps this extra
information
will shed some light?
Andrew
Gisle Aas wrote:
>
> Luke Butcher <[EMAIL PROTECTED]> writes:
>
> > I am trying to write a simple script to retrieve a secure page via
HTTPS.
> >
> > The guts of it are:
> >
> > $url = "https://mysite.com"
> > $ua = new LWP::UserAgent;
> > $req = new HTTP::Request GET => $url
> >
> > $response = $ua->request($req);
> >
> > It keeps returning: (via $response->status_line, $response->as_html also
> > returns similar).
> > 500 Can't Connect to mysite.com:443 (Timeout)
> ^.... did you actually get an upper case "C" here???
> >
> > So I did some poking, tried hacking up the timeout to 999 - No joy.
> > So I went looking into the LWP::Protocol packages and did some tracing.
> >
> > It seems UserAgent.pm nicely determines we are using https and calls
> > LWP::Protocol::https.pm with a request method but https lacks a request
> > method??!?!!?!?
>
> That's right. It relies on the inherited request() method of http,
> but this method calls $self->_new_socket() which will pick up the
> https version.
>
> > Further info: If I point the script to a HTTP:// site all works
smashingly.
> > All requires are properly installed (no error messages and debugging
shows
> > it is correctly stepping into Net:SSL). The box I'm trying to connect to
is
> > IIS, if it makes a difference.
>
> Can you get SSLeay to connect directly to port 443 on mysite.com?
>
> Regards,
> Gisle
--
Andrew C. M. McClintock Senior Unix Systems Administrator
[EMAIL PROTECTED] [EMAIL PROTECTED]
Cable & Wireless USA Phone: (703) 292-2244