Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 61ea9acc authored by Thiébaud Weksteen's avatar Thiébaud Weksteen
Browse files

Set baseConfigBuilder as parent for localhostBuilder

If a base-config is set in the NetworkSecurityConfig, the implicit
localhost config should inherit its properties. In particular, if any
certificate entries are declared, they should be considered.

Bug: 436512764
Test: atest AdServicesServiceCoreProtectedAudienceUnitTests
Flag: com.android.org.conscrypt.net.flags.network_security_config_localhost
Change-Id: Ibec4a3e3bc61fcddf0bdf9634d90372633dcf0a2
parent 033a078e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -413,7 +413,7 @@ public class XmlConfigSource implements ConfigSource {
            NetworkSecurityConfig.Builder localhostBuilder =
                    NetworkSecurityConfig.getLocalhostBuilder();
            addDebugAnchorsIfNeeded(debugConfigBuilder, localhostBuilder);
            localhostBuilder.setParent(platformDefaultBuilder);
            localhostBuilder.setParent(baseConfigBuilder);
            mLocalhostConfig = localhostBuilder.build();
        }
        mDefaultConfig = baseConfigBuilder.build();