Skip to content

Instantly share code, notes, and snippets.

@daubac402
Last active November 21, 2019 06:36
Show Gist options
  • Save daubac402/72043bae7f60aa0ce17dbd19a1ebbc8c to your computer and use it in GitHub Desktop.
Save daubac402/72043bae7f60aa0ce17dbd19a1ebbc8c to your computer and use it in GitHub Desktop.
Convert .cer > .crt
openssl x509 -inform DER -in certificate.cer -out certificate.crt
# if error, try this:
openssl x509 -inform PEM -in certificate.cer -out certificate.crt
# With nginx SSL setting, it only uses .key and .pem
# build this .pem file with .crt and then append .cer (SSL chain) into it
cat your_file.crt your_file.cer > your_file.pem
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment