在没有导出密码的情况下导出 PKCS#12 文件? [英] Export a PKCS#12 file without an export password?
问题描述
我正在生成导出一些 pkcs#12 文件用于测试目的.这些文件不在生产中使用,仅在自动化测试期间临时存在.
I am generating exporting some pkcs#12 files for testing purposes. These files are not being used in production and only exist temporary during automated testing.
我正在使用以下命令:
openssl pkcs12 -export -nodes -out bundle.pfx -inkey mykey.key -in certificate.crt -certfile ca-cert.crt
当我包含-nodes
时,为什么它坚持要导出密码?
Why is it insisting on an export password when I have included -nodes
?
我的 OpenSSL 版本是 OpenSSL 1.0.1f 2014 年 1 月 6 日
,在 Ubuntu Server 14.10 64 位上.
My OpenSSL version is OpenSSL 1.0.1f 6 Jan 2014
on Ubuntu Server 14.10 64-bit.
推荐答案
交互模式下,提示输入密码,直接回车,不会设置密码.
In interactive mode, when it prompts for a password, just press enter and there will be no password set.
如果您想自动化(例如作为 ansible 命令),请使用 -passout
参数.它期望参数采用 pass:mypassword
形式.因为我们不需要密码:
If you are want to automate that (for example as an ansible command), use the -passout
argument. It expects the parameter to be in the form pass:mypassword
. Since we want no password:
openssl pkcs12 -export -nodes -out bundle.pfx -inkey mykey.key
-in certificate.crt -certfile ca-cert.crt
-passout pass:
这篇关于在没有导出密码的情况下导出 PKCS#12 文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!