From 28cfb81542906788ae376c5485c29d1176f39d86 Mon Sep 17 00:00:00 2001 From: "Ram Karteek Yerubandi (Ram)" Date: Mon, 3 Jan 2022 20:32:04 +0530 Subject: [PATCH] TLS 1.3 support with 10.0.22000.0 SDK --- Release/src/http/client/http_client_winhttp.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Release/src/http/client/http_client_winhttp.cpp b/Release/src/http/client/http_client_winhttp.cpp index d6cdb5384a..2ef407b625 100644 --- a/Release/src/http/client/http_client_winhttp.cpp +++ b/Release/src/http/client/http_client_winhttp.cpp @@ -917,10 +917,11 @@ class winhttp_client final : public _http_client_communicator } { - // Enable TLS 1.1 and 1.2 + // Enable TLS 1.1 and 1.2, 1.3 #if (_WIN32_WINNT >= _WIN32_WINNT_VISTA) || defined(CPPREST_FORCE_HTTP_CLIENT_WINHTTPPAL) DWORD secure_protocols(WINHTTP_FLAG_SECURE_PROTOCOL_SSL3 | WINHTTP_FLAG_SECURE_PROTOCOL_TLS1 | - WINHTTP_FLAG_SECURE_PROTOCOL_TLS1_1 | WINHTTP_FLAG_SECURE_PROTOCOL_TLS1_2); + WINHTTP_FLAG_SECURE_PROTOCOL_TLS1_1 | WINHTTP_FLAG_SECURE_PROTOCOL_TLS1_2 + | WINHTTP_FLAG_SECURE_PROTOCOL_TLS1_3); if (!WinHttpSetOption( m_hSession, WINHTTP_OPTION_SECURE_PROTOCOLS, &secure_protocols, sizeof(secure_protocols))) {