.net - 无法为 SSL/TLS : how to enable TLS on windows server 2008 建立安全通道

标签 .net soap ssl

这个问题与an answer on another question有关. 答案正确的人写道:在我们的案例中,当目标服务器上的配置更改为接受 TLS 时,问题得到解决。

在评论中,我问他是否可以更具体地说明如何实现这一点。 John Saunders 建议我为此提出一个单独的问题。所以这里是:

如何在 Windows 2008 上启用 TLS? 我根据 this 更改了注册表, 重新启动服务器。我正在努力解决的错误仍然存​​在。我还需要做些什么来启用 TLS 吗?

最佳答案

Windows Server (WS) 2008 应该默认启用 TLS 1.0,因此我假设客户端需要更新的 TLS 版本。 WS 2008 R2 中引入了对更新的 TLS 协议(protocol)版本 TLS 1.1 和 TLS 1.2 的支持,但默认情况下它们处于禁用状态。在 WS 2012 中,默认启用 TLS 1.1 和 TLS 1.2。

如果客户端需要 TLS 1.1 或 TLS 1.2,您必须升级到 WS 2008 R2 或更新版本。您可以在 WS 2008 R2 中手动启用 TLS 1.1 和 TLS 1.2。在这种情况下,您需要添加一些注册表设置,记录在 How to restrict the use of certain cryptographic algorithms and protocols in Schannel.dll 中。 .相关条目是:

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\Schannel\Protocols\TLS 1.1] 
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\Schannel\Protocols\TLS 1.1\Client]
"DisabledByDefault"=dword:00000000
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\Schannel\Protocols\TLS 1.1\Server]
"DisabledByDefault"=dword:00000000
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\Schannel\Protocols\TLS 1.2] 
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\Schannel\Protocols\TLS 1.2\Client]
"DisabledByDefault"=dword:00000000
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\Schannel\Protocols\TLS 1.2\Server]
"DisabledByDefault"=dword:00000000

您需要重新启动才能使更改生效。

如果您升级到 WS 2012,您将默认获得 TLS 1.1/1.2。您可以在我关于 Hardening Windows Server 2008/2012 and Azure SSL/TLS configuration 的博客文章中找到有关 TLS 配置的更多详细信息。 .

关于.net - 无法为 SSL/TLS : how to enable TLS on windows server 2008 建立安全通道,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9800947/

相关文章:

.net - 我可以将 WPF TreeView 绑定(bind)到单个根节点吗?

c# - 安装TXTextControl后编译报错

java - Talend Open Studio 将作业导出为 Web 服务并在不带 URL 参数的情况下调用它

ssl - GitLab 的 Jenkins 身份验证失败

重新生成 key 操作后 Azure SSL 证书不同步

为索引 0 插入优化的 C# 集合?

c# - 使用 PSS 填充的 .net RSA 签名数据错误

soap - 当 SSL 终止后,WSDL 绑定(bind) URL 将协议(protocol)更改为 HTTP

testing - Soap Web 服务测试应用程序的建议

ssl - SSL/TLS 重新协商的目的是什么?