Jonathan has asked for the wisdom of the Perl Monks concerning the following question:
Firstly, apologies as this is more a SSL issue than just Perl. I have an HTTPS url that I want to pull some data from (the url is another server on our local network). The url works fine with Chrome, MS Edge etc but I'm getting a certificate error running my test script from a dev server (Ubuntu). Also wget also fails with certificate errors.
Which outputs;#!/usr/bin/perl use strict; use warnings; use WWW::Mechanize; use Net::SSLeay; my $m = WWW::Mechanize->new( autocheck => 1 ); print "LWP: $LWP::UserAgent::VERSION\n"; print "Mech: $WWW::Mechanize::VERSION\n"; print "Net::SSLeay $Net::SSLeay::VERSION\n"; my $url = $ARGV[0]; $m->get($url); print $m->content();
I suspect there is something available on the companies servers that satisfies browsers but isn't available elsewhere. Anyone seen this before and have any idea what I need to do? Thanks$ ./testit.pl LWP: 6.43 Mech: 1.96 Net::SSLeay 1.88 Error GETing https://xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx: Can't conn +ect to xxxxxxxxxxx:443 (certificate verify failed) at ./testit.pl lin +e 15. $
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: WWW::Mechanize and SSL
by hippo (Archbishop) on Aug 10, 2022 at 13:31 UTC | |
Re: WWW::Mechanize and SSL
by Corion (Patriarch) on Aug 10, 2022 at 13:41 UTC | |
Re: WWW::Mechanize and SSL
by Jonathan (Curate) on Aug 11, 2022 at 12:43 UTC |