Home
last modified time | relevance | path

Searched refs:hostname (Results 1 – 25 of 32) 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.java127 String hostname) throws CertificateException { in checkServerTrusted() argument
128 if (hostname == null && mConfig.hasPerDomainConfigs()) { in checkServerTrusted()
132 NetworkSecurityConfig config = mConfig.getConfigForHostname(hostname); in checkServerTrusted()
133 return config.getTrustManager().checkServerTrusted(certs, authType, hostname); in checkServerTrusted()
/frameworks/base/services/net/java/android/net/shared/
DPrivateDnsConfig.java31 public final String hostname; field in PrivateDnsConfig
40 this.hostname = ""; in PrivateDnsConfig()
44 public PrivateDnsConfig(String hostname, InetAddress[] ips) { in PrivateDnsConfig() argument
45 this.useTls = !TextUtils.isEmpty(hostname); in PrivateDnsConfig()
46 this.hostname = useTls ? hostname : ""; in PrivateDnsConfig()
52 hostname = cfg.hostname; in PrivateDnsConfig()
60 return useTls && !TextUtils.isEmpty(hostname); in inStrictMode()
66 + "{" + useTls + ":" + hostname + "/" + Arrays.toString(ips) + "}"; in toString()
74 parcel.hostname = hostname; in toParcel()
88 return new PrivateDnsConfig(parcel.hostname, ips); in fromParcel()
/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.java472 public static boolean isWeaklyValidatedHostname(@NonNull String hostname) { in isWeaklyValidatedHostname() argument
476 if (!hostname.matches(weakHostnameRegex)) { in isWeaklyValidatedHostname()
481 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/services/core/java/com/android/server/connectivity/
DDnsManager.java148 final public String hostname; field in DnsManager.PrivateDnsValidationUpdate
152 String hostname, boolean validated) { in PrivateDnsValidationUpdate() argument
155 this.hostname = hostname; in PrivateDnsValidationUpdate()
185 private void updateTrackedDnses(String[] ipAddresses, String hostname) { in updateTrackedDnses() argument
189 latestDnses.add(new Pair(hostname, in updateTrackedDnses()
210 Pair<String, InetAddress> p = new Pair(update.hostname, in updateStatus()
288 final String tlsHostname = strictMode ? privateDnsCfg.hostname : null; in updatePrivateDnsStatus()
332 paramsParcel.tlsName = strictMode ? privateDnsCfg.hostname : ""; in setDnsConfigurationForNetwork()
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()
/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/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/services/net/aidl/networkstack/1/android/net/
DPrivateDnsConfigParcel.aidl3 String hostname;
/frameworks/base/services/net/java/android/net/
DPrivateDnsConfigParcel.aidl20 String hostname;
/frameworks/base/services/net/aidl/networkstack/2/android/net/
DPrivateDnsConfigParcel.aidl3 String hostname;
/frameworks/base/services/net/aidl/networkstack/3/android/net/
DPrivateDnsConfigParcel.aidl20 String hostname;
/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/tests/net/java/com/android/server/connectivity/
DDnsManagerTest.java242 assertEquals("", cfgAuto.hostname); in testOverrideDefaultMode()
249 assertEquals("", cfgOff.hostname); in testOverrideDefaultMode()
258 assertEquals("strictmode.com", cfgStrict.hostname); in testOverrideDefaultMode()
/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.java195 private void handleNetworkEvent(String hostname, String[] ipAddresses, in handleNetworkEvent() argument
198 Slog.i(TAG, "handleNetworkEvent with host: " + hostname + ", uid: " + uid); in handleNetworkEvent()
212 final String cncDomain = searchAllSubDomainsInWatchlist(hostname); in handleNetworkEvent()

12