Skip to content

Commit 6545b26

Browse files
bk2204ttaylorr
authored andcommitted
git-curl-compat: remove check for curl 7.34.0
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 <[email protected]> Signed-off-by: Taylor Blau <[email protected]>
1 parent f7c0940 commit 6545b26

File tree

3 files changed

+0
-28
lines changed

3 files changed

+0
-28
lines changed

git-curl-compat.h

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

31-
/**
32-
* CURLOPT_LOGIN_OPTIONS was added in 7.34.0, released in December
33-
* 2013.
34-
*
35-
* If we start requiring 7.34.0 we might also be able to remove the
36-
* code conditional on USE_CURL_FOR_IMAP_SEND in imap-send.c, see
37-
* 1e16b255b95 (git-imap-send: use libcurl for implementation,
38-
* 2014-11-09) and the check it added for "072200" in the Makefile.
39-
40-
*/
41-
#if LIBCURL_VERSION_NUM >= 0x072200
42-
#define GIT_CURL_HAVE_CURLOPT_LOGIN_OPTIONS 1
43-
#endif
44-
45-
/**
46-
* CURL_SSLVERSION_TLSv1_[012] was added in 7.34.0, released in
47-
* December 2013.
48-
*/
49-
#if LIBCURL_VERSION_NUM >= 0x072200
50-
#define GIT_CURL_HAVE_CURL_SSLVERSION_TLSv1_0
51-
#endif
52-
5331
/**
5432
* CURLOPT_PINNEDPUBLICKEY was added in 7.39.0, released in November
5533
* 2014. CURLE_SSL_PINNEDPUBKEYNOTMATCH was added in that same version.

http.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,9 @@ static struct {
5252
{ "sslv2", CURL_SSLVERSION_SSLv2 },
5353
{ "sslv3", CURL_SSLVERSION_SSLv3 },
5454
{ "tlsv1", CURL_SSLVERSION_TLSv1 },
55-
#ifdef GIT_CURL_HAVE_CURL_SSLVERSION_TLSv1_0
5655
{ "tlsv1.0", CURL_SSLVERSION_TLSv1_0 },
5756
{ "tlsv1.1", CURL_SSLVERSION_TLSv1_1 },
5857
{ "tlsv1.2", CURL_SSLVERSION_TLSv1_2 },
59-
#endif
6058
#ifdef GIT_CURL_HAVE_CURL_SSLVERSION_TLSv1_3
6159
{ "tlsv1.3", CURL_SSLVERSION_TLSv1_3 },
6260
#endif

imap-send.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1417,15 +1417,11 @@ static CURL *setup_curl(struct imap_server_conf *srvc, struct credential *cred)
14171417
curl_easy_setopt(curl, CURLOPT_PORT, srvc->port);
14181418

14191419
if (srvc->auth_method) {
1420-
#ifndef GIT_CURL_HAVE_CURLOPT_LOGIN_OPTIONS
1421-
warning("No LOGIN_OPTIONS support in this cURL version");
1422-
#else
14231420
struct strbuf auth = STRBUF_INIT;
14241421
strbuf_addstr(&auth, "AUTH=");
14251422
strbuf_addstr(&auth, srvc->auth_method);
14261423
curl_easy_setopt(curl, CURLOPT_LOGIN_OPTIONS, auth.buf);
14271424
strbuf_release(&auth);
1428-
#endif
14291425
}
14301426

14311427
if (!srvc->use_ssl)

0 commit comments

Comments
 (0)