Last active
November 29, 2018 22:33
-
-
Save jayers99/643dbed09351dfb12b814d40835ccc38 to your computer and use it in GitHub Desktop.
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
# set a var name | |
mycertfile=<mycertfilename> | |
# to decrypt the private key | |
# this will ask you for a password | |
openssl pkey -outform PEM -in $mycertfile | |
# get all the nodes from pks file type | |
openssl pkcs12 -in $mycertfile -nodes | |
# decode the cert details | |
openssl x509 -in $mycertfile -text -noout | |
# including the location of the cert chain | |
openssl x509 -in $mycertfile -text -noout | grep 'CA Issuers - URI:' | |
# convert crt to pem cert chain | |
openssl x509 -in $mycertfile -inform der -outform PEM #-out $mycertfile.pem | |
# to export your encrypted private SSH key | |
openssl rsa -in ~/.ssh/jayers_rsa -out ~/.ssh/jayers_d_rsa |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment