Code example for X509HostnameVerifier

Methods: verify

0
 
		sslsock.connect(remoteAddress, connTimeout);
 
		sslsock.setSoTimeout(soTimeout);
		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