Skip to content

Commit

Permalink
More complete information when not Certificate Authorities is available
Browse files Browse the repository at this point in the history
  • Loading branch information
gisle committed Feb 13, 2011
1 parent 2d92b7b commit 57852d4
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion lib/LWP/Protocol/https.pm
Expand Up @@ -26,7 +26,16 @@ sub _extra_sock_opts
};
if ($@) {
if ($@ =! /^Can't locate Mozilla\/CA\.pm/) {
$@ = "Can't verify SSL peers without knowning which Certificate Authorities to trust";
$@ = <<'EOT';
Can't verify SSL peers without knowning which Certificate Authorities to trust

This problem can be fixed by either setting the PERL_LWP_SSL_CA_FILE
envirionment variable or by installing the Mozilla::CA module.

To disable verification of SSL peers set the PERL_LWP_SSL_VERIFY_HOSTNAME
envirionment variable to 0. If you do this you can't be sure that you
communcate with the expected peer.
EOT
}
die $@;
}
Expand Down

0 comments on commit 57852d4

Please sign in to comment.