提交 f0ed8c33 编写于 作者: R Richard Stanway

UI/updater: Enable HTTP2 and TLS 1.3

Unfortunately WinHTTP doesn't support multiplexing with HTTP2, but there
is still some minor benefit to enabling it. Windows 10 21H1 will enable
TLS 1.3 client support in Schannel, so let's get ready for it.
上级 513e95d0
......@@ -339,7 +339,10 @@ static inline void CleanupPartialUpdates()
bool DownloadWorkerThread()
{
const DWORD tlsProtocols = WINHTTP_FLAG_SECURE_PROTOCOL_TLS1_2;
const DWORD tlsProtocols = WINHTTP_FLAG_SECURE_PROTOCOL_TLS1_2 |
WINHTTP_FLAG_SECURE_PROTOCOL_TLS1_3;
const DWORD enableHTTP2Flag = WINHTTP_PROTOCOL_FLAG_HTTP2;
HttpHandle hSession = WinHttpOpen(L"OBS Studio Updater/2.1",
WINHTTP_ACCESS_TYPE_DEFAULT_PROXY,
......@@ -354,6 +357,9 @@ bool DownloadWorkerThread()
WinHttpSetOption(hSession, WINHTTP_OPTION_SECURE_PROTOCOLS,
(LPVOID)&tlsProtocols, sizeof(tlsProtocols));
WinHttpSetOption(hSession, WINHTTP_OPTION_ENABLE_HTTP_PROTOCOL,
(LPVOID)&enableHTTP2Flag, sizeof(enableHTTP2Flag));
HttpHandle hConnect = WinHttpConnect(hSession,
L"cdn-fastly.obsproject.com",
INTERNET_DEFAULT_HTTPS_PORT, 0);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册