如何从任意 HTTPS URL 获取 X509Certificate?

发布于 2024-07-23 05:37:32 字数 244 浏览 4 评论 0原文

我正在使用 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

£冰雨忧蓝° 2024-07-30 05:37:32

哦! (废话)

HttpWebRequest.ServicePoint.Certificate

但这并没有回答问题的密码套件部分,所以如果有人可以回答它,它仍然是开放的。 :)

Oh! (duh)

HttpWebRequest.ServicePoint.Certificate

But this doesn't answer the ciphersuite part of the question, so that's still open if anyone can answer it. :)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文