Subject: | Incorrect handling of certificate bundles |
Date: | Fri, 18 Oct 2013 14:46:09 +0200 |
To: | bug-REST-Client [...] rt.cpan.org |
From: | Martin Drasar <drasar [...] ics.muni.cz> |
Hi,
if I try to pass certificate bundle to REST::Client it does not work
correctly, i.e. the client is setting SSL options in request method via
$ENV variable. However, it seems that this variable is not used by
already instantiated LWP::UserAgent and is used only on the second run
of program (like re-run in debugger, not launching it again).
I think, that the correct solution would be to change this line:
$ENV{'HTTPS_CA_FILE'} = $ca
to
$ua->ssl_opts(SSL_ca_file => $ca);
and probably do the analogous thing for other $ENV settings
$ENV{'HTTPS_CERT_FILE'} = $self->getCert;
$ENV{'HTTPS_KEY_FILE'} = $self->getKey;
REST::Client version: 249
LWP::UserAgent version: 6.04
Regards,
Martin