In troubleshooting some issue with multiple https request with SSL_verifycn_scheme set to http, I noticed that only the global ssl_optionswere actually being passed into the Net::HTTPS::NB constructor.
The simply solution was to add the options stored in $args{ssl_opts} back into %args after the global ssl_options are added.
# Add SSL options, if any, to args
my $ssl_options = $self->_get_opt('ssl_options');
@args{ keys %$ssl_options } = values %$ssl_options if $ssl_options;
# Override global SSL options with request-specific ones, if any
@args{ keys %{$args{ssl_opts}} } = values %{$args{ssl_opts}} if $args{ssl_opts};
This has allowed me to successfully make requests to multiple sites using hostname verification. Sample:
In troubleshooting some issue with multiple https request with
SSL_verifycn_scheme
set tohttp
, I noticed that only the globalssl_options
were actually being passed into theNet::HTTPS::NB
constructor.The simply solution was to add the options stored in
$args{ssl_opts}
back into%args
after the globalssl_options
are added.This has allowed me to successfully make requests to multiple sites using hostname verification. Sample: