git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v2 03/12] git-curl-compat: remove check for curl 7.34.0

From
brian m. carlson <sandals@crustytoothpaste.net>
Date
Oct 23, 2024, 00:45 UTC
Message-ID
<20241023004600.1645313-4-sandals@crustytoothpaste.net>
In-Reply-To
<20241023004600.1645313-1-sandals@crustytoothpaste.net>

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>
---
 git-curl-compat.h | 22 ----------------------
 http.c            |  2 --
 imap-send.c       |  4 ----
 3 files changed, 28 deletions(-)
diff --git a/git-curl-compat.h b/git-curl-compat.h
index 9100af027f..21306fa88f 100644
--- a/git-curl-compat.h
+++ b/git-curl-compat.h
@@ -28,28 +28,6 @@
  * 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 633bbf74ee..ac4b98baa0 100644
--- 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
diff --git a/imap-send.c b/imap-send.c
index ec68a06687..954cc9be65 100644
--- a/imap-send.c
+++ b/imap-send.c
@@ -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)
Previous: brian m. carlsonNext: brian m. carlson
Message 40 of 56 in “Update versions of libcurl and Perl”
  1. 00/13 Update versions of libcurl and Perlbrian m. carlson, Oct 10, 2024
  2. 01/13 git-curl-compat: remove check for curl 7.21.5brian m. carlson, Oct 10, 2024
  3. 02/13 git-curl-compat: remove check for curl 7.25.0brian m. carlson, Oct 10, 2024
  4. 03/13 git-curl-compat: remove check for curl 7.34.0brian m. carlson, Oct 10, 2024
  5. 04/13 git-curl-compat: remove check for curl 7.39.0brian m. carlson, Oct 10, 2024
  6. 05/13 git-curl-compat: remove check for curl 7.43.0brian m. carlson, Oct 10, 2024
  7. 06/13 git-curl-compat: remove check for curl 7.44.0brian m. carlson, Oct 10, 2024
  8. 07/13 git-curl-compat: remove check for curl 7.52.0brian m. carlson, Oct 10, 2024
  9. 09/13 git-curl-compat: remove check for curl 7.56.0brian m. carlson, Oct 10, 2024
  10. Patrick SteinhardtOct 11, 2024
  11. Jeff KingOct 11, 2024
  12. Patrick SteinhardtOct 11, 2024
  13. Junio C HamanoOct 11, 2024
  14. 10/13 INSTALL: document requirement for libcurl 7.61.0brian m. carlson, Oct 10, 2024
  15. 12/13 INSTALL: require Perl 5.26.0brian m. carlson, Oct 10, 2024
  16. Oswald BuddenhagenOct 11, 2024
  17. brian m. carlsonOct 15, 2024
  18. 11/13 Require Perl 5.26.0brian m. carlson, Oct 10, 2024
  19. 08/13 git-curl-compat: remove check for curl 7.53.0brian m. carlson, Oct 10, 2024
  20. 13/13 gitweb: make use of s///rbrian m. carlson, Oct 10, 2024
  21. Jeff KingOct 11, 2024
  22. Junio C HamanoOct 11, 2024
  23. Eric SunshineOct 11, 2024
  24. Junio C HamanoOct 11, 2024
  25. Alejandro R. SedeñoOct 11, 2024
  26. Eric SunshineOct 11, 2024
  27. brian m. carlsonOct 11, 2024
  28. Eric SunshineOct 15, 2024
  29. Taylor BlauOct 15, 2024
  30. brian m. carlsonOct 15, 2024
  31. Alejandro R. SedeñoOct 16, 2024
  32. Eli SchwartzOct 22, 2024
  33. brian m. carlsonOct 22, 2024
  34. Alejandro R. SedeñoOct 11, 2024
  35. Junio C HamanoOct 11, 2024
  36. Alejandro R. SedeñoOct 14, 2024
  37. Patrick SteinhardtOct 17, 2024
  38. 00/12 Update versions of libcurl and Perlbrian m. carlson, Oct 23, 2024
  39. 04/12 git-curl-compat: remove check for curl 7.39.0brian m. carlson, Oct 23, 2024
  40. 03/12 git-curl-compat: remove check for curl 7.34.0brian m. carlson, Oct 23, 2024
  41. 01/12 git-curl-compat: remove check for curl 7.21.5brian m. carlson, Oct 23, 2024
  42. 02/12 git-curl-compat: remove check for curl 7.25.0brian m. carlson, Oct 23, 2024
  43. 05/12 git-curl-compat: remove check for curl 7.43.0brian m. carlson, Oct 23, 2024
  44. 06/12 git-curl-compat: remove check for curl 7.44.0brian m. carlson, Oct 23, 2024
  45. 08/12 git-curl-compat: remove check for curl 7.53.0brian m. carlson, Oct 23, 2024
  46. 09/12 git-curl-compat: remove check for curl 7.56.0brian m. carlson, Oct 23, 2024
  47. 12/12 gitweb: make use of s///rbrian m. carlson, Oct 23, 2024
  48. Oswald BuddenhagenOct 23, 2024
  49. brian m. carlsonOct 24, 2024
  50. 10/12 INSTALL: document requirement for libcurl 7.61.0brian m. carlson, Oct 23, 2024
  51. 11/12 Require Perl 5.26.0brian m. carlson, Oct 23, 2024
  52. rsbecker@nexbridge.comOct 23, 2024
  53. 07/12 git-curl-compat: remove check for curl 7.52.0brian m. carlson, Oct 23, 2024
  54. Taylor BlauOct 23, 2024
  55. Patrick SteinhardtOct 24, 2024
  56. brian m. carlsonOct 24, 2024

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.