[release/6.0] fix TLS 1.3 in WinHttpHandler (#59159)
authorgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Wed, 15 Sep 2021 18:03:59 +0000 (11:03 -0700)
committerGitHub <noreply@github.com>
Wed, 15 Sep 2021 18:03:59 +0000 (11:03 -0700)
* add W11 test queue

* move to release config

* move to x66

* fix tls13 detection

* disable failing EventLog tests

* Remove WIndows 11 from CI matrix

Co-authored-by: wfurt <tweinfurt@yahoo.com>
Co-authored-by: Jan Jahoda <jajahoda@microsoft.com>
src/libraries/Common/tests/TestUtilities/System/PlatformDetection.Windows.cs
src/libraries/System.Diagnostics.EventLog/tests/System/Diagnostics/Reader/EventLogRecordTests.cs
src/libraries/System.Diagnostics.EventLog/tests/System/Diagnostics/Reader/ProviderMetadataTests.cs
src/libraries/System.Net.Http.WinHttpHandler/src/System/Net/Http/WinHttpHandler.cs

index 078f29b..d5b2c36 100644 (file)
@@ -57,6 +57,9 @@ namespace System
 
         public static bool IsWindows10Version2004Build19573OrGreater => IsWindowsVersionOrLater(10, 0, 19573);
 
+        // Windows 11 aka 21H2
+        public static bool IsWindows10Version22000OrGreater => IsWindowsVersionOrLater(10, 0, 22000);
+
         public static bool IsWindowsIoTCore
         {
             get
index 6d4f252..7808662 100644 (file)
@@ -90,7 +90,8 @@ namespace System.Diagnostics.Tests
         [ConditionalFact(typeof(Helpers), nameof(Helpers.SupportsEventLogs))]
         public void ExceptionOnce()
         {
-            if (PlatformDetection.IsWindows7) // Null events in PowerShell log
+            if (PlatformDetection.IsWindows7 ||  // Null events in PowerShell log
+                PlatformDetection.IsWindows10Version22000OrGreater) // ActiveIssue("https://github.com/dotnet/runtime/issues/58829")
                 return;
             var query = new EventLogQuery("Application", PathType.LogName, "*[System]") { ReverseDirection = true };
             var eventLog = new EventLogReader(query, Helpers.GetBookmark("Application", PathType.LogName));
index 0f7f451..1a47f63 100644 (file)
@@ -23,6 +23,9 @@ namespace System.Diagnostics.Tests
         [InlineData(false)]
         public void ProviderNameTests(bool noProviderName)
         {
+            if (PlatformDetection.IsWindows10Version22000OrGreater) // ActiveIssue("https://github.com/dotnet/runtime/issues/58829")
+                return;
+
             string log = "Application";
             string source = "Source_" + nameof(ProviderNameTests);
             using (var session = new EventLogSession())
index 9fa4c01..3b4c247 100644 (file)
@@ -44,7 +44,7 @@ namespace System.Net.Http
 
         private static readonly StringWithQualityHeaderValue s_gzipHeaderValue = new StringWithQualityHeaderValue("gzip");
         private static readonly StringWithQualityHeaderValue s_deflateHeaderValue = new StringWithQualityHeaderValue("deflate");
-        private static readonly Lazy<bool> s_supportsTls13 = new Lazy<bool>(CheckTls13Support());
+        private static readonly Lazy<bool> s_supportsTls13 = new Lazy<bool>(() => CheckTls13Support());
 
         [ThreadStatic]
         private static StringBuilder? t_requestHeadersBuilder;