Code example for X509HostnameVerifier

Methods: verify

0
                    + remoteAddress.getAddress() + " timed out");
        } 
        sslsock.setSoTimeout(soTimeout);
        if (this.hostnameVerifier != null) {
            try { 
                this.hostnameVerifier.verify(remoteAddress.getHostName(), sslsock);
                // verifyHostName() didn't blowup - good! 
            } catch (IOException iox) {
                // close the socket before re-throwing the exception 
                try { sslsock.close(); } catch (Exception x) { /*ignore*/ }
                throw iox;
            } 
        } 
        return sslsock;
    } 
 
 
    /** 
     * Checks whether a socket connection is secure. 
     * This factory creates TLS/SSL socket connections 
Experience pair programming with AI  Get Codota for Java