Skip to content
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
Enable supported cases of SslStream_ServerCallbackNotSet_UsesLocalCer…
…tificateSelection on Android
  • Loading branch information
simonrozsival committed Feb 9, 2023
commit 45f22fb6f0415409eb6d3e157e8737e781ef6f26
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@

using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net.Test.Common;
using System.Security.Authentication;
using System.Security.Cryptography.X509Certificates;
using System.Threading;
using System.Threading.Tasks;
using Xunit;
using Microsoft.DotNet.XUnitExtensions;

namespace System.Net.Security.Tests
{
Expand Down Expand Up @@ -94,11 +96,13 @@ public async Task SslStream_ServerCallbackAndLocalCertificateSelectionSet_Throws
}
}

[Theory]
[ConditionalTheory]
[MemberData(nameof(HostNameData))]
[ActiveIssue("https://github.com/dotnet/runtime/issues/68206", TestPlatforms.Android)]
public async Task SslStream_ServerCallbackNotSet_UsesLocalCertificateSelection(string hostName)
{
if (PlatformDetection.IsAndroid && hostName.ToCharArray().Any(c => !char.IsAscii(c)))
throw new SkipTestException("Android does not support non-ASCII host names");

using X509Certificate serverCert = Configuration.Certificates.GetSelfSignedServerCertificate();

int timesCallbackCalled = 0;
Expand Down