[英]What do I need from my certificate to use SSL in .NET?
The server mode SSL must use a certificate with the associated private key.
I have my Base64-encoded .crt file and another huge text file with lots of info, from my certificate provider, which includes the private RSA key in an equivalent format. 我有来自我的证书提供商的Base64编码的.crt文件和另一个包含大量信息的巨大文本文件,其中包括等效格式的RSA私有密钥。
I tried putting that in a .pvk file to later make the .pfx one, and it didn't work. 我尝试将其放入.pvk文件中,以稍后再创建.pfx文件,但是它没有用。 (nice try, right?) (不错,对吧?)
What do I need to actually do to use this certificate to use SSL in my .NET application? 使用此证书在.NET应用程序中使用SSL时,我实际上需要做什么?
Edit : Made a proper .pvk , made the .pfx , still, same error. 编辑 :做了一个适当的.pvk ,做了.pfx ,仍然,同样的错误。
I finally solved this. 我终于解决了。 I had to use System.Security.Cryptography.X509Certificates.X509Certificate2
with the .pfx file. 我必须将System.Security.Cryptography.X509Certificates.X509Certificate2
与.pfx文件一起使用。 The simple X509Certificate
didn't seem to work. 简单的X509Certificate
似乎不起作用。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.