]> git.ipfire.org Git - thirdparty/git.git/commitdiff
git-curl-compat: remove check for curl 7.34.0
authorbrian m. carlson <sandals@crustytoothpaste.net>
Wed, 23 Oct 2024 00:45:51 +0000 (00:45 +0000)
committerTaylor Blau <me@ttaylorr.com>
Wed, 23 Oct 2024 20:16:35 +0000 (16:16 -0400)
libcurl 7.34.0 was released in December 2013, which is well over ten
years ago, and no major operating system vendor is still providing
security support for it.  Debian 8 and Ubuntu 14.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>
git-curl-compat.h
http.c
imap-send.c

index 9100af027f1d4d9d7248bbb3c96254c704b86244..21306fa88f1efbd6ce06536d2ebae79be4362fc9 100644 (file)
  * introduced, oldest first, in the official version of cURL library.
  */
 
-/**
- * CURLOPT_LOGIN_OPTIONS was added in 7.34.0, released in December
- * 2013.
- *
- * If we start requiring 7.34.0 we might also be able to remove the
- * code conditional on USE_CURL_FOR_IMAP_SEND in imap-send.c, see
- * 1e16b255b95 (git-imap-send: use libcurl for implementation,
- * 2014-11-09) and the check it added for "072200" in the Makefile.
-
- */
-#if LIBCURL_VERSION_NUM >= 0x072200
-#define GIT_CURL_HAVE_CURLOPT_LOGIN_OPTIONS 1
-#endif
-
-/**
- * CURL_SSLVERSION_TLSv1_[012] was added in 7.34.0, released in
- * December 2013.
- */
-#if LIBCURL_VERSION_NUM >= 0x072200
-#define GIT_CURL_HAVE_CURL_SSLVERSION_TLSv1_0
-#endif
-
 /**
  * CURLOPT_PINNEDPUBLICKEY was added in 7.39.0, released in November
  * 2014. CURLE_SSL_PINNEDPUBKEYNOTMATCH was added in that same version.
diff --git a/http.c b/http.c
index 633bbf74ee9166a7d0982af1bd35b9cbeafbfd83..ac4b98baa0a76d224d011ce75bd7a1edf9c6a926 100644 (file)
--- a/http.c
+++ b/http.c
@@ -52,11 +52,9 @@ static struct {
        { "sslv2", CURL_SSLVERSION_SSLv2 },
        { "sslv3", CURL_SSLVERSION_SSLv3 },
        { "tlsv1", CURL_SSLVERSION_TLSv1 },
-#ifdef GIT_CURL_HAVE_CURL_SSLVERSION_TLSv1_0
        { "tlsv1.0", CURL_SSLVERSION_TLSv1_0 },
        { "tlsv1.1", CURL_SSLVERSION_TLSv1_1 },
        { "tlsv1.2", CURL_SSLVERSION_TLSv1_2 },
-#endif
 #ifdef GIT_CURL_HAVE_CURL_SSLVERSION_TLSv1_3
        { "tlsv1.3", CURL_SSLVERSION_TLSv1_3 },
 #endif
index ec68a0668777658bd981c3f46e030d4fcd47af34..954cc9be652980575d97ecb75ac30b3abef174ad 100644 (file)
@@ -1417,15 +1417,11 @@ static CURL *setup_curl(struct imap_server_conf *srvc, struct credential *cred)
        curl_easy_setopt(curl, CURLOPT_PORT, srvc->port);
 
        if (srvc->auth_method) {
-#ifndef GIT_CURL_HAVE_CURLOPT_LOGIN_OPTIONS
-               warning("No LOGIN_OPTIONS support in this cURL version");
-#else
                struct strbuf auth = STRBUF_INIT;
                strbuf_addstr(&auth, "AUTH=");
                strbuf_addstr(&auth, srvc->auth_method);
                curl_easy_setopt(curl, CURLOPT_LOGIN_OPTIONS, auth.buf);
                strbuf_release(&auth);
-#endif
        }
 
        if (!srvc->use_ssl)