简体   繁体   English

从明文 cer 和 pem 文件创建 PFX 文件

[英]Creating a PFX file from clear text cer and pem files

I have downloaded the latest openSSL, and have two files, a cer file and a pem file, both in clear text.我下载了最新的openSSL,有两个文件,一个cer文件和一个pem文件,都是明文的。

pem file:文件:

Subject: CN=subdomain.domain.com,OU=User,O=ORC PKI,C=US Issuer: CN=IssueName NFI CA 6,O=ORC PKI,C=US -----BEGIN CERTIFICATE----- text -----END CERTIFICATE-----主题:CN=subdomain.domain.com,OU=User,O=ORC PKI,C=US Issuer: CN=IssueName NFI CA 6,O=ORC PKI,C=US -----BEGIN CERTIFICATE---- - 文本 -----证书结束-----

cer file: cer文件:

-----BEGIN CERTIFICATE----- text -----END CERTIFICATE----- -----BEGIN CERTIFICATE----- 文本 -----END CERTIFICATE-----

I need to convert these into a single.pfx file so I can sign documents, but I've tried a number of variants suggested in other questions, and they give me errors.我需要将它们转换成一个 single.pfx 文件,以便我可以签署文件,但我已经尝试了其他问题中建议的许多变体,但它们给了我错误。 Does anyone have any idea how to make this work?有谁知道如何使这项工作?

Joshua Sharf约书亚沙夫

Among the things I've tried:在我尝试过的事情中:

openssl pkcs12 -export -out domain.pfx -inkey domain.cer.txt -in domain.pem.txt openssl pkcs12 -export -out domain.pfx -inkey domain.cer.txt -in domain.pem.txt

Stripping the Subject & Issuer information from the pem.txt file Reversing.pem and.cer between the -inkey and -in从 pem.txt 文件中剥离 Subject & Issuer 信息 Reversing.pem and.cer between the -inkey and -in

None of these works.这些都不起作用。

I need to convert these into a single.pfx file so I can sign documents, ...我需要将它们转换成一个 single.pfx 文件,以便我可以签署文件,...

Based on your question your have two certificates ( ... BEGIN CERTIFICATE... ) but no private key.根据您的问题,您有两个证书( ... BEGIN CERTIFICATE... )但没有私钥。 But for signing a private key is needed, which you don't provide.但是需要私钥签名,但您没有提供。 That's why it cannot work.这就是它无法工作的原因。

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

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