Skip to content

Instantly share code, notes, and snippets.

@dingcang
Created July 5, 2019 09:45
Show Gist options
  • Save dingcang/c9b2ceb78abab997f53179dd5bad48a5 to your computer and use it in GitHub Desktop.
Save dingcang/c9b2ceb78abab997f53179dd5bad48a5 to your computer and use it in GitHub Desktop.
将cer格式的证书转为crt格式
Basically there are two CER certificate encoding types, DER and Base64. When type DER returns an error loading certificate (asn1 encoding routines), try the PEM and it shall work.
openssl x509 -inform DER -in certificate.cer -out certificate.crt
openssl x509 -inform PEM -in certificate.cer -out certificate.crt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment