dotnet / android

.NET for Android provides open-source bindings of the Android SDK for use with .NET managed languages such as C#
MIT License
1.92k stars 526 forks source link

[Mono.Android] Use X509TrustManagerExtensions to allow using domain-config in network_security_config.xml #9302

Closed simonrozsival closed 1 week ago

simonrozsival commented 1 week ago

Related to https://github.com/dotnet/runtime/issues/107695

When <domain-config ...> is used in network_security_config.xml then all calls to _internalTrustManager.CheckServerTrusted (javaChain, authType); will throw an exception and we will always pass SslPolicyErrors.RemoteCertificateChainErrors to the custom server certificate validation callback. To fix this, it is necessary to use hostname-specific certificate check via X509TrustManagerExtensions.

grendello commented 1 week ago

/azp run

azure-pipelines[bot] commented 1 week ago
Azure Pipelines successfully started running 1 pipeline(s).