无法为SSL / TLS建立安全通道:如何在Windows Server 2008上启用TLS

时间:2012-03-21 08:26:21

标签: .net soap ssl

此问题与an answer on another question有关。 答案正确的人写道:In our case, the problem was resolved when the configuration on the destination server was changed to accept TLS.

在评论中,我问他是否可以更具体地说明如何实现这一目标。约翰桑德斯建议我为此另外提出一个问题。所以这就是:

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

1 个答案:

答案 0 :(得分:1)

默认情况下,应在Windows Server(WS)2008上启用TLS 1.0,因此我假设客户端需要更新的TLS版本。 WS 2008 R2中引入了对较新的TLS协议版本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配置的更多详细信息。