Code example for X509HostnameVerifier

Methods: verify

        sslsock.connect(remoteAddress, connTimeout);
        try { 
            hostnameVerifier.verify(host, 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 
Stop searching for code, let great code find you!  Add Codota to your java IDE