简体   繁体   English

带有 Mono XSP4 的 SSL 证书

[英]SSL Certs with Mono XSP4

I've been developing a v. small ASP web site using Mono XSP4.我一直在开发一个使用 Mono XSP4 的小型 ASP 网站。 For development & test I've used some self-signed certificates, created using makecert and following instructions on http://www.mono-project.com/docs/web/using-clientcertificates-with-xsp/ amongst other places.对于开发和测试,我使用了一些自签名证书,这些证书是使用 makecert 创建的,并遵循http://www.mono-project.com/docs/web/using-clientcertificates-with-xsp/等地方的说明。 All has been well in this world for a good while.在这个世界上,一切都已经好一阵子了。

I'd like now to deploy using a CA cert, which I had created using openssl, following instruction on my CA's web site.我现在想按照我的 CA 网站上的说明,使用我使用 openssl 创建的 CA 证书进行部署。 The openssl command created a CSR, and a private key. openssl 命令创建了一个 CSR 和一个私钥。 The command I used was as follows:我使用的命令如下:

openssl req -new -newkey rsa:2048 -nodes -keyout .key -out .csr openssl req -new -newkey rsa:2048 -nodes -keyout .key -out .csr

I've been through the process of creating the cert with my CA, using the CSR to generate a new .crt file.我已经完成了使用我的 CA 创建证书的过程,使用 CSR 生成一个新的 .crt 文件。 I've now tried running up XSP4 with the new .crt and the private key I generated in the CSR generation step with OpenSSL, and....well, XSP4 is spitting the dummy.我现在已经尝试使用新的 .crt 和我在使用 OpenSSL 的 CSR 生成步骤中生成的私钥来运行 XSP4,并且....好吧,XSP4 正在吐痰。

I'm getting the error "Invalid private key password or private key file '.key' is corrupt".我收到错误“无效的私钥密码或私钥文件‘.key’已损坏”。

I'm running XSP as follows:我正在按如下方式运行 XSP:

xsp4 --nonstop --https --port= --cert=.crt --pkfile=.key --pkpwd= xsp4 --nonstop --https --port= --cert=.crt --pkfile=.key --pkpwd=

Any ideas why this might fail?任何想法为什么这可能会失败?

Does Mono XSP4 support 2048 bit certs? Mono XSP4 是否支持 2048 位证书?

Thanks in advance....!提前致谢....!

It turns out that Mono XSP4 needed the private key in Microsoft PVK binary format.事实证明,Mono XSP4 需要 Microsoft PVK 二进制格式的私钥。 I used OpenSSL to convert the private key in PEM format to PVK format and XSP4 then loaded this OK.我使用 OpenSSL 将 PEM 格式的私钥转换为 PVK 格式和 XSP4,然后加载此 OK。

The OpenSSL command I got from a Microsoft TechNet Q&A ( https://social.technet.microsoft.com/Forums/windowsserver/en-US/85b2b79e-7c39-4b58-8e1e-9855a3af09f6/export-a-private-key?forum=winserversecurity )我从 Microsoft TechNet 问答 ( https://social.technet.microsoft.com/Forums/windowsserver/en-US/85b2b79e-7c39-4b58-8e1e-9855a3af09f6/export-a-private-key?forum) 中获得的 OpenSSL 命令=winserversecurity )

openssl rsa -in FILENAME_key.pem -outform PVK -pvk-strong -out FILENAME.pvk openssl rsa -in FILENAME_key.pem -outform PVK -pvk-strong -out FILENAME.pvk

Hope this helps anyone out there with a similar issue!!希望这可以帮助任何有类似问题的人!! Cheers.干杯。

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

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