develooper Front page | perl.libwww | Postings from October 2001

GET an https page with unrecognized certificate behind a proxy

From:
nronayette
Date:
October 26, 2001 03:41
Subject:
GET an https page with unrecognized certificate behind a proxy
Message ID:
1004092435.3bd93c13a0419@webmail.alphacsp.com
Hello list ,

I'm trying to get a request with a little perl script :


#!/usr/bin/perl -w
use LWP::UserAgent;
use HTTP::Request::Common;

my $ua = new LWP::UserAgent;
my $URL = 'https://my.url.net/';

$ua->proxy(['http','https', 'ftp'], 'http://proxy.frontofme:2010/');
my $res = $ua->request(new HTTP::Request GET => $URL);
print $res->content."\n";


If i tried to reach https://login.yahoo.com/, it's working very well and i get
the content of the page.
If i tried another web site which have an old certificate, i've got the
following from the proxy :

"
The requested item could not be loaded by the proxy.<P>
The certificate issuer for this server is not recognized by
Netscape. The security certificate may or may not be valid.

Netscape refuses to connect to this server.<P>
"
(It a Netscape-Proxy/3.52)

I know also that i can connect to this site with my browser that tell me also
that the certificate may not be valid. But at the end i've got the page.

Is somenone know how make this script working (like my browser), how tell to the
proxy that we don't care if the certificate is valid and get the page anyway ?

I didn't find any answer on google groups or in this mailing list archive.
If i didn't post at the right mailling list please apologize.

Thanks in advance for your help

Nicolas








nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About