Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I detect browser's TLS Version via Code?

I want to show some warning message on browsers which has the TLS version 1.0 or older. How will I determine the TLS Version of Browser via Code ? I can have access to User Agent String. I don't think it's mentioned there.

Link to TLS Version for all the major browsers. Please refer the Table.

Thanks in advance !!!

like image 743
Abhii Avatar asked Feb 23 '18 10:02

Abhii


People also ask

How do I know if my browser is using TLS 1.2 Chrome?

To check if your browser can handle TLS v1. 2, select https://www.ssllabs.com/ssltest/viewMyClient.html to open the SSL/TLS Capabilities of Your Browser web page. Once the page completes the test, scroll down to the Protocol Features section.

How can I tell if a website is TLS 1.2 enabled?

Go to the DigiCert SSLTools website. Click “Check SSL/TLS. Once it's done checking, click “Details” and then “Server Configuration”. In the top-left corner of the results, it should say “Protocols enabled” and under that, you will hopefully see “TLS1.


1 Answers

The TLS parameters are negotiated during the TLS handshake (when you initially connect to the site) and depend on the browser and server capabilities.

I don't believe browsers offer ways to programmatically query this information. Nor do I think your site should be warning users about the TLS connection. This is really the job of the browser. Why should users trust your site to correctly display that information?

All modern browsers allow users to inspect the TLS parameters of the connection. Chrome for example shows this info in the security tab under developers tools.

Your best option is to disable insecure TLS versions on the server.

Having said that, you could of course build code server side to expose this information or subscribe to something like https://www.howsmyssl.com/s/api.html which does this for you.

like image 75
MvdD Avatar answered Sep 30 '22 03:09

MvdD