如何去掉私钥的密码

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

中间需要运来私钥密码的时候就输入,如果新的私钥输密码直接回车

转载于:https://www.cnblogs.com/caihemm/p/4447628.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值