Could not establish secure channel for SSL/TLS: how to enable TLS on windows server 2008

亡梦爱人 提交于 2020-01-02 11:15:10

问题


This question is related to an answer on another question. The person with the correct answer writes: In our case, the problem was resolved when the configuration on the destination server was changed to accept TLS.

In a comment I asked if he could be more specific on how to achieve that. John Saunders suggested I make a separate question for that. So here it is:

How does one enable TLS on windows 2008? I made registry changes based on this, restarted the server. The error I'm struggling with persists. Is there anything else I need to do to enable TLS?


回答1:


TLS 1.0 should be enabled by default on Windows Server (WS) 2008 so I assume the client requires a newer TLS version. Support for the newer TLS protocol versions, TLS 1.1 and TLS 1.2, were introduced in WS 2008 R2 but they're disabled by default. In WS 2012, TLS 1.1 and TLS 1.2 are enabled by default.

If the client needs TLS 1.1 or TLS 1.2, you'll have to upgrade to WS 2008 R2 or newer. You can enable TLS 1.1 and TLS 1.2 in WS 2008 R2 by hand. In that case you'll need to add some registry settings, documented in How to restrict the use of certain cryptographic algorithms and protocols in Schannel.dll. The relevant entries are:

[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

You'll need a reboot for the changes to take effect.

If you upgrade to WS 2012, you'll get TLS 1.1/1.2 by default. You can find more details on TLS configuration in my blog post on Hardening Windows Server 2008/2012 and Azure SSL/TLS configuration.



来源:https://stackoverflow.com/questions/9800947/could-not-establish-secure-channel-for-ssl-tls-how-to-enable-tls-on-windows-ser

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!