gpt4 book ai didi

c# - 如何在 .NET 中对每次调用进行证书固定?

转载 作者:太空宇宙 更新时间:2023-11-03 12:48:56 27 4
gpt4 key购买 nike

我知道我可以在全局范围内使用 ServicePointManager.ServerCertificateValidationCallback 进行证书固定。所有对 TLS 站点的调用都将使用此回调来检查证书。如何在每次调用的基础上设置证书验证回调?我只想对某些网站进行证书固定。

最佳答案

根据 https://stackoverflow.com/a/3795952/626761 :

As a dirty workaround, you could try executing the sites that require a different security protocol in a new appdomain. Static instances are per appdomain, so that should give you the isolation you need.

关于c# - 如何在 .NET 中对每次调用进行证书固定?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36306365/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com