TLS or Transport Layer Security is an encryption protocol. It is designed such that communication through TLS remains secure and private. In this post, I will explain what TLS handshake is and how to fix the TLS handshake if you face issues.
Before we go ahead and talk about the TLS handshake, let’s understand when TLS occurs. Every time you access a website or application over HTTPS, TLS is used. When you access emails, messages, and even VOIP, it uses TLS. You should know that HTTPS is an implementation of TLS encryption.
What is TLS handshake
A handshake is a form of negotiation between two ends. Just like when we meet people, we shake hands, and then go ahead with anything else. On similar lines, the TLS handshake is a form of acknowledgment between two servers.
During the TLS handshake, the servers verify each other and establish encryption, and also exchange keys. If everything is authentic, and as expected, more data exchange will take place. There are four major steps:
- Specify which version of TLS will be used for communication.
- Choose which encryption algorithms will be used
- Authenticity is verified using public key and the SSL certificate authority’s digital signature
- Session keys are generated and exchanged
In layman’s word, they first say hello, then the server offers a certificate that the client needs to verify. Once the verification is complete, a session is generated. A key is created through which data is exchanged through the session.
Read: Difference between TLS and SSL encryption methods.
How to fix TLS Handshake Failed
You cannot do anything if there is a server-side issue – but you are having a problem with the browser, it can be fixed. For example, if the server offers a certificate that cannot be authenticated, then you cannot do anything about it. However, if the problem is a mismatch of the TLS protocol, then you can change it from the browser.
- Check if the system time is correct
- Check for Man in the middle problem
- Change TLS Protocol in Windows
- Delete Browser Profile or Certificate Database
- Reset Browser.
There are many more reasons why the TLS handshake can fail, and it depends on the scenario. So here some ways to fix TLS, but before that, always use these rules to filter out the problem.
- Check with different sites, and if the problem remains.
- Switch to multiple network connections, i.e., WiFi or Wired
- Change network, i.e., connect to a mobile hotspot or different router or even try a public network
1] Check if the system time is correct
It is the top reason why the TLS handshake has failed most of the time. The system time is used to test whether the certificate valid or expired. If there is a mismatch between the time on your computer and the server, it can make certificates look expired. Fix the time by setting it to automatic.
Now visit the website again, and check if has fixed the TLS handshake
2] Man in the middle problem
There is one rule if it’s happening for one site, then its security software problem, but if it’s happening for all the websites, then its a system problem.
The security software or browser extension on your computer may be intercepting the TLS connections and changing something which results in problematic TSL handshake. It is also possible that a virus on the system is causing all the TLS problem.
Some browser extensions change proxy settings, and it may cause this problem.
In either case, you need to fix your computer or security software. The best way to further verify this is by using another computer and open the same website or application, which was causing the problem.
3] Change TLS Protocol in Windows
Windows 10 and earlier versions of Windows centralize the protocol settings in the system. If you need to change the TLS version, you can do it using Internet Properties.
- Type inetcpl.cpl in the Run prompt and hit Enter key.
- Once the Internet properties window opens, switch to the Advanced tab.
- Scroll to the end to find the Security section, and here you can add or remove TLS.
- If the website is looking for TLS 1.2, and it is not checked, you need to check it. Similarly, if someone is experimenting with TLS 1.3, you need to check it.
- Apply to save, and try opening the same website again.
While Chrome, IE, and Edge use Windows features, Firefox, like its certificate database, manages on its own. Here is how to change the TLS protocol in Firefox:
- Open Firefox, type about:config and press Enter
- In the search box, type TLS, and locate security.tls.version.min
- You can change it to:
- 1 and 2 to force TLS 1 and 1.1
- 3 to force TLS 1.2
- 4 to force a maximum protocol of TLS 1.3.
Read: How to disable TLS 1.0.
4] Delete Browser Profile or Certificate Database
Every browser maintains a database for certificates. For example, every Firefox profile has a cert8.db file. If you delete that file, and a restart fixes it, then the issue is related to the local certificate database.
Similarly, in Windows, when using IE or Edge, the Certificate Manager is responsible, or you can go to the edge://settings/privacy and click on Manage HTTPS/SSL certificates and settings. Delete certificates and try again
If you cannot find the database, delete the profile, and try again.
4] Reset Browser
It’s the last resort if you are having an issue with one of the browsers. You can choose to uninstall completely and then reinstall or reset the browser using the inbuilt feature. Follow the links to reset Chrome, Microsoft Edge, and Firefox.
Lastly, while you can browse a website even if the certificate is invalid, make sure not to perform any kind of transaction with the website. Neither you should use a credit card, nor you should enter your account password.
How do I fix TLS handshake failure?
To fix the TLS handshake failure issue on your browser, you need to check your date and time settings first. Then, you might need to clear your browser cache and update your browser to the latest version. Apart from that, you can disable your browser extensions and check if it resolves the issue or not. Next, you can disable the antivirus and firewall temporarily.
What happens if TLS handshake failed?
TLS handshake failure defines that you are not able to access a particular website. As it is responsible for establishing a connection between your computer and the server, you cannot access a website when a TLS handshake fails to establish the connection. As there could be several reasons that cause this problem, you need to go through the aforementioned tips and tricks to get it fixed.
We hope these tips were easy to follow, and that you were able to resolve the TLS issue on your browser or your computer. I have tried my best to offer you enough solutions, but honestly, TLS is extremely vast, and more solutions may be available.