我试图在没有任何用户输入的情况下从shell脚本将p12转换为pem。 我可以将密码作为脚本中的变量。
所以当我打电话时:
openssl pkcs12 -in *.p12 -out cert.pem -nodes
终端打印“输入导入密码:”并等待输入。
我尝试使用以下方法输入密码:
echo $PASS | openssl pkcs12 -in *.p12 -out cert.pem -nodes
以及尝试使用openssl命令的标志,但无法弄清楚如何执行此操作。
答案 0 :(得分:0)
这一个班轮对我有用 -
openssl pkcs12 -in certificate.p12 -password pass:<your_password> -nodes | openssl x509 -noout -enddate