Then make "my-chain.pem" via concatenating your cert, and all intermediate certs until the root cert, all in pem format.my $client = new IO::Socket::SSL( PeerAddr => "srs.neulevel.biz", PeerPort => 700, Proto => 'tcp', SSL_use_cert => 1, SSL_key_file => "my-cert.key", SSL_cert_file => "my-chain.pem", );
Because IO::Net::Socket::SSL::new calls Net::SSLeay::CTX_use_certificate_chain_file() who's doc says
"SSL_CTX_use_certificate_chain_file() loads a certificate chain from file into ctx. The certificates must be in PEM format and must be sorted starting with the subject's certificate (actual client or server certificate), followed by intermediate CA certificates if applicable, and ending at the highest level (root) CA."And just for the sake of completion.. you can use java's keytool to quickly dump a summary of the pem results.
keytool -printcert my-chain.pem | grep -E '^(Owner|Issuer)' # you should see output like Owner=example.com Issuer=Intermediate A Owner=Intermediate A Issuer=Intermediate B Owner=Intermediate B Issuer=Some Cert authority Root Owner=Some Cert authority Root Issuer=Some Cert authority Root
In reply to Re: OpenSSL vs IO::Socket::SSL
by mniew
in thread OpenSSL vs IO::Socket::SSL
by marcussen
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |