使用OpenSSL轉換X509 PEM與PFX證書


PKCS(Public Key Cryptography Standards)

PKCS12:定義了包含私鑰與公鑰證書(public key certificate)的文件格式。私鑰采密碼(password)保護。常見的PFX就履行了PKCS#12。

 

X509(PEM格式的)轉PFX格式:

openssl pkcs12 -export -inkey test.key -in test.cer -out test.pfx

注:test.key和test.cert都是PEM格式的私鑰和公鑰證書

  

PFX轉X509:

openssl pkcs12 -in test.pfx -nodes -out test.pem
openssl rsa -in test.pem -out test.key
openssl x509 -in test.pem -out test.crt


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM