Changeset 271170 in webkit
- Timestamp:
- Jan 5, 2021, 12:33:21 PM (6 years ago)
- Location:
- trunk
- Files:
-
- 7 edited
-
ChangeLog (modified) (1 diff)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/PlatformFTW.cmake (modified) (1 diff)
-
Source/WebCore/PlatformWin.cmake (modified) (1 diff)
-
Source/WebCore/platform/network/curl/CurlContext.cpp (modified) (2 diffs)
-
Source/WebCore/platform/network/win/CurlSSLHandleWin.cpp (modified) (1 diff)
-
Source/cmake/OptionsWinCairo.cmake (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ChangeLog
r271138 r271170 1 2021-01-05 Fujii Hironori <Hironori.Fujii@sony.com> 2 3 [WinCairo][curl] Enable CURLSSLOPT_NATIVE_CA flag to use system's CA certs instead of cacert.pem 4 https://bugs.webkit.org/show_bug.cgi?id=220258 5 6 Reviewed by Don Olmstead. 7 8 Libcurl 7.71 added a new flag CURLSSLOPT_NATIVE_CA to use the 9 operating system's native CA store only for Windows. Use the flag 10 for WinCairo port. 11 12 * Source/cmake/OptionsWinCairo.cmake: Bumped the minimum Curl version. 13 1 14 2021-01-04 Lauro Moura <lmoura@igalia.com> 2 15 -
trunk/Source/WebCore/ChangeLog
r271167 r271170 1 2021-01-05 Fujii Hironori <Hironori.Fujii@sony.com> 2 3 [WinCairo][curl] Enable CURLSSLOPT_NATIVE_CA flag to use system's CA certs instead of cacert.pem 4 https://bugs.webkit.org/show_bug.cgi?id=220258 5 6 Reviewed by Don Olmstead. 7 8 * PlatformFTW.cmake: Removed the code copying pem file. 9 * PlatformWin.cmake: Ditto. 10 * platform/network/curl/CurlContext.cpp: 11 (WebCore::CurlHandle::enableSSLForHost): 12 (WebCore::CurlHandle::enableHttp): Set CURLOPT_SSL_OPTIONS with CURLSSLOPT_NATIVE_CA. 13 * platform/network/win/CurlSSLHandleWin.cpp: 14 (WebCore::CurlSSLHandle::platformInitialize): 15 (WebCore::getCACertPathEnv): Deleted. 16 1 17 2021-01-05 Ryan Haddad <ryanhaddad@apple.com> 2 18 -
trunk/Source/WebCore/PlatformFTW.cmake
r270940 r271170 258 258 ) 259 259 260 if (EXISTS ${WEBKIT_LIBRARIES_DIR}/etc/ssl/cert.pem)261 make_directory(${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/WebKit.resources/certificates)262 file(COPY263 ${WEBKIT_LIBRARIES_DIR}/etc/ssl/cert.pem264 DESTINATION265 ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/WebKit.resources/certificates266 )267 file(RENAME268 ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/WebKit.resources/certificates/cert.pem269 ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/WebKit.resources/certificates/cacert.pem270 )271 endif ()272 273 260 set(WebCore_OUTPUT_NAME WebCore${DEBUG_SUFFIX}) -
trunk/Source/WebCore/PlatformWin.cmake
r270940 r271170 217 217 ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/WebKit.resources 218 218 ) 219 if (WTF_PLATFORM_WIN_CAIRO AND EXISTS ${WEBKIT_LIBRARIES_DIR}/etc/ssl/cert.pem)220 make_directory(${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/WebKit.resources/certificates)221 file(COPY222 ${WEBKIT_LIBRARIES_DIR}/etc/ssl/cert.pem223 DESTINATION224 ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/WebKit.resources/certificates225 )226 file(RENAME227 ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/WebKit.resources/certificates/cert.pem228 ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/WebKit.resources/certificates/cacert.pem229 )230 endif ()231 219 232 220 set(WebCore_OUTPUT_NAME WebCore${DEBUG_SUFFIX}) -
trunk/Source/WebCore/platform/network/curl/CurlContext.cpp
r257656 r271170 333 333 setSslCtxCallbackFunction(willSetupSslCtxCallback, this); 334 334 335 #if !OS(WINDOWS) 335 336 if (auto* path = WTF::get_if<String>(sslHandle.getCACertInfo())) 336 337 setCACertPath(path->utf8().data()); 338 #endif 337 339 } 338 340 … … 460 462 curl_easy_setopt(m_handle, CURLOPT_SSL_ENABLE_ALPN, 1L); 461 463 curl_easy_setopt(m_handle, CURLOPT_SSL_ENABLE_NPN, 0L); 464 #if OS(WINDOWS) 465 curl_easy_setopt(m_handle, CURLOPT_SSL_OPTIONS, CURLSSLOPT_NATIVE_CA); 466 #endif 462 467 } else 463 468 curl_easy_setopt(m_handle, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1); -
trunk/Source/WebCore/platform/network/win/CurlSSLHandleWin.cpp
r241654 r271170 27 27 #include "CurlSSLHandle.h" 28 28 29 #if USE(CF)30 #if OS(WINDOWS)31 #include "WebCoreBundleWin.h"32 #endif33 34 #include <wtf/RetainPtr.h>35 #endif36 37 29 namespace WebCore { 38 39 static String getCACertPathEnv()40 {41 char* envPath = getenv("CURL_CA_BUNDLE_PATH");42 if (envPath)43 return String(envPath);44 45 #if USE(CF)46 CFBundleRef webKitBundleRef = webKitBundle();47 if (webKitBundleRef) {48 RetainPtr<CFURLRef> certURLRef = adoptCF(CFBundleCopyResourceURL(webKitBundleRef, CFSTR("cacert"), CFSTR("pem"), CFSTR("certificates")));49 if (certURLRef) {50 char path[MAX_PATH];51 if (CFURLGetFileSystemRepresentation(certURLRef.get(), false, reinterpret_cast<UInt8*>(path), MAX_PATH) && *path)52 return String(path);53 }54 }55 #endif56 57 return String();58 }59 30 60 31 void CurlSSLHandle::platformInitialize() 61 32 { 62 auto caCertPath = getCACertPathEnv();63 if (!caCertPath.isEmpty())64 setCACertPath(WTFMove(caCertPath));65 33 } 66 34 -
trunk/Source/cmake/OptionsWinCairo.cmake
r270899 r271170 7 7 8 8 find_package(Cairo 1.15.12 REQUIRED) 9 find_package(CURL 7. 60.0 REQUIRED)9 find_package(CURL 7.71.0 REQUIRED) 10 10 find_package(ICU 60.2 REQUIRED COMPONENTS data i18n uc) 11 11 find_package(JPEG 1.5.2 REQUIRED)
Note:
See TracChangeset
for help on using the changeset viewer.