c# - 请求被中止 : Could not create SSL/TLS secure channel - SecurityProtocol behavior

标签 c# .net ssl-certificate ssl

将证书安装到受信任的根证书颁发机构本地计算机 存储后,.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;

它仍然工作正常。我有两个问题:

  1. 为什么它仍然有效?有缓存吗?

  2. 以及为什么它以前只使用标志 Ssl3 而不是 同时使用 Ssl3Tls

最佳答案

有 SSL/TLS session 恢复,可能是您的情况。 也许您没有共享 TLS1 密码套件。 最好的检查方法是运行 Wireshark,并查看连接的 SSL 数据包,Wireshark 中对它们进行了很好的解释。

关于c# - 请求被中止 : Could not create SSL/TLS secure channel - SecurityProtocol behavior,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13930384/

相关文章:

c# - 方法或操作未实现

c# - 为什么 Environment.CommandLine.Trim ('"') 不删除尾随引号?

.net - Visual Studio 监 window 口查看对象的大小/内存占用

c# - 无法加载计数器名称数据,因为索引无效 - 异常

xcode - 如何使用苹果推送通知?

web-services - 为 IIS 应用程序池帐户安装客户端证书

c# - 如何从http header 获取文件大小

c# - MemoryStream 是否在构建时复制?

c# - 在 C# 中允许用户仅输入某些数字,仅整数?

python - 在 python 中跳过 quandl 的 ssl 验证