Subject: | ssl_opts are not passed correctly |
The following script:
use strict;
use warnings;
use CACertOrg::CA;
use LWP::UserAgent;
use LWPx::TimedHTTP qw(:autoinstall);
my $url = 'https://www.cacert.org/';
my $ua = LWP::UserAgent->new(
ssl_opts => {
SSL_ca_file => CACertOrg::CA::SSL_ca_file(),
}
);
my $resp = $ua->get($url);
warn $resp->status_line . "\n";
Outputs: 500 Can't connect to www.cacert.org:443 (certificate verify failed)
Comment out the 'use LWPx::TimedHTTP' and it outputs:
200 OK
It appears the ssl_opts aren't getting passed correctly when LWPx::TimedHTTP is enabled.