Skip to content

Commit 17de6fd

Browse files
bk2204ttaylorr
authored andcommitted
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 <[email protected]> Signed-off-by: Taylor Blau <[email protected]>
1 parent 5c91da6 commit 17de6fd

File tree

2 files changed

+0
-23
lines changed

2 files changed

+0
-23
lines changed

git-curl-compat.h

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -28,21 +28,6 @@
2828
* introduced, oldest first, in the official version of cURL library.
2929
*/
3030

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-
4631
/**
4732
* CURL_SSLVERSION_TLSv1_3 was added in 7.53.0, released in February
4833
* 2017.

http.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -691,7 +691,6 @@ static int has_cert_password(void)
691691
return 1;
692692
}
693693

694-
#ifdef GIT_CURL_HAVE_CURLOPT_PROXY_KEYPASSWD
695694
static int has_proxy_cert_password(void)
696695
{
697696
if (http_proxy_ssl_cert == NULL || proxy_ssl_cert_password_required != 1)
@@ -705,7 +704,6 @@ static int has_proxy_cert_password(void)
705704
}
706705
return 1;
707706
}
708-
#endif
709707

710708
static void set_curl_keepalive(CURL *c)
711709
{
@@ -1093,16 +1091,12 @@ static CURL *get_curl_handle(void)
10931091
if (http_ssl_backend && !strcmp("schannel", http_ssl_backend) &&
10941092
!http_schannel_use_ssl_cainfo) {
10951093
curl_easy_setopt(result, CURLOPT_CAINFO, NULL);
1096-
#ifdef GIT_CURL_HAVE_CURLOPT_PROXY_CAINFO
10971094
curl_easy_setopt(result, CURLOPT_PROXY_CAINFO, NULL);
1098-
#endif
10991095
} else if (ssl_cainfo != NULL || http_proxy_ssl_ca_info != NULL) {
11001096
if (ssl_cainfo)
11011097
curl_easy_setopt(result, CURLOPT_CAINFO, ssl_cainfo);
1102-
#ifdef GIT_CURL_HAVE_CURLOPT_PROXY_CAINFO
11031098
if (http_proxy_ssl_ca_info)
11041099
curl_easy_setopt(result, CURLOPT_PROXY_CAINFO, http_proxy_ssl_ca_info);
1105-
#endif
11061100
}
11071101

11081102
if (curl_low_speed_limit > 0 && curl_low_speed_time > 0) {
@@ -1198,7 +1192,6 @@ static CURL *get_curl_handle(void)
11981192
else if (starts_with(curl_http_proxy, "socks"))
11991193
curl_easy_setopt(result,
12001194
CURLOPT_PROXYTYPE, CURLPROXY_SOCKS4);
1201-
#ifdef GIT_CURL_HAVE_CURLOPT_PROXY_KEYPASSWD
12021195
else if (starts_with(curl_http_proxy, "https")) {
12031196
curl_easy_setopt(result, CURLOPT_PROXYTYPE, CURLPROXY_HTTPS);
12041197

@@ -1211,7 +1204,6 @@ static CURL *get_curl_handle(void)
12111204
if (has_proxy_cert_password())
12121205
curl_easy_setopt(result, CURLOPT_PROXY_KEYPASSWD, proxy_cert_auth.password);
12131206
}
1214-
#endif
12151207
if (strstr(curl_http_proxy, "://"))
12161208
credential_from_url(&proxy_auth, curl_http_proxy);
12171209
else {

0 commit comments

Comments
 (0)