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.
#!/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();
Which outputs;
$ ./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.
$
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