Skip to content

Commit ef52aaf

Browse files
MarkLodatogitster
authored andcommitted
http.c: fix compiling with libcurl 7.9.2
Change the minimimum required libcurl version for the http.sslKey option to 7.9.3. Previously, preprocessor macros checked for >= 7.9.2, which is incorrect because CURLOPT_SSLKEY was introduced in 7.9.3. This now allows git to compile with libcurl 7.9.2. Signed-off-by: Mark Lodato <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 6fb37f8 commit ef52aaf

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

http.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ char curl_errorstr[CURL_ERROR_SIZE];
1414

1515
static int curl_ssl_verify = -1;
1616
static const char *ssl_cert;
17-
#if LIBCURL_VERSION_NUM >= 0x070902
17+
#if LIBCURL_VERSION_NUM >= 0x070903
1818
static const char *ssl_key;
1919
#endif
2020
#if LIBCURL_VERSION_NUM >= 0x070908
@@ -119,7 +119,7 @@ static int http_options(const char *var, const char *value, void *cb)
119119
}
120120
if (!strcmp("http.sslcert", var))
121121
return git_config_string(&ssl_cert, var, value);
122-
#if LIBCURL_VERSION_NUM >= 0x070902
122+
#if LIBCURL_VERSION_NUM >= 0x070903
123123
if (!strcmp("http.sslkey", var))
124124
return git_config_string(&ssl_key, var, value);
125125
#endif
@@ -189,7 +189,7 @@ static CURL *get_curl_handle(void)
189189

190190
if (ssl_cert != NULL)
191191
curl_easy_setopt(result, CURLOPT_SSLCERT, ssl_cert);
192-
#if LIBCURL_VERSION_NUM >= 0x070902
192+
#if LIBCURL_VERSION_NUM >= 0x070903
193193
if (ssl_key != NULL)
194194
curl_easy_setopt(result, CURLOPT_SSLKEY, ssl_key);
195195
#endif
@@ -303,7 +303,7 @@ void http_init(struct remote *remote)
303303
curl_ssl_verify = 0;
304304

305305
set_from_env(&ssl_cert, "GIT_SSL_CERT");
306-
#if LIBCURL_VERSION_NUM >= 0x070902
306+
#if LIBCURL_VERSION_NUM >= 0x070903
307307
set_from_env(&ssl_key, "GIT_SSL_KEY");
308308
#endif
309309
#if LIBCURL_VERSION_NUM >= 0x070908

0 commit comments

Comments
 (0)