moritz has asked for the wisdom of the Perl Monks concerning the following question:

I just spent several hours debugging some code using LWP::UserAgent. The code could be reduced to this:

use strict; use warnings; use LWP::UserAgent; my $URL = 'https://myhost.local/'; my $ua = LWP::UserAgent->new; $ua->ssl_opts( verify_hostname => 0 ); my $response = $ua->get($URL); if ($response->is_success) { print $response->decoded_content; # or whatever } else { die $response->status_line; }

So pretty much a copy&paste from the LWP::UserAgent docs.

The error message I got was:

Can't connect to myhost.local:443\n\n 500 Can't connect to myhost.local:443 at line 15.

After some debugging, strace finally showed me an ENOENT for an SSL CA file, which nudged me into the right direction.

So, my questions are:

This is on a Debian Jessie box with perl 5.20.2, and LWP::UserAgent 6.06.