question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TLS 1.1 and 1.2 support

See original GitHub issue

I found TcpSocketClient cannot establish TLS 1.1 and TLS 1.2 secured connections. I trace down the code and found this piece of code which might limit how I could establish the secured connection:

if (secure)
{
    var secureStream = new SslStream(_writeStream, true, (sender, cert, chain, sslPolicy) => ServerValidationCallback(sender, cert, chain, sslPolicy));

    // `System.Security.Authentication.SslProtocols.Tls` bellow specifies I could only use TLSv1.0
    secureStream.AuthenticateAsClient(address, null, System.Security.Authentication.SslProtocols.Tls, false);

    _secureStream = secureStream;
} 

I guess the reason that we only specify SslProtocols.Tls is that in previous versions, the highest .net support is Tls.

However I was wondering if we could change the code to secureStream.AuthenticateAsClient(address); or secureStream.AuthenticateAsClient(address, null, SslProtocols.Tls | SslProtocols.Tls1.1 | SslProtocols.Tls1.2, false); to make it working with tls1.1 and tls1.2 too.

In .net 4.6, AuthenticateAsClient(address) will default to use “default protocol”. While in previous versions such as 3.5, it will default to SslProtocols.Default. However my knowledge of nuget is not good enough to understand if your lib compiled targeting to say framework 3.5, but I import to 4.6, whether the code will compile against my 4.6 system lib or not. (whether it keep using SslProcols.Default or it will pick up the “default protocol”)

All in all, can we make TcpSocketClient to support TLS 1.1 and TLS 1.2 too?

Issue Analytics

  • State:open
  • Created 7 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
ghostcommented, Oct 12, 2016

Is there any update on this issue ? Or somebody has found a way to go around this maybe ? Thanks a lot,

0reactions
KB4MDDcommented, Apr 24, 2018

I have a need to use TLS 1.2 also.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Update to enable TLS 1.1 and TLS 1.2 as default secure ...
This update provides support for Transport Layer Security (TLS) 1.1 and TLS 1.2 in Windows Server 2012, Windows 7 Service Pack 1 (SP1),...
Read more >
What Is TLS 1.2, and Why Should You (Still) Care?
As previously mentioned, as of the end of 2020, TLS versions 1.0 and 1.1 are no longer supported. That means that websites that...
Read more >
TLS 1.2 vs TLS 1.1 - KeyCDN Support
TLS 1.2 is faster than TLS 1.1 due to several improvements in the protocol. TLS 1.2 reduces the number of round trips required...
Read more >
Transport Layer Security
Transport Layer Security (TLS) is a cryptographic protocol designed to provide communications security over a computer network. The protocol is widely used ...
Read more >
TLS 1.2 | Can I use... Support tables for HTML5, CSS3, etc
"Can I use" provides up-to-date browser support tables for support of front-end web technologies on desktop and mobile web browsers.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found