Last active
July 1, 2019 10:26
-
-
Save frgomes/0d0643499b7fbb2b26d10fe755da9cb2 to your computer and use it in GitHub Desktop.
openssl - Convert from .PFX to CRT, CER, root PEM and client PEM
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 | |
# This lists the contents of a PFX file | |
# This is the last resort in case everything else fails. | |
# Just see its contents as a text file, cut whatever you need from it and | |
# paste manually onto separate files. | |
openssl pkcs12 -info -in input.pfx | |
# Found this in the internet. Not tested at all! | |
openssl pkcs12 -in input.pfx -out mycerts.crt -nokeys -clcerts | |
openssl x509 -in mycerts.crt -inform pem -outform der -out mycerts.cer | |
openssl pkcs12 -in input.pfx -out client_ssl.pem -clcerts | |
openssl pkcs12 -in input.pfx -out root.pem -cacerts |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment