pfx证书和key、pem、crt格式证书的转换

工具:openssl | .pfx证书

说明:要使用openssl。Linux(CentOS 7)系统自带openssl,如果win系统要用,就先安装openssl,本文以windows系统为例(以安装openssl,openssl请自行安装)

1. 将.pfx格式的证书转换为.pem格式的文件

PS D:\test> openssl pkcs12 -in test.pfx -nodes -out test.pem
Enter Import Password:

2. 从.pem文件中导出.key文件

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

3. 从.pem文件导出.crt格式的证书

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

4. 从.crt格式的证书导出.pem文件

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

 

 

参考文章:https://mp.weixin.qq.com/s/tqdkLYPn0J4EgqwN6aY3zw

posted @   along_bro  阅读(2218)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· Manus的开源复刻OpenManus初探
· .NET Core 中如何实现缓存的预热?
· 三行代码完成国际化适配,妙~啊~
· 阿里巴巴 QwQ-32B真的超越了 DeepSeek R-1吗?
点击右上角即可分享
微信分享提示