List of content you will read in this article:
SSL handshake request is initiated for a secure connection to a web server. After the request is made, a public key is sent to your computer by the server. Your computer is then tasked to check the certificate against other certificate authorities.
A key is created and encrypted with the server's public key if the certificate is accepted. At this point, the handshake is considered successful.
In another case, however, the handshake fails when the server or client fails to establish a connection through the protocol. When the handshake fails, the connection to the server is rendered insecure. This may affect your communication.
The role of the SSL handshake is to create secure connections for web users providing a safe space for website transactions.
Causes of an SSL Handshake Failed Error
An SSL Handshake Failure error indicates that the browser and server could not establish a secure connection, and the error may appear on both the server and client-side.
The error occurs when:
- There is an interception of the client-side connection by a third party.
- The client is using the wrong time and date.
- The client's browser configuration is incorrect.
- The server and the client do not support a similar SSL version.
- Different Cipher Suites are being used by the client and server, creating a mismatch.
- The certificate is invalid, expired, or unfinished.
How is SSL Handshake Error Fixed?
The remedies for the error are often based on the error's cause.
1. Invalid certificate
The SSL handshake failure will occur if you have an expired, invalid or incomplete certificate. Issues on an SSL certificate will impede the completion of a handshake causing the error. Some of the certificate issues to look out for include the wrong hostname, the certificate having passed its expiration date, and not being installed correctly.
It is essential to check and ensure that the SSL certificate is renewed and installed correctly. The hostname used in the URL must match the hostname on the certificate. You can also use SSL checker tools to check if the certificate is correct and installation has been done properly.
2. Fix the time and date
Updating your system's time and date is one of the easiest fixes for the error and probably one you should check first. If the time and date on your computer are not correct, then the handshake will not be complete. While this may seem unimportant, it is critical as SSL certificates are time-bound and become invalid after their expiration.
Therefore, your computer's time and date should match the actual date to avoid interrupting the handshake. Due to human error, your time and date may be incorrect, so this should be the first stop. If everything looks good, it is a sign that this is not the cause, and you can move to other options.
3. Ensure the Cipher Suites Match
Cipher Suite mismatch is one of the common causes of a failed SSL handshake. Cipher Suites mismatch occurs when your browser fails to establish a secure connection with a server that uses SSL or HTTPS.
When the Cipher Suites used by a server do not match or support the one used by a browser, an SSL Handshake Failed error will take place.
How do you establish if there is a mismatch? You have to compare the Cipher Suites that your browser and the server supports in the SSL Labs. Here are the steps.
- Click on "Projects."
- Select "SSL Client Test."
- Under SSL Client Test, scroll to "Protocol Features" and open it. You will get a list of the Cipher Suites your browser supports.
- In a different tab, open SSL Labs and select "Projects."
- Click on the "SSL Server Test" option and populate the provided field with the domain name resulting in the error.
- Confirm that the server and your browser use the same Cipher Suites.
4. Try another browser
Your browser could be the reason you are getting the SSL Handshake Failed error. This could be due to your browser plugins and settings, among other issues. If you have ruled out the other cause, you could check if your browser is the cause of the error.
Switch to another browser and see if you are getting the same error. If you are using Google Chrome, for instance, and getting the error, try a different browser like Microsoft Edge to confirm if your browser is the problem.
If the handshake does not fail in Microsoft Edge, you need to reset your Google Chrome browser to default and disable your plugins. It is recommended that you disable the plugins one by one as you test the website to make it possible to identify which plugin is causing the issue.
If you are still getting the error with a different browser, the problem is not your browser configuration.
5. Update your browser
If your browser and server do not support the same SSL version, you will get the error, and the remedy would be updating your browser.
Updating your browser will fix the current protocol mismatch as it will allow it to use the latest SSL protocol. Note that the server will always support the latest SSL version, but your browser may need an update.
After updating your browser, it is expected that the browser will have Transport Layer Security (TLS) 1.2 automatically enabled. You have to ensure the configuration supports the latest TLS version in instances where it is not.
You can confirm if the configuration is okay using the following steps.
- Open SSL Labs
- Go to "Projects."
- Select "SSL Client Test."
- Under SSL Client Test, select "Protocol Support," Here, you will establish whether your browser supports the latest TLS version.
If your server and browser and server are using the same protocol, it is a sign that your browser version is not the issue.
A successful SSL Handshake is essential for data to be transferred securely over the internet. However, sometimes the handshake may be unsuccessful, and the server will fail to establish a secure connection.
The good news is that the causes of the SSL Handshake Failed error can be fixed easily with the steps above.
People also read: