简体   繁体   English

在.NET中使用SSL时,我需要什么证书?

[英]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.

相关问题 我需要什么SSL证书? - What SSL certificate do I need? 除了证书,我还需要SSL吗? - What do i need for SSL besides a certificate? 我需要通过heroku服务器和iOS应用程序购买SSL证书。 我究竟需要什么? - I need to purchase an SSL certificate to use through a heroku server and iOS app. What exactly do I need? 我的软件应该与未来的SSL证书有什么关系? - What is my software supposed to do with a SSL certificate from the future? 如果我使用Cloudflare的“完整SSL”,是否需要为Heroku购买另一个SSL证书? - If I use Cloudflare's “Full SSL”, do I need to buy another SSL certificate for Heroku? 用贝宝付款,我需要ssl证书吗 - pay with paypal, do I need ssl certificate 如果域重定向,我是否需要SSL证书? - Do I need a SSL certificate for a domain if it redirects? 我在哪里需要SSL证书? - Where do I need an SSL certificate? 我是否需要修改这个mod重写代码,如果我添加SSL证书到我的服务器? - Do I need to modify this mod-rewrite code if I add an SSL certificate to my server? 即使我使用 SSL 配置了我的服务器,我是否需要将客户端证书发送到另一台服务器 - Do I need to send the client certificate to another server even if I configured my server with SSL
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM