Skip to content

Instantly share code, notes, and snippets.

@mahradbt
Last active June 3, 2018 17:19
Show Gist options
  • Save mahradbt/b49aeed38c17a5720dbce5c283f4a675 to your computer and use it in GitHub Desktop.
Save mahradbt/b49aeed38c17a5720dbce5c283f4a675 to your computer and use it in GitHub Desktop.
use pfx for nginx
openssl pkcs12 -in standard_certificate.pfx -nocerts -out key-encrypted.key
openssl pkcs12 -in standard_certificate.pfx -clcerts -nokeys -out certificate.crt
openssl rsa -in key-encrypted.key -out key-decrypted.key
openssl pkcs12 -in standard_certificate.pfx -out domain-ca.crt -nodes -nokeys -cacerts
cat certificate.crt domain-ca.crt > full_certificate.crt // for nginx cert
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment