Searched defs:hostname (Results 1 - 12 of 12) sorted by relevance

/libcore/luni/src/main/java/javax/net/ssl/
H A DHostnameVerifier.java21 * 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/luni/src/main/java/java/net/
H A DAddressCache.java70 * 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 DInetSocketAddress.java31 // 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...]
/libcore/crypto/src/main/java/org/conscrypt/
H A DCertPinManager.java65 * 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 DOpenSSLSocketImpl.java79 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 DNativeCrypto.java930 public static native void SSL_set_tlsext_host_name(long sslNativePointer, String hostname) argument
/libcore/crypto/src/test/java/org/conscrypt/
H A DTrustManagerImplTest.java148 // 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...]
/libcore/benchmarks/src/benchmarks/regression/
H A DHostnameVerifierBenchmark.java48 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/luni/src/test/java/tests/api/javax/net/ssl/
H A DHttpsURLConnectionTest.java96 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 DHttpsURLConnectionTest.java129 // 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 DURLConnectionTest.java663 * 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 Dorg_conscrypt_NativeCrypto.cpp6743 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

Completed in 481 milliseconds