Skip to content

Commit 8d8e5a8

Browse files
authored
Add support for TLS to Kestrel on macOS (#45722)
1 parent 2e33c67 commit 8d8e5a8

File tree

20 files changed

+60
-71
lines changed

20 files changed

+60
-71
lines changed

src/ProjectTemplates/Web.ProjectTemplates/content/GrpcService-CSharp/Program.Main.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@ public static void Main(string[] args)
88
{
99
var builder = WebApplication.CreateBuilder(args);
1010

11-
// Additional configuration is required to successfully run gRPC on macOS.
12-
// For instructions on how to configure Kestrel and gRPC clients on macOS, visit https://go.microsoft.com/fwlink/?linkid=2099682
13-
1411
// Add services to the container.
1512
builder.Services.AddGrpc();
1613

src/ProjectTemplates/Web.ProjectTemplates/content/GrpcService-CSharp/Program.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
22

33
var builder = WebApplication.CreateBuilder(args);
44

5-
// Additional configuration is required to successfully run gRPC on macOS.
6-
// For instructions on how to configure Kestrel and gRPC clients on macOS, visit https://go.microsoft.com/fwlink/?linkid=2099682
7-
85
// Add services to the container.
96
builder.Services.AddGrpc();
107

src/ProjectTemplates/test/Templates.Tests/GrpcTemplateTest.cs

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -60,16 +60,8 @@ public async Task GrpcTemplate(bool useProgramMain)
6060

6161
using (var serverProcess = project.StartBuiltProjectAsync(hasListeningUri: !unsupported, logger: Logger))
6262
{
63-
// These templates are HTTPS + HTTP/2 only which is not supported on Mac due to missing ALPN support.
64-
// https://github.com/dotnet/aspnetcore/issues/11061
65-
if (isOsx)
66-
{
67-
serverProcess.Process.WaitForExit(assertSuccess: false);
68-
Assert.True(serverProcess.Process.HasExited, "built");
69-
Assert.Contains("System.NotSupportedException: HTTP/2 over TLS is not supported on macOS due to missing ALPN support.",
70-
ErrorMessages.GetFailedProcessMessageOrEmpty("Run built service", project, serverProcess.Process));
71-
}
72-
else if (isWindowsOld)
63+
// These templates are HTTPS + HTTP/2 only which is not supported on some platforms.
64+
if (isWindowsOld)
7365
{
7466
serverProcess.Process.WaitForExit(assertSuccess: false);
7567
Assert.True(serverProcess.Process.HasExited, "built");
@@ -86,16 +78,8 @@ public async Task GrpcTemplate(bool useProgramMain)
8678

8779
using (var aspNetProcess = project.StartPublishedProjectAsync(hasListeningUri: !unsupported))
8880
{
89-
// These templates are HTTPS + HTTP/2 only which is not supported on Mac due to missing ALPN support.
90-
// https://github.com/dotnet/aspnetcore/issues/11061
91-
if (isOsx)
92-
{
93-
aspNetProcess.Process.WaitForExit(assertSuccess: false);
94-
Assert.True(aspNetProcess.Process.HasExited, "published");
95-
Assert.Contains("System.NotSupportedException: HTTP/2 over TLS is not supported on macOS due to missing ALPN support.",
96-
ErrorMessages.GetFailedProcessMessageOrEmpty("Run published service", project, aspNetProcess.Process));
97-
}
98-
else if (isWindowsOld)
81+
// These templates are HTTPS + HTTP/2 only which is not supported on some platforms.
82+
if (isWindowsOld)
9983
{
10084
aspNetProcess.Process.WaitForExit(assertSuccess: false);
10185
Assert.True(aspNetProcess.Process.HasExited, "published");

src/Servers/Kestrel/Core/src/CoreStrings.resx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -548,8 +548,8 @@ For more information on configuring HTTPS see https://go.microsoft.com/fwlink/?l
548548
<data name="RequestTrailersNotAvailable" xml:space="preserve">
549549
<value>The request trailers are not available yet. They may not be available until the full request body is read.</value>
550550
</data>
551-
<data name="Http2NoTlsOsx" xml:space="preserve">
552-
<value>HTTP/2 over TLS is not supported on macOS due to missing ALPN support.</value>
551+
<data name="Http2NoTlsAlpn" xml:space="preserve">
552+
<value>HTTP/2 over TLS is not supported due to missing ALPN support.</value>
553553
</data>
554554
<data name="Http2StreamResetByApplication" xml:space="preserve">
555555
<value>The HTTP/2 stream was reset by the application with error code {errorCode}.</value>
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the MIT license.
3+
4+
namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure;
5+
6+
internal static class TlsAlpn
7+
{
8+
// Replace with https://github.com/dotnet/runtime/issues/79687
9+
public static bool IsSupported { get; } = true;
10+
}

src/Servers/Kestrel/Core/src/Middleware/HttpsConnectionMiddleware.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -466,9 +466,9 @@ internal static HttpProtocols ValidateAndNormalizeHttpProtocols(HttpProtocols ht
466466
// This configuration will always fail per-request, preemptively fail it here. See HttpConnection.SelectProtocol().
467467
if (httpProtocols == HttpProtocols.Http2)
468468
{
469-
if (OperatingSystem.IsMacOS())
469+
if (!TlsAlpn.IsSupported)
470470
{
471-
throw new NotSupportedException(CoreStrings.Http2NoTlsOsx);
471+
throw new NotSupportedException(CoreStrings.Http2NoTlsAlpn);
472472
}
473473
else if (_isWindowsVersionIncompatibleWithHttp2)
474474
{

src/Servers/Kestrel/Kestrel/test/KestrelConfigurationLoaderTests.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -547,6 +547,15 @@ public void ConfigureEndpoint_DoesNotThrowWhen_HttpsConfigIsDeclaredInEndpointDe
547547
public void DefaultConfigSectionCanSetProtocols_MacAndWin7(string input, HttpProtocols expected)
548548
=> DefaultConfigSectionCanSetProtocols(input, expected);
549549

550+
[ConditionalTheory]
551+
[InlineData("http1", HttpProtocols.Http1)]
552+
[InlineData("http2", HttpProtocols.Http2)]
553+
[InlineData("http1AndHttp2", HttpProtocols.Http1AndHttp2)]
554+
// [InlineData("http1AndHttp2andHttp3", HttpProtocols.Http1AndHttp2AndHttp3)] // HTTP/3 not currently supported on macOS
555+
[MinimumOSVersion(OperatingSystems.Windows, WindowsVersions.Win81)]
556+
public void DefaultConfigSectionCanSetProtocols_NonWin7(string input, HttpProtocols expected)
557+
=> DefaultConfigSectionCanSetProtocols(input, expected);
558+
550559
[ConditionalTheory]
551560
[InlineData("http1", HttpProtocols.Http1)]
552561
[InlineData("http2", HttpProtocols.Http2)]

src/Servers/Kestrel/Transport.NamedPipes/test/Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes.Tests.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
<Compile Include="$(KestrelSharedSourceRoot)test\TransportTestHelpers\IHostPortExtensions.cs" Link="shared\TransportTestHelpers\IHostPortExtensions.cs" />
1919
<Content Include="$(KestrelSharedSourceRoot)test\TestCertificates\*.pfx" LinkBase="shared\TestCertificates" CopyToOutputDirectory="PreserveNewest" />
2020
<Compile Include="$(KestrelSharedSourceRoot)test\ServerRetryHelper.cs" LinkBase="shared" />
21+
<Compile Include="$(KestrelSharedSourceRoot)test\TransportTestHelpers\TlsAlpnSupportedAttribute.cs" Link="shared\TransportTestHelpers\TlsAlpnSupportedAttribute.cs" />
2122
</ItemGroup>
2223

2324
<ItemGroup>

src/Servers/Kestrel/Transport.NamedPipes/test/WebHostTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ private static Version GetClientVersion(HttpProtocols protocols)
225225
}
226226

227227
[ConditionalTheory]
228-
[OSSkipCondition(OperatingSystems.MacOSX, SkipReason = "Missing SslStream ALPN support: https://github.com/dotnet/runtime/issues/27727")]
228+
[TlsAlpnSupported]
229229
[InlineData(HttpProtocols.Http1)]
230230
[InlineData(HttpProtocols.Http2)]
231231
public async Task ListenNamedPipeEndpoint_Tls_ClientSuccess(HttpProtocols protocols)
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the MIT license.
3+
4+
namespace Microsoft.AspNetCore.Testing;
5+
6+
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Class, AllowMultiple = false)]
7+
public class TlsAlpnSupportedAttribute : Attribute, ITestCondition
8+
{
9+
public bool IsMet => true; // Replace with https://github.com/dotnet/runtime/issues/79687
10+
public string SkipReason => "TLS ALPN is not supported on the current test machine";
11+
}

src/Servers/Kestrel/test/FunctionalTests/Http2/HandshakeTests.cs

Lines changed: 2 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -39,27 +39,6 @@ public HandshakeTests()
3939
};
4040
}
4141

42-
[ConditionalFact]
43-
[OSSkipCondition(OperatingSystems.Linux | OperatingSystems.Windows)]
44-
// Mac SslStream is missing ALPN support: https://github.com/dotnet/runtime/issues/27727
45-
public void TlsAndHttp2NotSupportedOnMac()
46-
{
47-
var ex = Assert.Throws<NotSupportedException>(() => new TestServer(context =>
48-
{
49-
throw new NotImplementedException();
50-
}, new TestServiceContext(LoggerFactory),
51-
kestrelOptions =>
52-
{
53-
kestrelOptions.Listen(IPAddress.Loopback, 0, listenOptions =>
54-
{
55-
listenOptions.Protocols = HttpProtocols.Http2;
56-
listenOptions.UseHttps(_x509Certificate2);
57-
});
58-
}));
59-
60-
Assert.Equal("HTTP/2 over TLS is not supported on macOS due to missing ALPN support.", ex.Message);
61-
}
62-
6342
[ConditionalFact]
6443
[OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)]
6544
[MaximumOSVersion(OperatingSystems.Windows, WindowsVersions.Win7)]
@@ -83,7 +62,7 @@ public void TlsAndHttp2NotSupportedOnWin7()
8362
}
8463

8564
[ConditionalFact]
86-
[OSSkipCondition(OperatingSystems.MacOSX, SkipReason = "Missing SslStream ALPN support: https://github.com/dotnet/runtime/issues/27727")]
65+
[TlsAlpnSupported]
8766
[MinimumOSVersion(OperatingSystems.Windows, WindowsVersions.Win10)]
8867
public async Task TlsAlpnHandshakeSelectsHttp2From1and2()
8968
{
@@ -111,7 +90,7 @@ public async Task TlsAlpnHandshakeSelectsHttp2From1and2()
11190
}
11291

11392
[ConditionalFact]
114-
[OSSkipCondition(OperatingSystems.MacOSX, SkipReason = "Missing SslStream ALPN support: https://github.com/dotnet/runtime/issues/27727")]
93+
[TlsAlpnSupported]
11594
[MinimumOSVersion(OperatingSystems.Windows, WindowsVersions.Win10)]
11695
public async Task TlsAlpnHandshakeSelectsHttp2()
11796
{

src/Servers/Kestrel/test/FunctionalTests/Http2/ShutdownTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Sockets.FunctionalTests.Http2;
2424
namespace Microsoft.AspNetCore.Server.Kestrel.FunctionalTests.Http2;
2525
#endif
2626

27-
[OSSkipCondition(OperatingSystems.MacOSX, SkipReason = "Missing SslStream ALPN support: https://github.com/dotnet/runtime/issues/27727")]
27+
[TlsAlpnSupported]
2828
[MinimumOSVersion(OperatingSystems.Windows, WindowsVersions.Win10)]
2929
public class ShutdownTests : TestApplicationErrorLoggerLoggedTest
3030
{

src/Servers/Kestrel/test/InMemory.FunctionalTests/EventSourceTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ await connection.ReceiveEnd("HTTP/1.1 101 Switching Protocols",
142142
}
143143

144144
[ConditionalFact]
145-
[OSSkipCondition(OperatingSystems.MacOSX, SkipReason = "Missing SslStream ALPN support: https://github.com/dotnet/runtime/issues/27727")]
145+
[TlsAlpnSupported]
146146
[MinimumOSVersion(OperatingSystems.Windows, WindowsVersions.Win10)]
147147
public async Task Http2_EmitsStartAndStopEventsWithActivityIds()
148148
{

src/Servers/Kestrel/test/InMemory.FunctionalTests/Http2/TlsTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public class TlsTests : LoggedTest
2525
private static readonly X509Certificate2 _x509Certificate2 = TestResources.GetTestCertificate();
2626

2727
[ConditionalFact]
28-
[OSSkipCondition(OperatingSystems.MacOSX, SkipReason = "Missing SslStream ALPN support: https://github.com/dotnet/runtime/issues/27727")]
28+
[TlsAlpnSupported]
2929
[OSSkipCondition(OperatingSystems.Linux, SkipReason = "TLS 1.1 ciphers are now disabled by default: https://github.com/dotnet/docs/issues/20842")]
3030
[MinimumOSVersion(OperatingSystems.Windows, WindowsVersions.Win10,
3131
SkipReason = "Missing Windows ALPN support: https://en.wikipedia.org/wiki/Application-Layer_Protocol_Negotiation#Support or incompatible ciphers on Windows 8.1")]

src/Servers/Kestrel/test/InMemory.FunctionalTests/HttpsConnectionMiddlewareTests.cs

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -529,6 +529,7 @@ void ConfigureListenOptions(ListenOptions listenOptions)
529529
[ConditionalTheory]
530530
[InlineData(HttpProtocols.Http1)]
531531
[InlineData(HttpProtocols.Http1AndHttp2)] // Make sure turning on Http/2 doesn't regress HTTP/1
532+
[TlsAlpnSupported]
532533
[OSSkipCondition(OperatingSystems.MacOSX, SkipReason = "Missing platform support.")]
533534
[SkipOnHelix("https://github.com/dotnet/aspnetcore/issues/33566#issuecomment-892031659", Queues = HelixConstants.RedhatAmd64)] // Outdated OpenSSL client
534535
public async Task CanRenegotiateForClientCertificate(HttpProtocols httpProtocols)
@@ -611,6 +612,7 @@ void ConfigureListenOptions(ListenOptions listenOptions)
611612
}
612613

613614
[ConditionalFact]
615+
[TlsAlpnSupported]
614616
[OSSkipCondition(OperatingSystems.MacOSX, SkipReason = "Missing platform support.")]
615617
[SkipOnHelix("https://github.com/dotnet/aspnetcore/issues/33566#issuecomment-892031659", Queues = HelixConstants.RedhatAmd64)] // Outdated OpenSSL client
616618
public async Task CanRenegotiateForTlsCallbackOptions()
@@ -658,6 +660,7 @@ void ConfigureListenOptions(ListenOptions listenOptions)
658660
}
659661

660662
[ConditionalFact]
663+
[TlsAlpnSupported]
661664
[OSSkipCondition(OperatingSystems.MacOSX, SkipReason = "Missing platform support.")]
662665
[SkipOnHelix("https://github.com/dotnet/aspnetcore/issues/33566#issuecomment-892031659", Queues = HelixConstants.RedhatAmd64)] // Outdated OpenSSL client
663666
public async Task CanRenegotiateForClientCertificateOnHttp1CanReturnNoCert()
@@ -782,6 +785,7 @@ void ConfigureListenOptions(ListenOptions listenOptions)
782785
// TLS 1.2 and lower have to renegotiate the whole connection to get a client cert, and if that hits an error
783786
// then the connection is aborted.
784787
[OSSkipCondition(OperatingSystems.MacOSX, SkipReason = "Missing platform support.")]
788+
[TlsAlpnSupported]
785789
[SkipOnHelix("https://github.com/dotnet/aspnetcore/issues/33566#issuecomment-892031659", Queues = HelixConstants.RedhatAmd64)] // Outdated OpenSSL client
786790
public async Task RenegotiateForClientCertificateOnPostWithoutBufferingThrows()
787791
{
@@ -824,7 +828,7 @@ void ConfigureListenOptions(ListenOptions listenOptions)
824828

825829
[ConditionalFact]
826830
[MinimumOSVersion(OperatingSystems.Windows, WindowsVersions.Win10)] // HTTP/2 requires Win10
827-
[OSSkipCondition(OperatingSystems.MacOSX, SkipReason = "ALPN not supported")]
831+
[TlsAlpnSupported]
828832
public async Task ServerOptionsSelectionCallback_SetsALPN()
829833
{
830834
static void ConfigureListenOptions(ListenOptions listenOptions)
@@ -852,7 +856,7 @@ await stream.AuthenticateAsClientAsync(new SslClientAuthenticationOptions()
852856

853857
[ConditionalFact]
854858
[MinimumOSVersion(OperatingSystems.Windows, WindowsVersions.Win10)] // HTTP/2 requires Win10
855-
[OSSkipCondition(OperatingSystems.MacOSX, SkipReason = "ALPN not supported")]
859+
[TlsAlpnSupported]
856860
public async Task TlsHandshakeCallbackOptionsOverload_SetsALPN()
857861
{
858862
static void ConfigureListenOptions(ListenOptions listenOptions)
@@ -884,7 +888,7 @@ await stream.AuthenticateAsClientAsync(new SslClientAuthenticationOptions()
884888
}
885889

886890
[ConditionalFact]
887-
[OSSkipCondition(OperatingSystems.MacOSX, SkipReason = "ALPN not supported")]
891+
[TlsAlpnSupported]
888892
public async Task TlsHandshakeCallbackOptionsOverload_EmptyAlpnList_DisablesAlpn()
889893
{
890894
static void ConfigureListenOptions(ListenOptions listenOptions)
@@ -917,6 +921,7 @@ await stream.AuthenticateAsClientAsync(new SslClientAuthenticationOptions()
917921
}
918922

919923
[ConditionalFact]
924+
[TlsAlpnSupported]
920925
[OSSkipCondition(OperatingSystems.MacOSX, SkipReason = "Missing platform support.")]
921926
[SkipOnHelix("https://github.com/dotnet/aspnetcore/issues/33566#issuecomment-892031659", Queues = HelixConstants.RedhatAmd64)] // Outdated OpenSSL client
922927
public async Task CanRenegotiateForClientCertificateOnPostIfDrained()
@@ -964,6 +969,7 @@ void ConfigureListenOptions(ListenOptions listenOptions)
964969

965970
[ConditionalFact]
966971
[OSSkipCondition(OperatingSystems.MacOSX, SkipReason = "Missing platform support.")]
972+
[TlsAlpnSupported]
967973
[SkipOnHelix("https://github.com/dotnet/aspnetcore/issues/33566#issuecomment-892031659", Queues = HelixConstants.RedhatAmd64)] // Outdated OpenSSL client
968974
public async Task RenegotationFailureCausesConnectionClose()
969975
{
@@ -1265,7 +1271,7 @@ public void ThrowsForCertificatesMissingServerEku(string testCertName)
12651271
[InlineData(HttpProtocols.Http1)]
12661272
[InlineData(HttpProtocols.Http2)]
12671273
[InlineData(HttpProtocols.Http1AndHttp2)]
1268-
[OSSkipCondition(OperatingSystems.MacOSX, SkipReason = "Missing SslStream ALPN support: https://github.com/dotnet/runtime/issues/27727")]
1274+
[TlsAlpnSupported]
12691275
[MinimumOSVersion(OperatingSystems.Windows, WindowsVersions.Win10)]
12701276
public async Task ListenOptionsProtolsCanBeSetAfterUseHttps(HttpProtocols httpProtocols)
12711277
{

src/Servers/Kestrel/test/InMemory.FunctionalTests/InMemory.FunctionalTests.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
<Compile Include="$(KestrelSharedSourceRoot)\TransportConnection.cs" Link="Internal\TransportConnection.cs" />
2323
<Compile Include="$(KestrelSharedSourceRoot)\TransportConnection.Generated.cs" Link="Internal\TransportConnection.Generated.cs" />
2424
<Compile Include="$(KestrelSharedSourceRoot)\TransportConnection.FeatureCollection.cs" Link="Internal\TransportConnection.FeatureCollection.cs" />
25+
<Compile Include="$(KestrelSharedSourceRoot)test\TransportTestHelpers\TlsAlpnSupportedAttribute.cs" Link="shared\TransportTestHelpers\TlsAlpnSupportedAttribute.cs" />
2526
<Compile Include="$(SharedSourceRoot)TypeNameHelper\*.cs" />
2627

2728
<Content Include="$(KestrelSharedSourceRoot)test\TestCertificates\*.pfx" LinkBase="shared\TestCertificates" CopyToOutputDirectory="PreserveNewest" />

src/Servers/Kestrel/test/Interop.FunctionalTests/ChromeTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ private void InitializeArgs()
6464
}
6565

6666
[ConditionalTheory(Skip = "Disabling while debugging. https://github.com/dotnet/aspnetcore-internal/issues/1363")]
67-
[OSSkipCondition(OperatingSystems.MacOSX, SkipReason = "Missing SslStream ALPN support: https://github.com/dotnet/runtime/issues/27727")]
67+
[TlsAlpnSupported]
6868
[MinimumOSVersion(OperatingSystems.Windows, WindowsVersions.Win81, SkipReason = "Missing Windows ALPN support: https://en.wikipedia.org/wiki/Application-Layer_Protocol_Negotiation#Support")]
6969
[InlineData("", "Interop HTTP/2 GET")]
7070
[InlineData("?TestMethod=POST", "Interop HTTP/2 POST")]

src/Servers/Kestrel/test/Interop.FunctionalTests/Interop.FunctionalTests.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@
2323
<Compile Include="$(KestrelSharedSourceRoot)test\TestResources.cs" LinkBase="shared" />
2424
<Compile Include="$(SharedSourceRoot)HttpClient\HttpEventSourceListener.cs" LinkBase="shared" />
2525
<Content Include="$(KestrelSharedSourceRoot)test\TestCertificates\*.pfx" LinkBase="shared\TestCertificates" CopyToOutputDirectory="PreserveNewest" />
26-
<Compile Include="$(KestrelSharedSourceRoot)test\TransportTestHelpers\MsQuicSupportedAttribute.cs" LinkBase="shared\TransportTestHelpers\MsQuicSupportedAttribute.cs" />
26+
<Compile Include="$(KestrelSharedSourceRoot)test\TransportTestHelpers\MsQuicSupportedAttribute.cs" Link="shared\TransportTestHelpers\MsQuicSupportedAttribute.cs" />
27+
<Compile Include="$(KestrelSharedSourceRoot)test\TransportTestHelpers\TlsAlpnSupportedAttribute.cs" Link="shared\TransportTestHelpers\TlsAlpnSupportedAttribute.cs" />
2728
<Compile Include="$(KestrelSharedSourceRoot)test\ServerRetryHelper.cs" LinkBase="shared" />
2829
</ItemGroup>
2930

src/Servers/Kestrel/test/Interop.FunctionalTests/Utilities.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ internal static bool CurrentPlatformSupportsHTTP2OverTls()
1111
{
1212
return // "Missing Windows ALPN support: https://en.wikipedia.org/wiki/Application-Layer_Protocol_Negotiation#Support" or missing compatible ciphers (Win8.1)
1313
new MinimumOSVersionAttribute(OperatingSystems.Windows, WindowsVersions.Win10).IsMet
14-
// "Missing SslStream ALPN support: https://github.com/dotnet/runtime/issues/27727"
15-
&& new OSSkipConditionAttribute(OperatingSystems.MacOSX).IsMet;
14+
&& new TlsAlpnSupportedAttribute().IsMet;
1615
}
1716
}

0 commit comments

Comments
 (0)