Home
last modified time | relevance | path

Searched refs:hostname (Results 1 – 25 of 33) sorted by relevance

12

/frameworks/base/core/java/android/security/net/config/
DApplicationConfig.java70 public NetworkSecurityConfig getConfigForHostname(String hostname) { in getConfigForHostname() argument
72 if (hostname == null || hostname.isEmpty() || mConfigs == null) { in getConfigForHostname()
75 if (hostname.charAt(0) == '.') { in getConfigForHostname()
79 hostname = hostname.toLowerCase(Locale.US); in getConfigForHostname()
82 if (hostname.charAt(hostname.length() - 1) == '.') { in getConfigForHostname()
83 hostname = hostname.substring(0, hostname.length() - 1); in getConfigForHostname()
93 if (domain.hostname.equals(hostname)) { in getConfigForHostname()
99 && hostname.endsWith(domain.hostname) in getConfigForHostname()
100 && hostname.charAt(hostname.length() - domain.hostname.length() - 1) == '.') { in getConfigForHostname()
103 } else if (domain.hostname.length() > bestMatch.first.hostname.length()) { in getConfigForHostname()
[all …]
DDomain.java25 public final String hostname; field in Domain
32 public Domain(String hostname, boolean subdomainsIncluded) { in Domain() argument
33 if (hostname == null) { in Domain()
36 this.hostname = hostname.toLowerCase(Locale.US); in Domain()
42 return hostname.hashCode() ^ (subdomainsIncluded ? 1231 : 1237); in hashCode()
55 otherDomain.hostname.equals(this.hostname); in equals()
DConfigNetworkSecurityPolicy.java37 public boolean isCleartextTrafficPermitted(String hostname) { in isCleartextTrafficPermitted() argument
38 return mConfig.isCleartextTrafficPermitted(hostname); in isCleartextTrafficPermitted()
42 public boolean isCertificateTransparencyVerificationRequired(String hostname) { in isCertificateTransparencyVerificationRequired() argument
DRootTrustManager.java128 String hostname) throws CertificateException { in checkServerTrusted() argument
129 if (hostname == null && mConfig.hasPerDomainConfigs()) { in checkServerTrusted()
133 NetworkSecurityConfig config = mConfig.getConfigForHostname(hostname); in checkServerTrusted()
134 return config.getTrustManager().checkServerTrusted(certs, authType, hostname); in checkServerTrusted()
/frameworks/base/core/java/android/net/
DPrivateDnsConnectivityChecker.java45 public static boolean canConnectToPrivateDnsServer(@NonNull String hostname) { in canConnectToPrivateDnsServer() argument
51 socket.connect(new InetSocketAddress(hostname, PRIVATE_DNS_PORT)); in canConnectToPrivateDnsServer()
53 Log.w(TAG, String.format("Connection to %s failed.", hostname)); in canConnectToPrivateDnsServer()
57 Log.w(TAG, String.format("TLS handshake to %s succeeded.", hostname)); in canConnectToPrivateDnsServer()
60 Log.w(TAG, String.format("TLS handshake to %s failed.", hostname), e); in canConnectToPrivateDnsServer()
DINetdEventCallback.aidl44 void onDnsEvent(int netId, int eventType, int returnCode, String hostname, in onDnsEvent() argument
70 void onPrivateDnsValidationEvent(int netId, String ipAddress, String hostname, in onPrivateDnsValidationEvent() argument
DProxy.java220 public static int validate(String hostname, String port, String exclList) { in validate() argument
221 Matcher match = HOSTNAME_PATTERN.matcher(hostname); in validate()
228 if (hostname.length() > 0 && port.length() == 0) return PROXY_PORT_EMPTY; in validate()
231 if (hostname.length() == 0) return PROXY_HOSTNAME_EMPTY; in validate()
DNetworkUtils.java464 public static boolean isWeaklyValidatedHostname(@NonNull String hostname) { in isWeaklyValidatedHostname() argument
468 if (!hostname.matches(weakHostnameRegex)) { in isWeaklyValidatedHostname()
473 if (Os.inet_pton(address_family, hostname) != null) { in isWeaklyValidatedHostname()
DSSLCertificateSocketFactory.java231 public static void verifyHostname(Socket socket, String hostname) throws IOException { in verifyHostname() argument
246 if (!HttpsURLConnection.getDefaultHostnameVerifier().verify(hostname, session)) { in verifyHostname()
247 throw new SSLPeerUnverifiedException("Cannot verify hostname: " + hostname); in verifyHostname()
/frameworks/base/core/java/android/security/
DFrameworkNetworkSecurityPolicy.java37 public boolean isCleartextTrafficPermitted(String hostname) { in isCleartextTrafficPermitted() argument
42 public boolean isCertificateTransparencyVerificationRequired(String hostname) { in isCertificateTransparencyVerificationRequired() argument
DNetworkSecurityPolicy.java78 public boolean isCleartextTrafficPermitted(String hostname) { in isCleartextTrafficPermitted() argument
80 .isCleartextTrafficPermitted(hostname); in isCleartextTrafficPermitted()
/frameworks/base/core/java/com/android/server/net/
DBaseNetdEventCallback.java29 public void onDnsEvent(int netId, int eventType, int returnCode, String hostname, in onDnsEvent() argument
42 String hostname, boolean validated) { in onPrivateDnsValidationEvent() argument
/frameworks/base/services/core/java/com/android/server/connectivity/
DDnsManager.java153 final public String hostname; field in DnsManager.PrivateDnsValidationUpdate
157 String hostname, boolean validated) { in PrivateDnsValidationUpdate() argument
160 this.hostname = hostname; in PrivateDnsValidationUpdate()
190 private void updateTrackedDnses(String[] ipAddresses, String hostname) { in updateTrackedDnses() argument
194 latestDnses.add(new Pair(hostname, in updateTrackedDnses()
215 Pair<String, InetAddress> p = new Pair(update.hostname, in updateStatus()
303 final String tlsHostname = strictMode ? privateDnsCfg.hostname : null; in updatePrivateDnsStatus()
374 paramsParcel.tlsName = strictMode ? privateDnsCfg.hostname : ""; in sendDnsConfigurationForNetwork()
DNetdEventListenerService.java202 String hostname, String[] ipAddresses, int ipAddressesCount, int uid) in onDnsEvent() argument
209 callback.onDnsEvent(netId, eventType, returnCode, hostname, ipAddresses, in onDnsEvent()
232 String ipAddress, String hostname, boolean validated) in onPrivateDnsValidationEvent() argument
236 callback.onPrivateDnsValidationEvent(netId, ipAddress, hostname, validated); in onPrivateDnsValidationEvent()
DNetworkDiagnostics.java232 prepareDnsTlsMeasurement(mPrivateDnsCfg.hostname, tlsNameserver); in NetworkDiagnostics()
294 private void prepareDnsTlsMeasurement(@Nullable String hostname, @NonNull InetAddress target) { in prepareDnsTlsMeasurement() argument
300 measurement.thread = new Thread(new DnsTlsCheck(hostname, target, measurement)); in prepareDnsTlsMeasurement()
683 public DnsTlsCheck(@Nullable String hostname, @NonNull InetAddress target, in DnsTlsCheck() argument
687 mHostname = hostname; in DnsTlsCheck()
/frameworks/base/core/java/android/app/admin/
DDnsEvent.java49 public DnsEvent(String hostname, String[] ipAddresses, int ipAddressesCount, in DnsEvent() argument
52 this.mHostname = hostname; in DnsEvent()
/frameworks/base/tests/net/java/com/android/server/connectivity/
DDnsManagerTest.java313 assertEquals("", cfgAuto.hostname); in testOverrideDefaultMode()
320 assertEquals("", cfgOff.hostname); in testOverrideDefaultMode()
329 assertEquals("strictmode.com", cfgStrict.hostname); in testOverrideDefaultMode()
401 assertEquals("", privateDnsCfg.hostname); in testGetPrivateDnsConfigForNetwork()
412 assertEquals("", privateDnsCfg.hostname); in testGetPrivateDnsConfigForNetwork()
420 assertEquals(tlsName, privateDnsCfg.hostname); in testGetPrivateDnsConfigForNetwork()
427 assertEquals("", privateDnsCfg.hostname); in testGetPrivateDnsConfigForNetwork()
/frameworks/base/packages/Tethering/tests/unit/common/android/net/
DTetheredClientTest.kt114 assertEquals(TEST_HOSTNAME, TEST_ADDRINFO1.hostname) in makeLinkAddress()
115 assertEquals(null, TEST_ADDRINFO2.hostname) in makeLinkAddress()
/frameworks/base/core/java/org/apache/http/conn/scheme/
DHostNameResolver.java45 InetAddress resolve (String hostname) throws IOException; in resolve() argument
/frameworks/base/services/devicepolicy/java/com/android/server/devicepolicy/
DNetworkLogger.java56 public void onDnsEvent(int netId, int eventType, int returnCode, String hostname,
61 DnsEvent dnsEvent = new DnsEvent(hostname, ipAddresses, ipAddressesCount,
/frameworks/base/packages/Tethering/common/TetheringLib/src/android/net/
DTetheredClient.java130 public AddressInfo(@NonNull LinkAddress address, @Nullable String hostname) { in AddressInfo() argument
132 this.mHostname = hostname; in AddressInfo()
/frameworks/base/packages/Tethering/tests/unit/src/com/android/networkstack/tethering/
DConnectedClientsTrackerTest.kt65 private fun makeAddrInfo(addr: String, hostname: String?, expTime: Long) = in makeAddrInfo()
68 expTime /* deprecationTime */, expTime /* expirationTime */), hostname) in makeAddrInfo()
/frameworks/base/services/core/java/com/android/server/net/watchlist/
DNetworkWatchlistService.java145 public void onDnsEvent(int netId, int eventType, int returnCode, String hostname,
150 mNetworkWatchlistHandler.asyncNetworkEvent(hostname, ipAddresses, uid);
DWatchlistLoggingHandler.java197 private void handleNetworkEvent(String hostname, String[] ipAddresses, in handleNetworkEvent() argument
200 Slog.i(TAG, "handleNetworkEvent with host: " + hostname + ", uid: " + uid); in handleNetworkEvent()
214 final String cncDomain = searchAllSubDomainsInWatchlist(hostname); in handleNetworkEvent()
/frameworks/base/services/core/java/com/android/server/adb/
DAdbDebuggingManager.java1360 String hostname = "nouser@nohostname"; in onPairingResult() local
1363 hostname = args[1]; in onPairingResult()
1365 PairDevice device = new PairDevice(fingerprints, hostname, false); in onPairingResult()
1842 String hostname = "nouser@nohostname"; in getPairedDevices() local
1845 hostname = args[1]; in getPairedDevices()
1848 hostname, fingerprints, mWifiConnectedKeys.contains(keyEntry.getKey()))); in getPairedDevices()

12