Skip to content

Commit

Permalink
Ignores env variables when ssl_opts provided [RT#66663]
Browse files Browse the repository at this point in the history
Let SSL_ca_file and SSL_ca_path default from the environment when other ssl_opts are passed
  • Loading branch information
Christopher J. Madsen authored and gisle committed Mar 26, 2011
1 parent dfd3391 commit a0f8029
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/LWP/UserAgent.pm
Expand Up @@ -46,9 +46,13 @@ sub new
else {
$ssl_opts->{verify_hostname} = 1;
}
}
unless (exists $ssl_opts->{SSL_ca_file}) {
if (my $ca_file = $ENV{PERL_LWP_SSL_CA_FILE} || $ENV{HTTPS_CA_FILE}) {
$ssl_opts->{SSL_ca_file} = $ca_file;
}
}
unless (exists $ssl_opts->{SSL_ca_path}) {
if (my $ca_path = $ENV{PERL_LWP_SSL_CA_PATH} || $ENV{HTTPS_CA_DIR}) {
$ssl_opts->{SSL_ca_path} = $ca_path;
}
Expand Down

0 comments on commit a0f8029

Please sign in to comment.