• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<?xml version="1.0" encoding="utf-8"?>
2
3<!--
4  ~ Copyright (C) 2022 The Android Open Source Project
5  ~
6  ~ Licensed under the Apache License, Version 2.0 (the "License");
7  ~ you may not use this file except in compliance with the License.
8  ~ You may obtain a copy of the License at
9  ~
10  ~      http://www.apache.org/licenses/LICENSE-2.0
11  ~
12  ~ Unless required by applicable law or agreed to in writing, software
13  ~ distributed under the License is distributed on an "AS IS" BASIS,
14  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  ~ See the License for the specific language governing permissions and
16  ~ limitations under the License.
17  -->
18
19<network-security-config>
20  <base-config>
21    <trust-anchors>
22      <certificates src="@raw/quicroot"/>
23      <certificates src="system"/>
24    </trust-anchors>
25  </base-config>
26  <!-- Since Android 9 (API 28) cleartext support is disabled by default, this
27       causes some of our tests to fail (see crbug/1220357).
28       The following configs allow http requests for the domains used in these
29       tests.
30
31       TODO(stefanoduo): Figure out if we really need to use http for these tests
32  -->
33  <domain-config cleartextTrafficPermitted="true">
34    <!-- Used as the base URL by native test server (net::EmbeddedTestServer) -->
35    <domain includeSubdomains="true">127.0.0.1</domain>
36    <!-- Used by CronetHttpURLConnectionTest#testIOExceptionInterruptRethrown -->
37    <domain includeSubdomains="true">localhost</domain>
38    <!-- Used by CronetHttpURLConnectionTest#testBadIP -->
39    <domain includeSubdomains="true">0.0.0.0</domain>
40    <!-- Used by CronetHttpURLConnectionTest#testSetUseCachesFalse -->
41    <domain includeSubdomains="true">host-cache-test-host</domain>
42    <!-- Used by CronetHttpURLConnectionTest#testBadHostname -->
43    <domain includeSubdomains="true">this-weird-host-name-does-not-exist</domain>
44    <!-- Used by CronetUrlRequestContextTest#testHostResolverRules -->
45    <domain includeSubdomains="true">some-weird-hostname</domain>
46  </domain-config>
47</network-security-config>