From 852817681bb53874508f57a31848d1b14d2c8a1f Mon Sep 17 00:00:00 2001 From: Jeremy Barton Date: Wed, 19 Jan 2022 15:41:22 -0800 Subject: [PATCH] Fix OpenSSL version check in GetAlpnSupport The previous check failed 3.0.0 because the Minor was 0 and Build was 0. It could probably be rewritten to be `>= new Version(1, 0, 2)`, but that'd require more thinking. --- .../Common/tests/TestUtilities/System/PlatformDetection.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.cs b/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.cs index bdab9c979cc499..52fb34e0e8cd85 100644 --- a/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.cs +++ b/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.cs @@ -216,7 +216,12 @@ private static bool GetAlpnSupport() if (IsOpenSslSupported) { - return OpenSslVersion.Major >= 1 && (OpenSslVersion.Minor >= 1 || OpenSslVersion.Build >= 2); + if (OpenSslVersion.Major >= 3) + { + return true; + } + + return OpenSslVersion.Major == 1 && (OpenSslVersion.Minor >= 1 || OpenSslVersion.Build >= 2); } if (IsAndroid)