我已經提供了一些使用OpenSSL創建.pfx文件的命令。在大多數情況下,我的合作伙伴,從收集的信息:Is it possible to convert an SSL certificate from a .key file to a .pfx?使用OpenSSL創建.pfx文件
我有以下文件:
- 2010certificate.cer
- 2010cert_and_key.pem
- private_verisign10to11.key
我試圖用以下兩種方法生成:
openssl pkcs12 -export -out s2010-1.pfx -inkey private_verisign10to11.key -in 2010cert_and_key.pem -certfile 2010certificate.cer
and
openssl pkcs12 -export -out s2010-1.pfx -inkey private_verisign10to11.key -in 2010certificate.cer -certfile 2010cert_and_key.pem
在這種情況下不會引發錯誤,但是當我嘗試查看或導入生成的文件s2010-1.pfx時,Protecle說它無法打開它。密鑰工具說:
keytool -import -file s2010-1.pfx x -keystore cacerts -alias fqdn -storepass <.pfx's pass word>
keytool error: java.lang.Exception: Input not an X.509 certificate
我假設的問題是與.PFX一代,但我真的不知道如何測試,直到keytool命令。任何關於在這裏做什麼的建議都會很棒。
Java可以治療PKCS12 _as_一個密鑰,但[8u60之前(以2015)(http://www.oracle.com/technetwork/java/javase/8u60-relnotes-2620227.html),你必須指定它:'keytool -list -keystore whatever.pfx -storetype pkcs12 ' – 2017-08-19 18:54:40