Skip to content

Instantly share code, notes, and snippets.

@dz-s
Last active August 20, 2018 12:18
Show Gist options
  • Save dz-s/a75dd9009f943989e666df86e7df78dd to your computer and use it in GitHub Desktop.
Save dz-s/a75dd9009f943989e666df86e7df78dd to your computer and use it in GitHub Desktop.
Common OpenSSL Commands with Keys and Certificates

Getting key from .pfx file

openssl pkcs12 -in ~/../dir/filename.pfx -nocerts -out ~/../dir/key-filename.key

Getting crt from .pfx

openssl pkcs12 -in ~/../dir/filename.pfx -clcerts -nokeys -out ~/../dir/cert-filename.crt

Removing passphrase from key file

openssl rsa -in ~/../dir/key-filename.key -out ~/../dir/key-filename-stripped.key

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment