June 27, 2017
I get SSLHandshakeException while integrating with Zephyr and my application using Self Signed Certificate running on HTTPS.
If a self signed certificate is being used in your application then it must be added as a trusted device in Zephyr.
To establish trust in Zephyr, the self signed certificate must be added to Java Keystore that's used by Zephyr.
Attached is the InstallCert.java file that should automatically add the certificate of your application to Zephyr based on the command line arguments.
1. Access Zephyr server.
2. Compile the Java file using the below command:
3. Once the compilation is complete run the java file using the below command line args:
java InstallCert [host]:[port]
Ex: If your application is JIRA running on port 443 then the command should look like:
java InstallCert myJIRA:443
This would retrieve the certificate from your application server and then add it to the Java defined in JAVA_HOME (which is used by Zephyr by default). The location of JDK would be:<JDK_HOME>\jdk1.8.0_40\jre\lib\security
During the execution it should ask you to "Trust this certificate", type in "yes" and enter. You should see a message saying "Certificate was added to keystore" once the execution is successful.
4. Restart your Zephyr service to reflect the change and connect with your application again.
You can verify if the cerificate is added or not by using the below command:
keytool -list -keystore cacerts