1. Check .p12 / .pfx certificate expiration date:
[code]
openssl pkcs12 -in testuser1.pfx -nokeys | openssl x509 -noout -enddate
[/code]
To specify password in plain text, add -passin pass:”${pass}”
2. Export key and cert from .p12 / .pfx:
[code]
openssl pkcs12 -clcerts -nokeys -in myContainer.p12 -out usercert.pem
openssl pkcs12 -nocerts -in myContainer.p12 -out userkey.pem
[/code]
3. Connect to HTTPS server with client certificate:
[code]
openssl s_client -connect gmail.com:443 -cert usercert.pem -key userkey.pem
[/code]