From a79bb7b608398c8bf1518d42306ccefa8f167b5c Mon Sep 17 00:00:00 2001 From: Maxim Ivanov Date: Wed, 3 Aug 2022 08:20:19 +0200 Subject: [PATCH] [curl] Fix SSL on iOS (#26060) * Fix SSL on iOS Enables secure transport SSL backend on iOS. When CURL_CA_BUNDLE is set (defaults to /etc/ssl/cert.pem) curl sets it as CA for every request, but on iOS this file is missing and curl's `sectransp` SSL implementation can't deal with it, failing the request completely. This change makes CURL_CA_BUNDLE to be unset, much like CURL_CA_PATH so that `sectransp` uses system CA store. * Update versions/c-/curl.json Co-authored-by: Frank <65999885+FrankXie05@users.noreply.github.com> Co-authored-by: Frank <65999885+FrankXie05@users.noreply.github.com> --- ports/curl/portfile.cmake | 4 ++-- ports/curl/vcpkg.json | 5 +++-- versions/baseline.json | 2 +- versions/c-/curl.json | 5 +++++ 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/ports/curl/portfile.cmake b/ports/curl/portfile.cmake index 51a38dc525..f8a1f7e2b0 100644 --- a/ports/curl/portfile.cmake +++ b/ports/curl/portfile.cmake @@ -22,7 +22,7 @@ foreach(feature IN ITEMS "schannel" "sspi" "tool" "winldap") endif() endforeach() -if("sectransp" IN_LIST FEATURES AND NOT VCPKG_TARGET_IS_OSX) +if("sectransp" IN_LIST FEATURES AND NOT (VCPKG_TARGET_IS_OSX OR VCPKG_TARGET_IS_IOS)) message(FATAL_ERROR "sectransp is not supported on non-Apple platforms") endif() @@ -61,7 +61,7 @@ if("idn2" IN_LIST FEATURES) endif() if("sectransp" IN_LIST FEATURES) - list(APPEND OPTIONS -DCURL_CA_PATH=none) + list(APPEND OPTIONS -DCURL_CA_PATH=none -DCURL_CA_BUNDLE=none) endif() # UWP targets diff --git a/ports/curl/vcpkg.json b/ports/curl/vcpkg.json index 35a83ce1a8..24b5adfcc7 100644 --- a/ports/curl/vcpkg.json +++ b/ports/curl/vcpkg.json @@ -1,6 +1,7 @@ { "name": "curl", "version": "7.84.0", + "port-version": 1, "description": "A library for transferring data with URLs", "homepage": "https://curl.se/", "license": null, @@ -131,7 +132,7 @@ "features": [ "sectransp" ], - "platform": "osx" + "platform": "osx | ios" }, { "name": "curl", @@ -147,7 +148,7 @@ "features": [ "openssl" ], - "platform": "(uwp | !windows) & !osx & !mingw" + "platform": "(uwp | !windows) & !(osx | ios) & !mingw" } ] }, diff --git a/versions/baseline.json b/versions/baseline.json index 57886a2086..f7cf66db09 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -1770,7 +1770,7 @@ }, "curl": { "baseline": "7.84.0", - "port-version": 0 + "port-version": 1 }, "curlpp": { "baseline": "2018-06-15", diff --git a/versions/c-/curl.json b/versions/c-/curl.json index 52fa7e6325..7099572d11 100644 --- a/versions/c-/curl.json +++ b/versions/c-/curl.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "4d64a4ac7f080159be045ccbf0a7fa81ef859cfa", + "version": "7.84.0", + "port-version": 1 + }, { "git-tree": "984e0a92df662f6022989c2b5889e7d9f1c133d5", "version": "7.84.0",