/libcore/luni/src/main/java/java/net/ |
H A D | InetSocketAddress.java | 31 // Exactly one of hostname or addr should be set. 33 private final String hostname; field in class:InetSocketAddress 42 this.hostname = null; 74 this.hostname = null; 80 * hostname {@code host}. The hostname is tried to be resolved and cannot be 87 * the specified hostname to which this socket is bound. 97 InetSocketAddress(String hostname, int port, boolean needResolved) { argument 98 if (hostname == null || port < 0 || port > 65535) { 99 throw new IllegalArgumentException("host=" + hostname [all...] |
H A D | AddressCache.java | 70 * Returns the cached InetAddress[] associated with 'hostname'. Returns null if nothing is known 71 * about 'hostname'. Returns a String suitable for use as an UnknownHostException detail 72 * message if 'hostname' is known not to exist. 74 public Object get(String hostname) { argument 75 AddressCacheEntry entry = cache.get(hostname); 86 * Associates the given 'addresses' with 'hostname'. The association will expire after a 89 public void put(String hostname, InetAddress[] addresses) { argument 90 cache.put(hostname, new AddressCacheEntry(addresses)); 94 * Records that 'hostname' is known not to have any associated addresses. (I.e. insert a 97 public void putUnknownHost(String hostname, Strin argument [all...] |
H A D | InetAddress.java | 50 * <p>An {@code InetAddress} may have a hostname (accessible via {@code getHostName}), but may not, 188 * @param hostName the hostname corresponding to the IP address. 209 * @param host the hostname or literal IP string to be resolved. 316 * Returns the fully qualified hostname corresponding to this IP address. 328 * loopback address otherwise. This method works by getting the hostname, 352 * <p>Note that if the host doesn't have a hostname set – as 379 * Resolves a hostname to its IP addresses using a cache. 381 * @param host the hostname to resolve. 406 // TODO: should getaddrinfo set the hostname of the InetAddresses it returns? 440 String hostname [all...] |
/libcore/luni/src/main/java/javax/net/ssl/ |
H A D | HostnameVerifier.java | 21 * The interface to be used to provide hostname verification functionality. 24 * during a handshake if the URL's hostname does not match the peer's 25 * identification hostname. 29 * Verifies that the specified hostname is allowed within the specified SSL 32 * @param hostname 33 * the hostname. 36 * @return {@code true} if the specified hostname is allowed, otherwise 39 boolean verify(String hostname, SSLSession session); argument
|
/libcore/crypto/src/main/java/org/conscrypt/ |
H A D | CertPinManager.java | 65 * Given a hostname and a certificate chain this verifies that the chain includes 71 public boolean chainIsNotPinned(String hostname, List<X509Certificate> chain) argument 74 PinListEntry entry = lookup(hostname); 125 private synchronized PinListEntry lookup(String hostname) throws PinManagerException { argument 137 // if so, check the hostname cache 138 String cn = hostnameCache.get(hostname); 145 cn = getMatchingCN(hostname); 147 hostnameCache.put(hostname, cn); 152 // if we got here, we don't have a matching CN for this hostname 160 private String getMatchingCN(String hostname) { argument [all...] |
H A D | ClientHandshakeImpl.java | 543 String hostname = null; 545 hostname = engineOwner.getPeerHost(); 548 hostname = socketOwner.getWrappedHostName(); 554 tm.checkServerTrusted(serverCert.certs, authType, hostname);
|
H A D | OpenSSLSocketImpl.java | 79 private String hostname; field in class:OpenSSLSocketImpl 317 if (hostname != null) { 318 NativeCrypto.SSL_set_tlsext_host_name(sslNativePointer, hostname); 821 * @param hostname the desired SNI hostname, or null to disable 823 public void setHostname(String hostname) { argument 824 this.hostname = hostname;
|
H A D | NativeCrypto.java | 930 public static native void SSL_set_tlsext_host_name(long sslNativePointer, String hostname) argument
|
/libcore/benchmarks/src/benchmarks/regression/ |
H A D | HostnameVerifierBenchmark.java | 48 private String hostname; field in class:HostnameVerifierBenchmark 57 public boolean verify(String hostname, SSLSession sslSession) { 63 HostnameVerifierBenchmark.this.hostname = hostname; 79 hostnameVerifier.verify(hostname, sslSession);
|
/libcore/crypto/src/test/java/org/conscrypt/ |
H A D | TrustManagerImplTest.java | 148 // test without a hostname, expecting failure 150 // test without a hostname, expecting success 152 // test an unpinned hostname that should fail 154 // test an unpinned hostname that should succeed 156 // test a pinned hostname that should fail 158 // test a pinned hostname that should succeed 173 private TrustManagerImpl trustManager(X509Certificate ca, String hostname, X509Certificate pin) argument 176 CertPinManager cm = certManager(hostname, pin); 183 private CertPinManager certManager(String hostname, X509Certificate pin) throws Exception { argument 186 pinString = hostname 202 assertValidPinned(X509Certificate[] chain, X509TrustManager tm, String hostname, X509Certificate[] fullChain) argument 225 assertInvalidPinned(X509Certificate[] chain, X509TrustManager tm, String hostname) argument [all...] |
H A D | NativeCryptoTest.java | 1298 final String hostname = "www.android.com"; 1304 // null hostname 1311 // too long hostname 1321 NativeCrypto.SSL_set_tlsext_host_name(s, new String(hostname)); 1322 assertEquals(hostname, NativeCrypto.SSL_get_servername(s)); 1335 NativeCrypto.SSL_set_tlsext_host_name(s, hostname); 1345 assertEquals(hostname, NativeCrypto.SSL_get_servername(s));
|
/libcore/luni/src/test/java/tests/api/javax/net/ssl/ |
H A D | HttpsURLConnectionTest.java | 96 assertNotNull("Default hostname verifyer is null", verifyer); 118 assertEquals("Incorrect value of hostname verirfyer", 335 public boolean verify(String hostname, SSLSession session) { argument 336 if (hostname == session.getPeerHost()) {
|
/libcore/luni/src/test/java/org/apache/harmony/luni/tests/internal/net/www/protocol/https/ |
H A D | HttpsURLConnectionTest.java | 129 // create the HostnameVerifier to check hostname verification 160 // create the HostnameVerifier to check hostname verification 199 // create the HostnameVerifier to check hostname verification 237 // create the HostnameVerifier to check hostname verification 798 public boolean verify(String hostname, SSLSession session) { argument 800 System.out.println("***> verification " + hostname + " "
|
/libcore/luni/src/test/java/libcore/java/net/ |
H A D | URLConnectionTest.java | 663 * We were verifying the wrong hostname when connecting to an HTTPS site 2486 public boolean verify(String hostname, SSLSession session) { argument 2487 calls.add("verify " + hostname);
|
/libcore/crypto/src/main/native/ |
H A D | org_conscrypt_NativeCrypto.cpp | 6743 jlong ssl_address, jstring hostname) 6746 JNI_TRACE("ssl=%p NativeCrypto_SSL_set_tlsext_host_name hostname=%p", 6747 ssl, hostname); 6752 ScopedUtfChars hostnameChars(env, hostname); 6742 NativeCrypto_SSL_set_tlsext_host_name(JNIEnv* env, jclass, jlong ssl_address, jstring hostname) argument
|