OpenSSL 证书转换 快捷命令
Convert PEM to DER
1 | openssl x509 -outform der -in certificate.pem -out certificate.der |
Convert PEM to P7B
1 | openssl crl2pkcs7 -nocrl -certfile certificate.cer -out certificate.p7b -certfile CACert.cer |
Convert PEM to PFX
1 | openssl pkcs12 -export -out certificate.pfx -in fullchain.pem -inkey privkey.pem |
Convert DER to PEM
1 | openssl x509 -inform der -in certificate.cer -out certificate.pem |
Convert P7B to PEM
1 | openssl pkcs7 -print_certs -in certificate.p7b -out certificate.cer |
Convert P7B to PFX
1 | openssl pkcs7 -print_certs -in certificate.p7b -out certificate.cer |
Convert PFX to PEM
1 | openssl pkcs12 -in certificate.pfx -out certificate.cer -nodes |