Monday, February 18, 2013

JDev..SSLException .. Certificate Error ... Hostname Verification

Sometimes, in JDEV, during development, when we access any HTTPS URL for some feature(e.g. Accessing a REST Webservice URL or accessing an SSL enabled URL using java.net.HttpURLConnection Object), we come  across

SSLException .. Certificate Error ... Hostname Verification

This is NOT any error, this is desired.

To solve this in JDEV(Note, in Standalone WLS, you need to run the KeyTool.exe from MW_HOME)

  • Tools->Preferences->Credentials
  • Credential Names  Dropdown->Select "HTTPS Credential"
  • In the field, "Client Trusted Certificate KeyStore", browse and give the full path to
  • $MW_HOME/jdk160_24/jre/lib/security/cacerts

Save and re-run the App(You need to restart Integrated server)