分享

使用Openssl转换SSL证书格式 certificates formats (PEM/P7B/PFX/DER)

 dtl乐学馆 2014-12-10

1. 转换PEM 证书

PEM to DER
openssl x509 -outform der -in certificate.pem -out certificate.der
PEM to P7B
openssl crl2pkcs7 -nocrl -certfile certificate.cer -out certificate.p7b -certfile CACert.cer
PEM to PFX
openssl pkcs12 -export -out certificate.pfx -inkey privateKey.key -in certificate.crt -certfile CACert.crt

2. 转换P7B 证书

P7B to PEMopenssl pkcs7 -print_certs -in certificate.p7b -out certificate.cer
P7B to PFX
openssl pkcs7 -print_certs -in certificate.p7b -out certificate.cer openssl pkcs12 -export -in certificate.cer -inkey privateKey.key -out certificate.pfx -certfile CACert.cer

3. 转换PFX 证书

PFX to PEM
openssl pkcs12 -in certificate.pfx -out certificate.cer -nodes konwersja poprze OpenSSL

4. 转换DER 证书

DER to PEM
openssl x509 -inform der -in certificate.cer -out certificate.pem

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多