Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Android] Resolve Android-specific active issues in System.Net.Security and System.Security.Cryptography #104352

Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Enable or permanently disable tests in SslStreamNetworkStreamTest
  • Loading branch information
simonrozsival committed Jul 3, 2024
commit 40924b267d6ab261a31c3c5c1ab1d9510e325bfb
Original file line number Diff line number Diff line change
Expand Up @@ -695,10 +695,15 @@ public async Task SslStream_NestedAuth_Throws()
[InlineData(false, true)]
[InlineData(false, false)]
[InlineData(true, true)]
[ActiveIssue("https://github.com/dotnet/runtime/issues/68206", TestPlatforms.Android)]
public async Task SslStream_TargetHostName_Succeeds(bool useEmptyName, bool useCallback)
{
string targetName = useEmptyName ? string.Empty : Guid.NewGuid().ToString("N");
if (PlatformDetection.IsAndroid && !useEmptyName)
simonrozsival marked this conversation as resolved.
Show resolved Hide resolved
{
// Android does not allow single-word hostnames other than "localhost"
targetName = "localhost";
}

int count = 0;

(Stream clientStream, Stream serverStream) = TestHelper.GetConnectedStreams();
Expand Down Expand Up @@ -751,12 +756,16 @@ await TestConfiguration.WhenAllOrAnyFailedWithTimeout(
}
}

[Theory]
[ConditionalTheory]
[InlineData(true)]
[InlineData(false)]
[ActiveIssue("https://github.com/dotnet/runtime/issues/68206", TestPlatforms.Android)]
public async Task SslStream_ServerUntrustedCaWithCustomTrust_OK(bool usePartialChain)
{
if (usePartialChain && OperatingSystem.IsAndroid())
{
throw new SkipTestException("Android does not support partial chain validation.");
}

int split = Random.Shared.Next(0, _certificates.serverChain.Count - 1);

var clientOptions = new SslClientAuthenticationOptions() { TargetHost = "localhost" };
Expand Down Expand Up @@ -854,8 +863,8 @@ private async Task SslStream_ClientSendsChain_Core(SslClientAuthenticationOption
}

[Fact]
[ActiveIssue("https://github.com/dotnet/runtime/issues/68206", TestPlatforms.Android)]
[ActiveIssue("https://github.com/dotnet/runtime/issues/73862", TestPlatforms.OSX)]
[SkipOnPlatform(TestPlatforms.Android, "It is not possible to add the intermediate certificates to the trust store on Android at runtime.")]
public async Task SslStream_ClientCertificate_SendsChain()
{
// macOS ignores CertificateAuthority
Expand Down