Skip to content

Commit 5987d3b

Browse files
committed
validate we are on linux or macos
1 parent d54b043 commit 5987d3b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/BenchmarksApps/TLS/Kestrel/Program.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
using System.Diagnostics;
22
using System.Net;
33
using System.Net.Security;
4+
using System.Runtime.InteropServices;
45
using System.Security.Authentication;
56
using System.Security.Cryptography.X509Certificates;
67
using Microsoft.AspNetCore.Authentication.Certificate;
@@ -227,6 +228,11 @@ static IPEndPoint CreateIPEndPoint(UrlPrefix urlPrefix)
227228

228229
static void LogOpenSSLVersion()
229230
{
231+
if (!(OperatingSystem.IsLinux() || OperatingSystem.IsMacOS()))
232+
{
233+
return;
234+
}
235+
230236
using var process = new Process()
231237
{
232238
StartInfo =

0 commit comments

Comments
 (0)