Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/corefx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Köplinger <alex.koeplinger@outlook.com>2021-02-19 23:35:51 +0300
committerAlexander Köplinger <alex.koeplinger@outlook.com>2021-02-19 23:35:51 +0300
commitf57dab4729377040840c42723debe0be34bc48cc (patch)
treec7701ad5eec90615a1da7d2f163391c4410c7eb3 /src/System.Net.Security/tests/FunctionalTests/CertificateValidationClientServer.cs
parentd40c6ddc817cf6a79aadf4247b091bd066cbd760 (diff)
Only use IPv6 if available
Diffstat (limited to 'src/System.Net.Security/tests/FunctionalTests/CertificateValidationClientServer.cs')
-rw-r--r--src/System.Net.Security/tests/FunctionalTests/CertificateValidationClientServer.cs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/System.Net.Security/tests/FunctionalTests/CertificateValidationClientServer.cs b/src/System.Net.Security/tests/FunctionalTests/CertificateValidationClientServer.cs
index e140430c2d..cef721fc25 100644
--- a/src/System.Net.Security/tests/FunctionalTests/CertificateValidationClientServer.cs
+++ b/src/System.Net.Security/tests/FunctionalTests/CertificateValidationClientServer.cs
@@ -43,7 +43,7 @@ namespace System.Net.Security.Tests
[InlineData(true)]
public async Task CertificateValidationClientServer_EndToEnd_Ok(bool useClientSelectionCallback)
{
- IPEndPoint endPoint = new IPEndPoint(IPAddress.IPv6Loopback, 0);
+ IPEndPoint endPoint = new IPEndPoint(Socket.OSSupportsIPv6 ? IPAddress.IPv6Loopback : IPAddress.Loopback, 0);
var server = new TcpListener(endPoint);
server.Start();
@@ -63,7 +63,7 @@ namespace System.Net.Security.Tests
_clientCertificateRemovedByFilter = true;
}
- using (var clientConnection = new TcpClient(AddressFamily.InterNetworkV6))
+ using (var clientConnection = new TcpClient(Socket.OSSupportsIPv6 ? AddressFamily.InterNetworkV6 : AddressFamily.InterNetwork))
{
IPEndPoint serverEndPoint = (IPEndPoint)server.LocalEndpoint;