我正在尝试使用openssl将多个证书加载为PKCS12格式。命令如下:
openssl pkcs12 -export -in cert1.arm -inkey cert1_private_key.pem -certfile cert2.arm -certfile cert3.arm -certfile RootCert.pem -name "Test" -out test.p12
解析了生成的PKCS12文件后,仅最后一个证书已包含在文件中:
openssl pkcs12 -in test.p12 -info -nodes
我还尝试将它们分别导入pkcs12文件,而在所有尝试中,仅最后一个证书保留在文件中。
知道要解决的问题在哪里吗?
首先,确保所有证书均为PEM格式。然后,制作一个名为“ certs.pem”的单一文件,其中包含其余证书(cert2.arm,cert3.arm和RootCert.pem)。
然后使用如下命令:
openssl pkcs12 -export -in cert1.arm -inkey cert1_private_key.pem -certfile certs.pem -name "Test" -out test.p12
该OpenSSL的PKCS12文档解释了不同的选择。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句