CRL 无法通过 http 代理工作

CRL not working over http proxy

这是我的情况。

client -> http proxy -> remote web server

LDAP 端口和 HTTP 端口在客户端的防火墙上被阻止。

发送请求时,客户端必须检查远程 Web 服务器证书的 CRL 以验证其来源。

我们确实设置了 ServicePointManager.CheckCertificateRevocationList = true; 来做到这一点,它在没有代理的设置中工作正常。使用代理,我们得到以下错误:

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

服务器 CRL 文件可通过 IE 在相同设置中访问。

我环顾四周,但一无所获。

所以基本上,我通过实验找到了答案。

如果您希望您的 CRL 通过代理工作:

  1. 您可能想为您的应用程序的连接设置代理(我们已经设置了,所以这不是真正的问题)。
  2. 您需要设置 netsh winhttp 代理,指向您的代理(在 netsh winhttp 控制台中使用 set proxy myproxy:proxyport