From 3cb27ce2450770d8e4085d4bd1f51bf3701816c5 Mon Sep 17 00:00:00 2001 From: "Jason A. Cox" Date: Sun, 13 Sep 2020 15:57:06 -0700 Subject: [PATCH] Updated to libcurl 7.72.0 --- README.md | 4 ++-- build.sh | 17 +++++++++++------ example/iOS Test App/include/curl/curl.h | 17 +++++++++++------ example/iOS Test App/include/curl/curlver.h | 10 +++++----- example/iOS Test App/include/curl/multi.h | 10 ++++++---- .../iOS Test App/include/openssl/opensslconf.h | 6 ------ 6 files changed, 35 insertions(+), 29 deletions(-) diff --git a/README.md b/README.md index 2bcd5af..1b8a225 100644 --- a/README.md +++ b/README.md @@ -44,7 +44,7 @@ cd Build-OpenSSL-cURL Default versions are specified in the `build.sh` script but you can specify the version you want to build via the command line, e.g.: ```bash -./build.sh -o 1.1.1g -c 7.71.1 -n 1.41.0 +./build.sh -o 1.1.1g -c 7.72.0 -n 1.41.0 ``` You can update the default version by editing this section in the `build.sh` script: @@ -55,7 +55,7 @@ You can update the default version by editing this section in the `build.sh` scr ################################################ OPENSSL="1.1.1g" # https://www.openssl.org/source/ -LIBCURL="7.71.1" # https://curl.haxx.se/download.html +LIBCURL="7.72.0" # https://curl.haxx.se/download.html NGHTTP2="1.41.0" # https://nghttp2.org/ ################################################ diff --git a/build.sh b/build.sh index 392d835..7ef8ad6 100755 --- a/build.sh +++ b/build.sh @@ -11,7 +11,7 @@ ################################################ OPENSSL="1.1.1g" # https://www.openssl.org/source/ -LIBCURL="7.71.1" # https://curl.haxx.se/download.html +LIBCURL="7.72.0" # https://curl.haxx.se/download.html NGHTTP2="1.41.0" # https://nghttp2.org/ ################################################ @@ -22,6 +22,7 @@ buildnghttp2="-n" disablebitcode="" colorflag="" catalyst="" +sslv3="" # Formatting default="\033[39m" @@ -42,7 +43,7 @@ usage () echo echo -e "${bold}Usage:${normal}" echo - echo -e " ${subbold}$0${normal} [-o ${dim}${normal}] [-c ${dim}${normal}] [-n ${dim}${normal}] [-d] [-e] [-x] [-h]" + echo -e " ${subbold}$0${normal} [-o ${dim}${normal}] [-c ${dim}${normal}] [-n ${dim}${normal}] [-d] [-e] [-3] [-x] [-h]" echo echo " -o Build OpenSSL version (default $OPENSSL)" echo " -c Build curl version (default $LIBCURL)" @@ -51,13 +52,14 @@ usage () echo " -e Compile with OpenSSL engine support" echo " -b Compile without bitcode" echo " -m Compile Mac Catalyst library [beta]" + echo " -3 Compile with SSLv3" echo " -x No color output" echo " -h Show usage" echo exit 127 } -while getopts "o:c:n:debmxh\?" o; do +while getopts "o:c:n:debm3xh\?" o; do case "${o}" in o) OPENSSL="${OPTARG}" @@ -78,8 +80,11 @@ while getopts "o:c:n:debmxh\?" o; do disablebitcode="-b" ;; m) - catalyst="-m" - ;; + catalyst="-m" + ;; + 3) + sslv3="-3" + ;; x) bold="" subbold="" @@ -112,7 +117,7 @@ START=$(date +%s) echo cd openssl echo -e "${bold}Building OpenSSL${normal}" -./openssl-build.sh -v "$OPENSSL" $engine $colorflag $catalyst +./openssl-build.sh -v "$OPENSSL" $engine $colorflag $catalyst $sslv3 cd .. ## Nghttp2 Build diff --git a/example/iOS Test App/include/curl/curl.h b/example/iOS Test App/include/curl/curl.h index e3531f5..5aeaca9 100644 --- a/example/iOS Test App/include/curl/curl.h +++ b/example/iOS Test App/include/curl/curl.h @@ -2634,10 +2634,6 @@ typedef enum { CURLINFO_PROXY_SSL_VERIFYRESULT = CURLINFO_LONG + 47, CURLINFO_PROTOCOL = CURLINFO_LONG + 48, CURLINFO_SCHEME = CURLINFO_STRING + 49, - /* Fill in new entries below here! */ - - /* Preferably these would be defined conditionally based on the - sizeof curl_off_t being 64-bits */ CURLINFO_TOTAL_TIME_T = CURLINFO_OFF_T + 50, CURLINFO_NAMELOOKUP_TIME_T = CURLINFO_OFF_T + 51, CURLINFO_CONNECT_TIME_T = CURLINFO_OFF_T + 52, @@ -2646,8 +2642,9 @@ typedef enum { CURLINFO_REDIRECT_TIME_T = CURLINFO_OFF_T + 55, CURLINFO_APPCONNECT_TIME_T = CURLINFO_OFF_T + 56, CURLINFO_RETRY_AFTER = CURLINFO_OFF_T + 57, + CURLINFO_EFFECTIVE_METHOD = CURLINFO_STRING + 58, - CURLINFO_LASTONE = 57 + CURLINFO_LASTONE = 58 } CURLINFO; /* CURLINFO_RESPONSE_CODE is the new name for the option previously known as @@ -2748,6 +2745,7 @@ typedef enum { CURLVERSION_FIFTH, CURLVERSION_SIXTH, CURLVERSION_SEVENTH, + CURLVERSION_EIGHTH, CURLVERSION_LAST /* never actually use this */ } CURLversion; @@ -2756,7 +2754,7 @@ typedef enum { meant to be a built-in version number for what kind of struct the caller expects. If the struct ever changes, we redefine the NOW to another enum from above. */ -#define CURLVERSION_NOW CURLVERSION_SEVENTH +#define CURLVERSION_NOW CURLVERSION_EIGHTH struct curl_version_info_data { CURLversion age; /* age of the returned struct */ @@ -2802,6 +2800,11 @@ struct curl_version_info_data { const char *capath; /* the built-in default CURLOPT_CAPATH, might be NULL */ + /* These fields were added in CURLVERSION_EIGHTH */ + unsigned int zstd_ver_num; /* Numeric Zstd version + (MAJOR << 24) | (MINOR << 12) | PATCH */ + const char *zstd_version; /* human readable string. */ + }; typedef struct curl_version_info_data curl_version_info_data; @@ -2836,6 +2839,8 @@ typedef struct curl_version_info_data curl_version_info_data; #define CURL_VERSION_BROTLI (1<<23) /* Brotli features are present. */ #define CURL_VERSION_ALTSVC (1<<24) /* Alt-Svc handling built-in */ #define CURL_VERSION_HTTP3 (1<<25) /* HTTP3 support built-in */ +#define CURL_VERSION_ZSTD (1<<26) /* zstd features are present */ +#define CURL_VERSION_UNICODE (1<<27) /* Unicode support on Windows */ /* * NAME curl_version_info() diff --git a/example/iOS Test App/include/curl/curlver.h b/example/iOS Test App/include/curl/curlver.h index 48d1e46..ce0f7ac 100644 --- a/example/iOS Test App/include/curl/curlver.h +++ b/example/iOS Test App/include/curl/curlver.h @@ -30,13 +30,13 @@ /* This is the version number of the libcurl package from which this header file origins: */ -#define LIBCURL_VERSION "7.71.1" +#define LIBCURL_VERSION "7.72.0" /* The numeric version number is also available "in parts" by using these defines: */ #define LIBCURL_VERSION_MAJOR 7 -#define LIBCURL_VERSION_MINOR 71 -#define LIBCURL_VERSION_PATCH 1 +#define LIBCURL_VERSION_MINOR 72 +#define LIBCURL_VERSION_PATCH 0 /* This is the numeric version of the libcurl version number, meant for easier parsing and comparisons by programs. The LIBCURL_VERSION_NUM define will @@ -57,7 +57,7 @@ CURL_VERSION_BITS() macro since curl's own configure script greps for it and needs it to contain the full number. */ -#define LIBCURL_VERSION_NUM 0x074701 +#define LIBCURL_VERSION_NUM 0x074800 /* * This is the date and time when the full source package was created. The @@ -68,7 +68,7 @@ * * "2007-11-23" */ -#define LIBCURL_TIMESTAMP "2020-07-01" +#define LIBCURL_TIMESTAMP "2020-08-19" #define CURL_VERSION_BITS(x,y,z) ((x)<<16|(y)<<8|(z)) #define CURL_AT_LEAST_VERSION(x,y,z) \ diff --git a/example/iOS Test App/include/curl/multi.h b/example/iOS Test App/include/curl/multi.h index 2e6bb72..b911ba9 100644 --- a/example/iOS Test App/include/curl/multi.h +++ b/example/iOS Test App/include/curl/multi.h @@ -427,12 +427,14 @@ CURL_EXTERN CURLMcode curl_multi_assign(CURLM *multi_handle, * Name: curl_push_callback * * Desc: This callback gets called when a new stream is being pushed by the - * server. It approves or denies the new stream. + * server. It approves or denies the new stream. It can also decide + * to completely fail the connection. * - * Returns: CURL_PUSH_OK or CURL_PUSH_DENY. + * Returns: CURL_PUSH_OK, CURL_PUSH_DENY or CURL_PUSH_ERROROUT */ -#define CURL_PUSH_OK 0 -#define CURL_PUSH_DENY 1 +#define CURL_PUSH_OK 0 +#define CURL_PUSH_DENY 1 +#define CURL_PUSH_ERROROUT 2 /* added in 7.72.0 */ struct curl_pushheaders; /* forward declaration only */ diff --git a/example/iOS Test App/include/openssl/opensslconf.h b/example/iOS Test App/include/openssl/opensslconf.h index 9ce8c9c..d236fd6 100644 --- a/example/iOS Test App/include/openssl/opensslconf.h +++ b/example/iOS Test App/include/openssl/opensslconf.h @@ -84,12 +84,6 @@ extern "C" { #ifndef OPENSSL_NO_SCTP # define OPENSSL_NO_SCTP #endif -#ifndef OPENSSL_NO_SSL3 -# define OPENSSL_NO_SSL3 -#endif -#ifndef OPENSSL_NO_SSL3_METHOD -# define OPENSSL_NO_SSL3_METHOD -#endif #ifndef OPENSSL_NO_UBSAN # define OPENSSL_NO_UBSAN #endif