【发布时间】:2020-12-14 16:35:45
【问题描述】:
我正在使用 SSL 证书连接到第 3 方服务。我的服务器在防火墙后面运行,阻止了传出流量。应用程序无法验证第 3 方证书。
MailKit.Security.SslHandshakeException: An error occurred while attempting to establish an SSL or TLS connection.
The server's SSL certificate could not be validated for the following reasons:
• The server certificate has the following errors:
• The revocation function was unable to check revocation for the certificate.
• The revocation function was unable to check revocation because the revocation server was offline.
• An intermediate certificate has the following errors:
• The revocation function was unable to check revocation for the certificate.
• The revocation function was unable to check revocation because the revocation server was offline.
我试图用谷歌搜索客户端如何验证证书链,但没有找到。我对应用程序/服务器正在执行其验证查询的端口和地址特别感兴趣。
作为即时修补程序,我必须允许到所有目的地的纯 HTTP 传出流量。
【问题讨论】:
-
OCSP 服务器 URL 写入根证书。必须在那里搜索。
-
OCSP 通常使用纯 HTTP,因此使用端口 80。要使用的 URL 也可能在中间证书中,而不仅仅是根(自签名)证书。
-
听起来你需要turn off revocation checking。 (真的,最好将其设置为软故障,但我没有看到这样做的方法。)
-
@GordonDavisson 我能够管理防火墙规则,不想因为我不知道事情是如何运作而牺牲安全性。