如何从任意 HTTPS URL 获取 X509Certificate?
我正在使用 HttpWebRequest
从任意 HTTPS URL 提取页面。 除了实际的页面结果之外,我还想获取我刚刚与之交谈的远程服务器的 X509Certificate2
实例。 我确信公共证书位于计算机上的某个位置,因为它的链必须作为请求的一部分进行验证。 我怎样才能访问它?
另外,如何确保 SSL 通道中使用的密码套件不仅仅是空密码套件? 我需要确保确实进行了适当的加密。
I'm using HttpWebRequest
to pull a page from an arbitrary HTTPS URL. In addition to the actual page result, I want to get an X509Certificate2
instance for the remote server I just talked to. I'm sure the public certificate is on the computer somewhere because its chain had to be validated as part of the request. How can I get access to it?
Also, how can I make sure that the ciphersuite used in the SSL channel isn't simply the null ciphersuite? I need to make sure that decent encryption is actually occurring.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
哦! (废话)
但这并没有回答问题的密码套件部分,所以如果有人可以回答它,它仍然是开放的。 :)
Oh! (duh)
But this doesn't answer the ciphersuite part of the question, so that's still open if anyone can answer it. :)