简体   繁体   English

无论使用TLS 1.1的.net代码如何,都使用TLS 1.2

[英]TLS 1.2 being used regardless of .net code using TLS 1.1

I'm trying to confirm that my application is connecting to SQL server using TLS 1.2. 我试图确认我的应用程序正在使用TLS 1.2连接到SQL Server。 I am able to see that it's connecting using 1.2 using Wire Shark, but I want to confirm that when I switch back to 1.1 it shows 1.1. 我能够看到它使用Wire Shark使用1.2连接,但是我想确认一下,当我切换回1.1时,它显示为1.1。 However, when I switch to 1.1 in my code, it still shows TLS 1.2 in Wireshark. 但是,当我在代码中切换到1.1时,Wireshark中仍显示TLS 1.2。 Why is TLS 1.2 being used regardless? 为什么无论如何都使用TLS 1.2? I'm afraid that it's always showing TLS 1.2 just for the handshake, but it's not actually connecting with TLS 1.2. 恐怕它总是仅在握手时显示TLS 1.2,但实际上并没有与TLS 1.2连接。 It's also not showing server hello in the Windows Network Analyzer, like I read in other Stack Overflow posts. 就像我在其他Stack Overflow帖子中读到的一样,它也没有在Windows网络分析器中显示服务器问候。 It is only showing the Client hello. 它仅显示客户端问候。 Is the server hello necessary? 服务器问好是否必要? Since it's using TDS, I'm not sure if the server hello is supposed to be there. 由于它使用的是TDS,因此我不确定服务器是否应该在那里。

//when I use this code, it shows as using tls 1.2 in Wire Shark //当我使用此代码时,它显示为在Wire Shark中使用tls 1.2

ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls11; ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls11;

Changing C# TLS versions manually to lower number sets the minimum requirement. 手动将C#TLS版本更改为较低的数字可设置最低要求。 You will be nudged up to whatever the highest version you have set up on the client machine that is making the connection. 您将被带到建立连接的客户端计算机上的最高版本。 For example, if you have TLS 1.2 then setting TLS 1.1 on the C# client will not necessarily use 1.1 but rather 1.2. 例如,如果您具有TLS 1.2,则在C#客户端上设置TLS 1.1不一定会使用1.1,而是使用1.2。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM