I am running the following Perl snippet on Debian using Perl v5.14.2 and libwww-perl v6.04-1
my $ua = LWP::UserAgent->new;
my $req = HTTP::Request->new("GET", "https://google.com/");
my $rep = $ua->request($req);
print $rep->status_line;
This instantly returns "500 Can't connect to google.com:443". I have tried using LWP::Simple, Net::SSLeay, Crypt::SSLeay
, etc. without any success.
Oddly enough, executing the same code on another Debian system running exactly the same Perl and LWP versions works.
So I thought, there is some error with the underlying system, but other applications - like cURL for any browser - are working fine.
Also, openssl s_client -connect google.com:443
returns Verify return code: 20 (unable to get local issuer certificate)
on both systems.
Has anyone ever encountered this phenomenon and has a solution?