我正在尝试在 Windows 上生成 pcks12 文件。我看不出在 Windows 7 64 位上以管理员身份运行的命令有什么问题。所有输入文件都存在。或者我收到用法或错误“无法加载私钥 5712:error:0906D06C:PEM 例程”。
非常感谢您的帮助!Bert
openssl pkcs12 -export -in c:\opensslkeys\server.crt -inkey c:\opensslkeys\rsakpubcert.key -keysig -out C:\opensslkeys\mypublicencryptionkey.p12
Usage: pkcs12 [options]
where options are
-export output PKCS12 file
-chain add certificate chain
-inkey file private key if not infile
-certfile f add all certs in f
-CApath arg - PEM format directory of CA's
-CAfile arg - PEM format file of CA's
-name "name" use name as friendly name
-caname "nm" use nm as CA friendly name (can be used more than once).
-in infile input filename
-out outfile output filename
-noout don't output anything, just verify.
-nomacver don't verify MAC.
-nocerts don't output certificates.
-clcerts only output client certificates.
-cacerts only output CA certificates.
-nokeys don't output private keys.
-info give info about PKCS#12 structure.
-des encrypt private keys with DES
-des3 encrypt private keys with triple DES (default)
-idea encrypt private keys with idea
-seed encrypt private keys with seed
答案1
好的,明白了!我混淆了密钥,-keysig 不再需要。正确的命令是:
openssl pkcs12 -export -in c:\opensslkeys\server.crt -inkey c:\opensslkeys\rsakprivnopassword.key -out c:\opensslkeys\mypublicencryptionkey.p12