Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
961 views
in Technique[技术] by (71.8m points)

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

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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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_MACHINESYSTEMCurrentControlSetControlSecurityProvidersSchannelProtocolsTLS 1.1] 
[HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlSecurityProvidersSchannelProtocolsTLS 1.1Client]
"DisabledByDefault"=dword:00000000
[HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlSecurityProvidersSchannelProtocolsTLS 1.1Server]
"DisabledByDefault"=dword:00000000
[HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlSecurityProvidersSchannelProtocolsTLS 1.2] 
[HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlSecurityProvidersSchannelProtocolsTLS 1.2Client]
"DisabledByDefault"=dword:00000000
[HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlSecurityProvidersSchannelProtocolsTLS 1.2Server]
"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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

57.0k users

...