Last active
March 8, 2021 21:11
-
-
Save dtaivpp/6a45b3c115e307c906f3d5fe517e4cfb to your computer and use it in GitHub Desktop.
Convert a .pfx to a cert and key file
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
| # Credit to Mark Brilman https://www.markbrilman.nl/2011/08/howto-convert-a-pfx-to-a-seperate-key-crt-file/ | |
| # Output Key | |
| # pkcs12 is just .pfx | |
| openssl pkcs12 -in [yourfile.pfx] -nocerts -out [keyfile-encrypted.key] | |
| # Output Cert | |
| openssl pkcs12 -in [yourfile.pfx] -clcerts -nokeys -out [certificate.crt] | |
| # Output Decrypted Key | |
| openssl rsa -in [keyfile-encrypted.key] -out [keyfile-decrypted.key] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment