Subject: | Interaction with LWP broken regarding ssl_opts |
If on is using ssl_opts like this:
SOAP::Lite->proxy( 'https://...', ssl_opts => { SSL_ca_file => ... })
It will not set the given SSL options as one would expect.
The reason is that SOAP::Transport::HTTP::Client::new will check for all arguments if there is a function with this name in LWP::UserAgent and in this case not give the arguments to new but to the functions. This means it will do the following
$ua = LWP::UserAgent->new(...) # no ssl_opts
$ua->ssl_opts({ SSL_ca_file => ... })
The last call will not set the ssl_opts in LWP::UserAgent but instead will treat the only argument as a string (i.e. "HASH(0x....")) and return the stored SSL option with this name.
Giving instead ssl_opts as array ref works because in this case the array will
be expanded when calling which will result in
$ua->ssl_opts( SSL_ca_file => ... )
Note that the documentation explicitly states with an example that the ssl_opts
should be given as a hash.
Regards,
Steffen