Moe
Moe

Reputation: 1537

How to troubleshoot Glassfish javax.net.ssl.SSLHandshakeException:

I created my own CA root certificate that I use to sign one of the domain on the server. I have tested the cert from the browser as well as through JavaSE HttpsURLConnection. everything works except for Glashfish. How can I troubleshoot it?

Note, for testing I have created a self-signed certificate and it works with Glassfish. what am I missing? please help! why CA Root cert don't work with Glassfish?

Upvotes: 1

Views: 1208

Answers (1)

leoalvarez
leoalvarez

Reputation: 26

You have to add your root certificate to glassfish's keystore.

First, find them:

find $GLASSFISH_HOME -type f -and -name keystore.jks -or -name cacerts.jks -or -name cacerts

and add it with keytool:

$JAVA_HOME/bin/keytool -importcert -keystore "/path/found/cacerts.jks"
-storepass changeit -alias **[[SET YOUT OWN ALIAS]]** -noprompt  -file YOUR-OWN-ROOT-CA.crt

Upvotes: 1

Related Questions