I develop a C# program in Visual Studio 2013 which communicates with a SOAP webservice. How can I tell which version of TLS my program uses?
3 Answers
I got the answer by directing my program to make requests to https://www.howsmyssl.com/a/check.
2 Comments
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.
5 Comments
.NET TLS 1.2 returns Transport Layer Security (TLS) best practices with the .NET Framework as the first result. Use .NET 4.7 on a supported OS and let your application use the best available TLS version. Even 4.6.2 was a bit of a mess both on TLS and assembly redirects.How can I tell which version of TLS my program uses? and the answer isn't VS 2013. To get TLS 1.2 without code modifications you need 4.6 at least. By that point I had answered that question dozens of times for years and didn't bother posting another full explanation. By that point (like many common questions in SO) just finding a good duplicate would take more time than writing a quick answerAs my production web service calls were communicating with a 3rd party service, I needed an extra proof of which protocol was being used before and after I made the .net version change.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:
8 Comments
SecurityProtocol even though it isn't defined. That was used as a stopgap 2 years ago, when the providers started demanding TLS1.2
ServicePointManager.SecurityProtocolvalue for the supported protocols.