给p12证书更换密码

1先导出成无密码的

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
openssl pkcs12 -in protected.p12 -nodes -out temp.pem
# -> Enter password
openssl pkcs12 -in protected.p12 -nodes -out temp.pem # -> Enter password
openssl pkcs12 -in protected.p12 -nodes -out temp.pem
#  -> Enter password

2再加密码

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
openssl pkcs12 -export -in temp.pem -out unprotected.p12
# -> Just press [return] twice for no password
openssl pkcs12 -export -in temp.pem -out unprotected.p12 # -> Just press [return] twice for no password
openssl pkcs12 -export -in temp.pem  -out unprotected.p12
# -> Just press [return] twice for no password

3删除临时文件

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
rm temp.pem
rm temp.pem
rm temp.pem

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *