如何去掉私鑰的密碼


拿到一個證書,里面有私鑰和公鑰,合在一起,pkc12的格式轉的pem格式,有密碼,現在需要把密碼去掉

1.分離公鑰和私鑰

openssl x509 -in cert2.pem -out cert2.crt

openssl rsa -in cert2.pem -out cert2.key

 

2. 去掉私鑰密碼

openssl rsa -in cert2.key -out cert22.key

3. 合並成pfx文件

 

openssl pkcs12 -export -inkey cert22.key -in cert2.crt -out cert2.pfx

4.轉回 pem

openssl pkcs12 -in cert2.pfx -out cert22.pem

這個地方-nodes可能不需要加

中間需要運來私鑰密碼的時候就輸入,如果新的私鑰輸密碼直接回車


免責聲明!

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



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