繁体   English   中英

从 crt 和 pem 文件生成 PFX 文件

[英]Generating PFX file from crt and pem file

我有以下文件:

  • 根.crt
  • 中间1.crt
  • 中级2.crt
  • 私钥.pem

我试图用 openssl 生成一个 pfx 文件

openssl pkcs12 -export -out certificate.pfx -inkey privatekey.pem -in root.crt -certfile intermediate1.crt -certfile intermediate2.crt

这给了我以下错误:

No cert in -in file 'root.crt' matches private key
68310000:error:05800074:x509 certificate routines:X509_check_private_key:key values mismatch:crypto\x509\x509_cmp.c:405:

我的私钥有问题吗?

root.crt 与私钥不匹配。 使用正确的crt文件后,它起作用了。

用“-inkey file”指定的私钥应该与用“-in file”指定的证书匹配。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM