Sometimes during development it is useful to use a certificate whose CN(Common Name) does not match the host name in the URL, for examplelocalhost. In these cases Java will throw an SSLHandshakeException.How can we easily disable certificate checking for localhost and otherdomains of our choosing? Your own certificate checking The easiest way is to create your own class that implements theinterface HostnameVerifier: WhitelistHostnameVerifier.java packagecom.relentlesscoding.https;importjavax....