如何去掉私钥的密码


拿到一个证书,里面有私钥和公钥,合在一起,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