Subject: | Problems connecting to some SSL applications - two line change |
While trying to discover why openssl s_client could connect to a remote server performing certificate validation and why IO::Socket::SSL could not, I discovered that s_client was sending my CA Cert along with the Certificate. It seems that at some point, it found and loaded the CA cert... I found the following workaround worked:
Change:
Net::SSLeay::CTX_use_certificate_file
($ctx, $arg_hash->{'SSL_cert_file'}, $filetype)
to:
Net::SSLeay::CTX_use_certificate_chain_file
($ctx, $arg_hash->{'SSL_cert_file'})
The gotcha is this hack only supports PEM encoded files.