Re-enable SSL tests cross plat Home/#2477

This commit is contained in:
Chris Ross (ASP.NET) 2018-04-02 10:40:12 -07:00
parent 76f78136d6
commit 612db42772
2 changed files with 3 additions and 10 deletions

View File

@ -165,13 +165,7 @@ namespace Microsoft.AspNetCore.WebSockets.ConformanceTest.Autobahn
// Mac HttpClient on NetCoreApp2.0 doesn't alow you to set some combinations. // Mac HttpClient on NetCoreApp2.0 doesn't alow you to set some combinations.
// https://github.com/dotnet/corefx/blob/586cffcdfdf23ad6c193a4bf37fce88a1bf69508/src/System.Net.Http/src/System/Net/Http/CurlHandler/CurlHandler.SslProvider.OSX.cs#L104-L106 // https://github.com/dotnet/corefx/blob/586cffcdfdf23ad6c193a4bf37fce88a1bf69508/src/System.Net.Http/src/System/Net/Http/CurlHandler/CurlHandler.SslProvider.OSX.cs#L104-L106
handler.SslProtocols = SslProtocols.Tls12 | SslProtocols.Tls11 | SslProtocols.Tls; handler.SslProtocols = SslProtocols.Tls12 | SslProtocols.Tls11 | SslProtocols.Tls;
if (ssl) handler.ServerCertificateCustomValidationCallback = HttpClientHandler.DangerousAcceptAnyServerCertificateValidator;
{
// Don't take this out of the "if(ssl)". If we set it on some platforms, it crashes
// So we avoid running SSL tests on those platforms (for now).
// See https://github.com/dotnet/corefx/issues/9728
handler.ServerCertificateCustomValidationCallback = (_, __, ___, ____) => true;
}
var client = result.CreateHttpClient(handler); var client = result.CreateHttpClient(handler);
// Make sure the server works // Make sure the server works

View File

@ -62,12 +62,11 @@ namespace Microsoft.AspNetCore.WebSockets.ConformanceTest
using (var tester = new AutobahnTester(loggerFactory, spec)) using (var tester = new AutobahnTester(loggerFactory, spec))
{ {
await tester.DeployTestAndAddToSpec(ServerType.Kestrel, ssl: false, environment: "ManagedSockets", cancellationToken: cts.Token); await tester.DeployTestAndAddToSpec(ServerType.Kestrel, ssl: false, environment: "ManagedSockets", cancellationToken: cts.Token);
await tester.DeployTestAndAddToSpec(ServerType.Kestrel, ssl: true, environment: "ManagedSockets", cancellationToken: cts.Token);
// Windows-only WebListener tests, and Kestrel SSL tests (due to: https://github.com/aspnet/WebSockets/issues/102) // Windows-only WebListener tests
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{ {
await tester.DeployTestAndAddToSpec(ServerType.Kestrel, ssl: true, environment: "ManagedSockets", cancellationToken: cts.Token);
if (IsWindows8OrHigher()) if (IsWindows8OrHigher())
{ {
// WebListener occasionally gives a non-strict response on 3.2. IIS Express seems to have the same behavior. Wonder if it's related to HttpSys? // WebListener occasionally gives a non-strict response on 3.2. IIS Express seems to have the same behavior. Wonder if it's related to HttpSys?