mirror of
https://github.com/BepInEx/dotnet-runtime.git
synced 2026-11-27 13:19:31 -10:00
And as a result re-enable parallelism of the test suite, which on my machine reduces the running time of the outerloop tests from 150s to 45s. Commit migrated from https://github.com/dotnet/corefx/commit/3db504ec31fb03162b33e0658870aef5af4e4abe
34 lines
1.3 KiB
C#
34 lines
1.3 KiB
C#
// Licensed to the .NET Foundation under one or more agreements.
|
|
// The .NET Foundation licenses this file to you under the MIT license.
|
|
// See the LICENSE file in the project root for more information.
|
|
|
|
using System.IO;
|
|
using System.Net.Security;
|
|
using System.Net.Sockets;
|
|
using System.Net.Test.Common;
|
|
using System.Runtime.InteropServices;
|
|
using System.Security.Authentication;
|
|
using System.Threading;
|
|
using System.Threading.Tasks;
|
|
using Xunit;
|
|
|
|
namespace System.Net.Http.Functional.Tests
|
|
{
|
|
public partial class HttpClientHandler_SslProtocols_Test
|
|
{
|
|
private bool BackendSupportsSslConfiguration =>
|
|
UseManagedHandler ||
|
|
(CurlSslVersionDescription()?.StartsWith("OpenSSL") ?? false);
|
|
|
|
private bool SSLv3DisabledByDefault =>
|
|
BackendSupportsSslConfiguration ||
|
|
Version.Parse(CurlVersionDescription()) >= new Version(7, 39); // libcurl disables SSLv3 by default starting in v7.39
|
|
|
|
[DllImport("System.Net.Http.Native", EntryPoint = "HttpNative_GetVersionDescription")]
|
|
private static extern string CurlVersionDescription();
|
|
|
|
[DllImport("System.Net.Http.Native", EntryPoint = "HttpNative_GetSslVersionDescription")]
|
|
private static extern string CurlSslVersionDescription();
|
|
}
|
|
}
|