chrisj79 has asked for the wisdom of the Perl Monks concerning the following question:
If I run this without the HTTPS_CA_FILE line, it prints "Peer certificate not verified", which makes sense. If I run it with the HTTPS_CA_FILE line included and with cacerts.pem in the same directory with the contents pulled from http://curl.haxx.se/docs/sslcerts.html , it prints nothing. I thought this was what I wanted, until I tried pointing HTTPS_CA_FILE to a blank file or file that didn't exist, and that also printed nothing.use strict; use LWP::UserAgent; $ENV{ HTTPS_CA_FILE } = 'cacerts.pem'; my $ua = LWP::UserAgent->new; my $req = HTTP::Request->new('GET', 'https://mail.google.com/'); my $res = $ua->request($req); print $res->header( 'client-ssl-warning' );
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Validating server SSL certificate
by Anonymous Monk on Jan 27, 2009 at 08:03 UTC | |
by chrisj79 (Novice) on Jan 27, 2009 at 17:15 UTC | |
|
Re: Validating server SSL certificate
by zentara (Cardinal) on Jan 27, 2009 at 13:17 UTC |