【发布时间】:2022-08-16 13:47:48
【问题描述】:
我有以下文件:
- root.crt
- intermediate1.crt
- intermediate2.crt
- privatekey.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:
我的私钥有问题吗?
-
privatekey.pem 是否对应 root.crt?使用 -inkey <file> 指定的私钥应与使用 -in <file> 指定的证书匹配。
-
@SujayKumar 是的,私钥与 crt 文件不匹配
标签: openssl certificate pfx