From 597ffc8de927428b444c4f7c04d69249cffd0518 Mon Sep 17 00:00:00 2001 From: Kenji Shukuwa Date: Thu, 17 Nov 2022 00:39:26 -0800 Subject: [PATCH] [WinCairo][Curl] Specify cipher suites to use with WinCairo https://bugs.webkit.org/show_bug.cgi?id=214915 Reviewed by Fujii Hironori. Specify cipher suites to use with WinCairo. * Source/WebCore/platform/network/win/CurlSSLHandleWin.cpp: (WebCore::CurlSSLHandle::platformInitialize): Canonical link: https://commits.webkit.org/256775@main --- .../platform/network/win/CurlSSLHandleWin.cpp | 29 ++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/Source/WebCore/platform/network/win/CurlSSLHandleWin.cpp b/Source/WebCore/platform/network/win/CurlSSLHandleWin.cpp index a109c7028e7e..05b89f89eb7d 100644 --- a/Source/WebCore/platform/network/win/CurlSSLHandleWin.cpp +++ b/Source/WebCore/platform/network/win/CurlSSLHandleWin.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018 Sony Interactive Entertainment Inc. + * Copyright (C) 2022 Sony Interactive Entertainment Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -30,6 +30,33 @@ namespace WebCore { void CurlSSLHandle::platformInitialize() { + constexpr auto cipherList = + "TLS_AES_128_GCM_SHA256:" + "TLS_CHACHA20_POLY1305_SHA256:" + "TLS_AES_256_GCM_SHA384:" + "ECDHE-ECDSA-AES128-GCM-SHA256:" + "ECDHE-RSA-AES128-GCM-SHA256:" + "ECDHE-ECDSA-CHACHA20-POLY1305:" + "ECDHE-RSA-CHACHA20-POLY1305:" + "ECDHE-ECDSA-AES256-GCM-SHA384:" + "ECDHE-RSA-AES256-GCM-SHA384:" + "ECDHE-ECDSA-AES256-SHA:" + "ECDHE-ECDSA-AES128-SHA:" + "ECDHE-RSA-AES128-SHA:" + "ECDHE-RSA-AES256-SHA:" + "AES128-GCM-SHA256:" + "AES256-GCM-SHA384:" + "AES128-SHA:" + "AES256-SHA"; + + constexpr auto ecCurves = + "X25519:" + "P-256:" + "P-384:" + "P-521"; + + setCipherList(cipherList); + setECCurves(ecCurves); } }