diff --git a/eng/liveBuilds.targets b/eng/liveBuilds.targets
index 3006fd92e756e0..f26e5718bc754b 100644
--- a/eng/liveBuilds.targets
+++ b/eng/liveBuilds.targets
@@ -177,6 +177,10 @@
$(LibrariesNativeArtifactsPath)*.pdb"
IsNative="true"
Exclude="@(ExcludeNativeLibrariesRuntimeFiles)" />
+
+
diff --git a/src/libraries/Common/src/Interop/Android/System.Security.Cryptography.Native.Android/Interop.Ssl.cs b/src/libraries/Common/src/Interop/Android/System.Security.Cryptography.Native.Android/Interop.Ssl.cs
index ba9fbd297c93b5..f6bc7cf3c484db 100644
--- a/src/libraries/Common/src/Interop/Android/System.Security.Cryptography.Native.Android/Interop.Ssl.cs
+++ b/src/libraries/Common/src/Interop/Android/System.Security.Cryptography.Native.Android/Interop.Ssl.cs
@@ -29,18 +29,24 @@ internal enum PAL_SSLStreamStatus
};
[LibraryImport(Interop.Libraries.AndroidCryptoNative, EntryPoint = "AndroidCryptoNative_SSLStreamCreate")]
- internal static partial SafeSslHandle SSLStreamCreate();
+ internal static partial SafeSslHandle SSLStreamCreate(IntPtr trustManagerProxyHandle);
[LibraryImport(Interop.Libraries.AndroidCryptoNative, EntryPoint = "AndroidCryptoNative_SSLStreamCreateWithCertificates")]
private static partial SafeSslHandle SSLStreamCreateWithCertificates(
+ IntPtr trustManagerProxyHandle,
ref byte pkcs8PrivateKey,
int pkcs8PrivateKeyLen,
PAL_KeyAlgorithm algorithm,
IntPtr[] certs,
int certsLen);
- internal static SafeSslHandle SSLStreamCreateWithCertificates(ReadOnlySpan pkcs8PrivateKey, PAL_KeyAlgorithm algorithm, IntPtr[] certificates)
+ internal static SafeSslHandle SSLStreamCreateWithCertificates(
+ IntPtr trustManagerProxyHandle,
+ ReadOnlySpan pkcs8PrivateKey,
+ PAL_KeyAlgorithm algorithm,
+ IntPtr[] certificates)
{
return SSLStreamCreateWithCertificates(
+ trustManagerProxyHandle,
ref MemoryMarshal.GetReference(pkcs8PrivateKey),
pkcs8PrivateKey.Length,
algorithm,
@@ -48,6 +54,10 @@ ref MemoryMarshal.GetReference(pkcs8PrivateKey),
certificates.Length);
}
+ [LibraryImport(Interop.Libraries.AndroidCryptoNative, EntryPoint = "AndroidCryptoNative_RegisterTrustManagerValidationCallback")]
+ internal static unsafe partial void RegisterTrustManagerValidationCallback(
+ delegate* unmanaged validateCertificates);
+
[LibraryImport(Interop.Libraries.AndroidCryptoNative, EntryPoint = "AndroidCryptoNative_SSLStreamInitialize")]
private static unsafe partial int SSLStreamInitializeImpl(
SafeSslHandle sslHandle,
diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.UnixFileSystemTypes.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.UnixFileSystemTypes.cs
index 23e733425748a5..a41cb65ad066ba 100644
--- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.UnixFileSystemTypes.cs
+++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.UnixFileSystemTypes.cs
@@ -115,6 +115,7 @@ internal enum UnixFileSystemTypes : uint
rootfs = 0x53464846,
rpc_pipefs = 0x67596969,
samba = 0x517B,
+ sdcardfs = 0x5DCA2DF5,
securityfs = 0x73636673,
selinux = 0xF97CFF8C,
sffs = 0x786F4256, // same as vboxfs
diff --git a/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.AcceptAllCerts.cs b/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.AcceptAllCerts.cs
index cf9af001342177..b449f5025276dc 100644
--- a/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.AcceptAllCerts.cs
+++ b/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.AcceptAllCerts.cs
@@ -96,7 +96,6 @@ await TestHelper.WhenAllCompletedOrAnyFailed(
[OuterLoop]
[ConditionalTheory(nameof(ClientSupportsDHECipherSuites))]
[MemberData(nameof(InvalidCertificateServers))]
- [SkipOnPlatform(TestPlatforms.Android, "Android rejects the certificate, the custom validation callback in .NET cannot override OS behavior in the current implementation")]
public async Task InvalidCertificateServers_CertificateValidationDisabled_Succeeds(string url)
{
using (HttpClientHandler handler = CreateHttpClientHandler(allowAllCertificates: true))
diff --git a/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.ClientCertificates.cs b/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.ClientCertificates.cs
index 04a7414d046951..930410c54b794a 100644
--- a/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.ClientCertificates.cs
+++ b/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.ClientCertificates.cs
@@ -81,6 +81,7 @@ private HttpClient CreateHttpClientWithCert(X509Certificate2 cert)
[InlineData(1, true)]
[InlineData(2, true)]
[InlineData(3, false)]
+ [ActiveIssue("TODO", TestPlatforms.Android)]
public async Task Manual_CertificateOnlySentWhenValid_Success(int certIndex, bool serverExpectsClientCertificate)
{
// [ActiveIssue("/~https://github.com/dotnet/runtime/issues/69238")]
@@ -132,6 +133,7 @@ await TestHelper.WhenAllCompletedOrAnyFailed(
[Theory]
[InlineData(6, false)]
[InlineData(3, true)]
+ [ActiveIssue("TODO", TestPlatforms.Android)]
public async Task Manual_CertificateSentMatchesCertificateReceived_Success(
int numberOfRequests,
bool reuseClient) // validate behavior with and without connection pooling, which impacts client cert usage
diff --git a/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.ServerCertificates.cs b/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.ServerCertificates.cs
index 90de3cdee7b934..53e2958cca42a3 100644
--- a/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.ServerCertificates.cs
+++ b/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.ServerCertificates.cs
@@ -141,6 +141,7 @@ public static IEnumerable