Skip to content

Remove password for a password protected SSL private key

如何判断私钥是有密码保护的?

PKCS#8 私钥加密格式

----BEGIN ENCRYPTED PRIVATE KEY-----
......BASE64 私钥内容......
-----END ENCRYPTED PRIVATE KEY-----

Openssl ASN格式

-----BEGIN RSA PRIVATE KEY-----
Proc-Type: 4,ENCRYPTED
DEK-Info:DES-EDE3-CBC,4D5D1AF13367D726
......BASE64 私钥内容......
-----END RSA PRIVATE KEY-----

如何去除私钥密码保护?

openssl rsa -in encryedprivate.key -out unencryedprivate.key