What version of TLS does my C# program use?

扶醉桌前 提交于 2019-12-04 03:43:49

I got the answer by directing my program to make requests to https://www.howsmyssl.com/a/check.

Panagiotis Kanavos

TLS 1.2 was added in .NET 4.5. The earliest supported .NET version is 4.5.2, so you won't have any issues if you use a supported version.

.NET 4.6 uses TLS 1.2 by default. Earlier versions need this line to enable it :

ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 | 
                                       SecurityProtocolType.Tls11;

TLS 1.0 is being phased out and SSL v3 is considered broken so they shouldn't be added.

Another good way to check is to install WireShark (https://www.wireshark.org/download.html)

and to use it while running your application. within the TLS Packets you will be able to see versions and such:

Example for Wireshark View Of TLS traffic...

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