Following are additional notes related to the properties in the SSL section.
Determines whether the host name verification is done on the server certificate during the SSL handshake.
You can use this property to enforce strict checking of the server host name in the request URL and the host name in the received server certificate.
True or False; the default is False.
Under some circumstances, you can get different Java exceptions, depending on whether you set this property to True or False. This section explains what causes these exceptions.
For example, suppose the host name in the URL is localhost, and the host name in the server certificate is localhost.stc.com. Then, the following conditions apply:
If Verify hostname is set to False:
Host name checking between the requested URL and the server certificate is turned off.
You can use an incomplete domain host name, for example, https://localhost:444, or a complete domain host name, for example, https://localhost.stc.com:444, and get a positive response in each case.
If Verify hostname is set to True:
Host name checking between the requested URL and the server certificate is turned on.
If you use an incomplete domain host name, for example, https://localhost:444, you can get the exception java.io.IOException: HTTPS hostname wrong.
You must use a complete domain host name, for example, https://localhost.stc.com:444
If the Java Software Developer’s Kit (SDK) version used by the application server and the corresponding application server property setting do not match, you can get the exception java.lang.ClassCastException.