git-curl-compat: remove check for curl 7.52.0

libcurl 7.52.0 was released in August 2017, which is over seven years ago, and no major operating system vendor is still providing security support for it. Debian 9 and Ubuntu 18.04, both of which are out of mainstream security support, have supported a newer version, and RHEL 8, which is still in support, also has a newer version. Remove the check for this version and use this functionality unconditionally. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Taylor Blau <me@ttaylorr.com>

brian m. carlson committed Oct 23, 2024 at 00:45 UTC 17de6fd83b03f52a1fcc95cf335f2a704e61df53
2 files changed -23
git-curl-compat.h
-15
@@ -28,21 +28,6 @@
28 * introduced, oldest first, in the official version of cURL library.
29 */
30
31 -/**
32 - * CURLOPT_PROXY_CAINFO was added in 7.52.0, released in August 2017.
33 - */
34 -#if LIBCURL_VERSION_NUM >= 0x073400
35 -#define GIT_CURL_HAVE_CURLOPT_PROXY_CAINFO 1
36 -#endif
37 -
38 -/**
39 - * CURLOPT_PROXY_{KEYPASSWD,SSLCERT,SSLKEY} was added in 7.52.0,
40 - * released in August 2017.
41 - */
42 -#if LIBCURL_VERSION_NUM >= 0x073400
43 -#define GIT_CURL_HAVE_CURLOPT_PROXY_KEYPASSWD 1
44 -#endif
45 -
31 /**
32 * CURL_SSLVERSION_TLSv1_3 was added in 7.53.0, released in February
33 * 2017.
http.c
-8
@@ -691,7 +691,6 @@ static int has_cert_password(void)
691 return 1;
692 }
693
694 -#ifdef GIT_CURL_HAVE_CURLOPT_PROXY_KEYPASSWD
694 static int has_proxy_cert_password(void)
695 {
696 if (http_proxy_ssl_cert == NULL || proxy_ssl_cert_password_required != 1)
@@ -705,7 +704,6 @@ static int has_proxy_cert_password(void)
704 }
705 return 1;
706 }
708 -#endif
707
708 static void set_curl_keepalive(CURL *c)
709 {
@@ -1093,16 +1091,12 @@ static CURL *get_curl_handle(void)
1091 if (http_ssl_backend && !strcmp("schannel", http_ssl_backend) &&
1092 !http_schannel_use_ssl_cainfo) {
1093 curl_easy_setopt(result, CURLOPT_CAINFO, NULL);
1096 -#ifdef GIT_CURL_HAVE_CURLOPT_PROXY_CAINFO
1094 curl_easy_setopt(result, CURLOPT_PROXY_CAINFO, NULL);
1098 -#endif
1095 } else if (ssl_cainfo != NULL || http_proxy_ssl_ca_info != NULL) {
1096 if (ssl_cainfo)
1097 curl_easy_setopt(result, CURLOPT_CAINFO, ssl_cainfo);
1102 -#ifdef GIT_CURL_HAVE_CURLOPT_PROXY_CAINFO
1098 if (http_proxy_ssl_ca_info)
1099 curl_easy_setopt(result, CURLOPT_PROXY_CAINFO, http_proxy_ssl_ca_info);
1105 -#endif
1100 }
1101
1102 if (curl_low_speed_limit > 0 && curl_low_speed_time > 0) {
@@ -1198,7 +1192,6 @@ static CURL *get_curl_handle(void)
1192 else if (starts_with(curl_http_proxy, "socks"))
1193 curl_easy_setopt(result,
1194 CURLOPT_PROXYTYPE, CURLPROXY_SOCKS4);
1201 -#ifdef GIT_CURL_HAVE_CURLOPT_PROXY_KEYPASSWD
1195 else if (starts_with(curl_http_proxy, "https")) {
1196 curl_easy_setopt(result, CURLOPT_PROXYTYPE, CURLPROXY_HTTPS);
1197
@@ -1211,7 +1204,6 @@ static CURL *get_curl_handle(void)
1204 if (has_proxy_cert_password())
1205 curl_easy_setopt(result, CURLOPT_PROXY_KEYPASSWD, proxy_cert_auth.password);
1206 }
1214 -#endif
1207 if (strstr(curl_http_proxy, "://"))
1208 credential_from_url(&proxy_auth, curl_http_proxy);
1209 else {