Reputation: 295
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 !!!
Upvotes: 6
Views: 1899
Reputation: 23494
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.
Upvotes: 1