
[英]C# application could not establish trust relationship for the SSL/TLS secure channel
[英]Question: C# API Could not establish trust relationship for the SSL/TLS secure channel
在调用 API 时,我刚刚收到以下错误。 “无法为 SSL/TLS 安全通道建立信任关系”
我用 RemoteCertificateValidationCallback class 修复了它:
ServicePointManager.ServerCertificateValidationCallback +=
new RemoteCertificateValidationCallback(Helpers.CertificateHelper.ValidateCertificates);
我刚刚应用了这里找到的一段代码: 如何在不导入根证书的情况下验证 X509 证书?
现在它工作正常,但是..这是通往 go 的方式吗? 可以吗,还是我不应该使用这种方法?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.