开发者

How to process custom certificates in HTTPS?

I am trying to fetch a page using HttpWebRequest, but I am getting this exception:

Could not establish trust relationship for the SSL/TLS secure channel.

Is it possible to specify a custom RemoteCertificateValidationCallback for a particular instance of HttpWebRequest?

(I cannot use ServicePointManager.ServerCertificateValidationCallback, sinc开发者_如何学Pythone my code is part of a library.)


I cannot use ServicePointManager.ServerCertificateValidationCallback, since my code is part of a library

Do this, but filter calls to the delegate based on sender?

Update: Based on feedback: It might be necessary to spin up an AppDomain to do this (which will avoid interference with other things happening in the same process).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜