将证书安装到受信任的根证书颁发机构
的本地计算机
存储后,.NET WebRequest
仍然会抛出:
The request was aborted: Could not create SSL/TLS secure channel
ServicePointManager.SecurityProtocol
现在包含 SecurityProtocolType.Ssl3
| SecurityProtocolType.Tls
。
阅读 Simon Dugré 的回答后 https://stackoverflow.com/a/2904963/121968 ,我已经设置:
ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3;
它工作正常。 设置后:
ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3 | SecurityProtocolType.Tls;
它仍然工作正常。我有两个问题:
为什么它仍然有效?有缓存吗?
以及为什么它以前只使用标志
Ssl3
而不是 同时使用Ssl3
和Tls
?
最佳答案
有 SSL/TLS session 恢复,可能是您的情况。 也许您没有共享 TLS1 密码套件。 最好的检查方法是运行 Wireshark,并查看连接的 SSL 数据包,Wireshark 中对它们进行了很好的解释。
关于c# - 请求被中止 : Could not create SSL/TLS secure channel - SecurityProtocol behavior,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13930384/