If you are getting SSLHandshakeException while accessing secure URLs, you will need to add the SSL certificate for that URL to your JRE.
Use below steps to add SSL certificate to JRE (Checkout Downloading SSL Certificate From a URL if you are looking for steps to download the SSL certificate from a URL)
- Open a Command Prompt
- Go to βbinβ directory of your JRE
- Use keytool command as follows to import the certificate to JRE. Use default password “changeit” if you didn’t change it or use the password which you set.
keytool -import -alias <CERTIFICATE_ALIAS> -keystore <PATH_TO_JRE>\lib\security\cacerts -file <PATH_TO_CERTIFICATE_FILE>
Tips
- Keytool is located inside the bin directory of your jdk