Created
January 19, 2017 18:50
-
-
Save oremj/cc277159797b9c6127c0d4685cdb57c3 to your computer and use it in GitHub Desktop.
Convert pkcs12 to pem key and cert
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| set -e | |
| P12CERT=$1 | |
| CERTNAME=${P12CERT%.p12} | |
| openssl pkcs12 -in "$P12CERT" -nocerts -nodes -out "${CERTNAME}.key.pem" | |
| openssl pkcs12 -in "$P12CERT" -clcerts -nokeys -out "${CERTNAME}.crt.pem" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment