Skip to content

Instantly share code, notes, and snippets.

@aleixripoll
Created February 6, 2017 15:19
Show Gist options
  • Save aleixripoll/5beec29a4f8fc06020a2cd7ffc60672e to your computer and use it in GitHub Desktop.
Save aleixripoll/5beec29a4f8fc06020a2cd7ffc60672e to your computer and use it in GitHub Desktop.
Strip p12 certificates

Split into certs and unencrypted keys:

openssl pkcs12 -in cert.p12 -nocerts -out cert.p12.enc_keys
openssl pkcs12 -in cert.p12 -clcerts -nokeys -out cert.p12.certs
openssl rsa -in cert.p12.enc_keys -out cert.p12.keys

Check expiry date:

# openssl x509 -enddate -noout -in key.pem
notAfter=Feb  5 11:48:03 2017 GMT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment