简体   繁体   English

从证书和私钥导入证书到windows

[英]Import certificates into windows from certificate and private key

I am having an issue importing a certificate into windows, its a one off requirement and something that I have little experience with, I have been provided a certificate file and a private key file.我在将证书导入 Windows 时遇到问题,这是一次性的要求,而且我几乎没有经验,我已获得证书文件和私钥文件。

I cannot fathom how to import these into windows so that they will be available in ISS to be assigned to a web site.我无法理解如何将这些导入到 windows 中,以便它们在 ISS 中可用以分配给网站。

I have attempted to use open SSL to create a PFX as I know how to import those.. but when I try I get the message我尝试使用开放 SSL 来创建 PFX,因为我知道如何导入它们……但是当我尝试时,我收到了消息

unable to load private key
14828:error:0909006C:PEM routines:get_name:no start line:crypto\pem\pem_lib.c:745:Expecting: ANY PRIVATE KEY

Hopefully this will give some indication of the file formats, the header in the PK is -希望这将给出文件格式的一些指示,PK 中的标题是 -

----BEGIN PRIVATE KEY----- ----开始私钥-----

And the header in the crt file is crt文件中的标题是

-----BEGIN CERTIFICATE----- -----开始认证-----

What am I missing?我错过了什么?

Figured it out.弄清楚了。

Somewhere between being issued and sent to me, someone has opened the file and re-saved it changing the encoding.在发布和发送给我之间的某个地方,有人打开了文件并重新保存了它,更改了编码。

Opened the file in notepad++ changed the encoding to ANSI, saved and re-ran the openssl command and its exported the PFX.在记事本++中打开文件将编码更改为ANSI,保存并重新运行openssl命令并导出PFX。

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

相关问题 使用Windows证书存储区中的证书和私钥与OpenSSL - Using certificate and private key from Windows cert store with OpenSSL Windows证书库中的私钥安全性 - Private key security in windows certificate store 如何从SSL证书创建私钥? - How to create private key from SSL certificate? 从 pfx 文件或证书存储中提取私钥,而无需在 Windows 上使用 OpenSSL - Extract private key from pfx file or certificate store WITHOUT using OpenSSL on Windows 如何导入pfx证书并为所有用户设置私钥权限 - How to import pfx certificate and set private key permissions for all users 在 Windows 上运行 NodeJS 的 Web 请求中包含带有证书的私钥 - Include Private Key With Certificate in web request running NodeJS on Windows 由于私钥过滤,signtool无法在Windows 10上找到证书 - signtool fails to find certificate on Windows 10, due to private key filter 如何将 OpenSSL 密钥文件导入 Windows 证书存储 - How to import an OpenSSL key file into the Windows Certificate Store 如何从证书和私钥创建.pfx 文件? - How to create .pfx file from certificate and private key? 如何将 Git 配置为信任来自 Windows 证书存储的证书? - How do I configure Git to trust certificates from the Windows Certificate Store?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM