Enable HTTP/2 client cert authentication in WinHttpHandler (#33158)
authorAlexander Nikolaev <55398552+alnikola@users.noreply.github.com>
Thu, 19 Mar 2020 14:37:00 +0000 (15:37 +0100)
committerGitHub <noreply@github.com>
Thu, 19 Mar 2020 14:37:00 +0000 (15:37 +0100)
commit188243a1ec2abb19f5d37d8274afa1994e848dd2
tree87cb3da8cf2d7a09d97d3e2a1304e3a4c3dc84aa
parente47e7be443103a1a3a39c29c42fe346095b54942
Enable HTTP/2 client cert authentication in WinHttpHandler (#33158)

Pre-release WinHTTP's version supports client cert authentication over HTTP/2, but the feature must be explicitly opted-in. PR sets WINHTTP_OPTION_ENABLE_HTTP2_PLUS_CLIENT_CERT to TRUE before invoking WinHttpConnect if the request's protocol is HTTP/2 and scheme is HTTPS.

This PR also enables all HTTP 1.1 tests for WinHttpHandler on .Net Core and Framework and the most of HTTP/2 tests on .Net Core.
33 files changed:
src/libraries/Common/src/Interop/Windows/WinHttp/Interop.winhttp_types.cs
src/libraries/Common/tests/System/Net/Http/DefaultCredentialsTest.cs
src/libraries/Common/tests/System/Net/Http/GenericLoopbackServer.cs
src/libraries/Common/tests/System/Net/Http/Http2Frames.cs
src/libraries/Common/tests/System/Net/Http/Http2LoopbackConnection.cs
src/libraries/Common/tests/System/Net/Http/Http2LoopbackServer.cs
src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.AcceptAllCerts.cs
src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.Authentication.cs
src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.Cancellation.cs
src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.ClientCertificates.cs
src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.Cookies.cs
src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.Decompression.cs
src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.MaxResponseHeadersLength.cs
src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.Proxy.cs
src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.ServerCertificates.cs
src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.SslProtocols.cs
src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.cs
src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTestBase.cs
src/libraries/Common/tests/System/Net/Http/HttpProtocolTests.cs
src/libraries/Common/tests/System/Net/Http/LoopbackServer.cs
src/libraries/Common/tests/System/Net/Http/PostScenarioTest.cs
src/libraries/Common/tests/System/Net/Http/QPackTestDecoder.cs
src/libraries/Common/tests/System/Net/Http/ResponseStreamTest.cs
src/libraries/Common/tests/System/Net/StreamArrayExtensions.cs [new file with mode: 0644]
src/libraries/System.Net.Http.WinHttpHandler/src/System/Net/Http/WinHttpHandler.cs
src/libraries/System.Net.Http.WinHttpHandler/tests/FunctionalTests/BaseCertificateTest.cs [new file with mode: 0644]
src/libraries/System.Net.Http.WinHttpHandler/tests/FunctionalTests/ClientCertificateTest.cs [new file with mode: 0644]
src/libraries/System.Net.Http.WinHttpHandler/tests/FunctionalTests/HttpClientHandlerTestBase.WinHttpHandler.cs
src/libraries/System.Net.Http.WinHttpHandler/tests/FunctionalTests/PlatformHandlerTest.cs
src/libraries/System.Net.Http.WinHttpHandler/tests/FunctionalTests/ServerCertificateTest.cs
src/libraries/System.Net.Http.WinHttpHandler/tests/FunctionalTests/System.Net.Http.WinHttpHandler.Functional.Tests.csproj
src/libraries/System.Net.Http.WinHttpHandler/tests/FunctionalTests/WinHttpClientHandler.cs
src/libraries/System.Net.Http.WinHttpHandler/tests/FunctionalTests/WinHttpHandlerTest.cs