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>
This commit is contained in:

committed by
Taylor Blau

parent
5c91da6d5b
commit
17de6fd83b
@ -28,21 +28,6 @@
|
|||||||
* introduced, oldest first, in the official version of cURL library.
|
* introduced, oldest first, in the official version of cURL library.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
|
||||||
* CURLOPT_PROXY_CAINFO was added in 7.52.0, released in August 2017.
|
|
||||||
*/
|
|
||||||
#if LIBCURL_VERSION_NUM >= 0x073400
|
|
||||||
#define GIT_CURL_HAVE_CURLOPT_PROXY_CAINFO 1
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
|
||||||
* CURLOPT_PROXY_{KEYPASSWD,SSLCERT,SSLKEY} was added in 7.52.0,
|
|
||||||
* released in August 2017.
|
|
||||||
*/
|
|
||||||
#if LIBCURL_VERSION_NUM >= 0x073400
|
|
||||||
#define GIT_CURL_HAVE_CURLOPT_PROXY_KEYPASSWD 1
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* CURL_SSLVERSION_TLSv1_3 was added in 7.53.0, released in February
|
* CURL_SSLVERSION_TLSv1_3 was added in 7.53.0, released in February
|
||||||
* 2017.
|
* 2017.
|
||||||
|
8
http.c
8
http.c
@ -691,7 +691,6 @@ static int has_cert_password(void)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef GIT_CURL_HAVE_CURLOPT_PROXY_KEYPASSWD
|
|
||||||
static int has_proxy_cert_password(void)
|
static int has_proxy_cert_password(void)
|
||||||
{
|
{
|
||||||
if (http_proxy_ssl_cert == NULL || proxy_ssl_cert_password_required != 1)
|
if (http_proxy_ssl_cert == NULL || proxy_ssl_cert_password_required != 1)
|
||||||
@ -705,7 +704,6 @@ static int has_proxy_cert_password(void)
|
|||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
static void set_curl_keepalive(CURL *c)
|
static void set_curl_keepalive(CURL *c)
|
||||||
{
|
{
|
||||||
@ -1093,16 +1091,12 @@ static CURL *get_curl_handle(void)
|
|||||||
if (http_ssl_backend && !strcmp("schannel", http_ssl_backend) &&
|
if (http_ssl_backend && !strcmp("schannel", http_ssl_backend) &&
|
||||||
!http_schannel_use_ssl_cainfo) {
|
!http_schannel_use_ssl_cainfo) {
|
||||||
curl_easy_setopt(result, CURLOPT_CAINFO, NULL);
|
curl_easy_setopt(result, CURLOPT_CAINFO, NULL);
|
||||||
#ifdef GIT_CURL_HAVE_CURLOPT_PROXY_CAINFO
|
|
||||||
curl_easy_setopt(result, CURLOPT_PROXY_CAINFO, NULL);
|
curl_easy_setopt(result, CURLOPT_PROXY_CAINFO, NULL);
|
||||||
#endif
|
|
||||||
} else if (ssl_cainfo != NULL || http_proxy_ssl_ca_info != NULL) {
|
} else if (ssl_cainfo != NULL || http_proxy_ssl_ca_info != NULL) {
|
||||||
if (ssl_cainfo)
|
if (ssl_cainfo)
|
||||||
curl_easy_setopt(result, CURLOPT_CAINFO, ssl_cainfo);
|
curl_easy_setopt(result, CURLOPT_CAINFO, ssl_cainfo);
|
||||||
#ifdef GIT_CURL_HAVE_CURLOPT_PROXY_CAINFO
|
|
||||||
if (http_proxy_ssl_ca_info)
|
if (http_proxy_ssl_ca_info)
|
||||||
curl_easy_setopt(result, CURLOPT_PROXY_CAINFO, http_proxy_ssl_ca_info);
|
curl_easy_setopt(result, CURLOPT_PROXY_CAINFO, http_proxy_ssl_ca_info);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (curl_low_speed_limit > 0 && curl_low_speed_time > 0) {
|
if (curl_low_speed_limit > 0 && curl_low_speed_time > 0) {
|
||||||
@ -1198,7 +1192,6 @@ static CURL *get_curl_handle(void)
|
|||||||
else if (starts_with(curl_http_proxy, "socks"))
|
else if (starts_with(curl_http_proxy, "socks"))
|
||||||
curl_easy_setopt(result,
|
curl_easy_setopt(result,
|
||||||
CURLOPT_PROXYTYPE, CURLPROXY_SOCKS4);
|
CURLOPT_PROXYTYPE, CURLPROXY_SOCKS4);
|
||||||
#ifdef GIT_CURL_HAVE_CURLOPT_PROXY_KEYPASSWD
|
|
||||||
else if (starts_with(curl_http_proxy, "https")) {
|
else if (starts_with(curl_http_proxy, "https")) {
|
||||||
curl_easy_setopt(result, CURLOPT_PROXYTYPE, CURLPROXY_HTTPS);
|
curl_easy_setopt(result, CURLOPT_PROXYTYPE, CURLPROXY_HTTPS);
|
||||||
|
|
||||||
@ -1211,7 +1204,6 @@ static CURL *get_curl_handle(void)
|
|||||||
if (has_proxy_cert_password())
|
if (has_proxy_cert_password())
|
||||||
curl_easy_setopt(result, CURLOPT_PROXY_KEYPASSWD, proxy_cert_auth.password);
|
curl_easy_setopt(result, CURLOPT_PROXY_KEYPASSWD, proxy_cert_auth.password);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
if (strstr(curl_http_proxy, "://"))
|
if (strstr(curl_http_proxy, "://"))
|
||||||
credential_from_url(&proxy_auth, curl_http_proxy);
|
credential_from_url(&proxy_auth, curl_http_proxy);
|
||||||
else {
|
else {
|
||||||
|
Reference in New Issue
Block a user