* [PATCH] Replace deprecated CURLAUTH_GSSNEGOTIATE with CURLAUTH_NEGOTIATE.
@ 2016-09-28 21:20 Petr Stodulka
0 siblings, 0 replies; only message in thread
From: Petr Stodulka @ 2016-09-28 21:20 UTC (permalink / raw)
To: git; +Cc: pstodulk
Macro CURLAUTH_GSSNEGOTIATE is deprecated since cURL v7.38.0 and
should be used CURLAUTH_NEGOTIATE instead. For compatibility
with older versions of cURL is CURLAUTH_NEGOTIATE set as alias
to CURLAUTH_GSSNEGOTIATE
Signed-off-by: Petr Stodulka <pstodulk@redhat.com>
---
http.c | 4 ++--
http.h | 7 +++++++
remote-curl.c | 2 +-
3 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/http.c b/http.c
index 82ed542..7c2d9ef 100644
--- a/http.c
+++ b/http.c
@@ -79,7 +79,7 @@ static struct {
} proxy_authmethods[] = {
{ "basic", CURLAUTH_BASIC },
{ "digest", CURLAUTH_DIGEST },
- { "negotiate", CURLAUTH_GSSNEGOTIATE },
+ { "negotiate", CURLAUTH_NEGOTIATE },
{ "ntlm", CURLAUTH_NTLM },
#ifdef LIBCURL_CAN_HANDLE_AUTH_ANY
{ "anyauth", CURLAUTH_ANY },
@@ -1277,7 +1277,7 @@ static int handle_curl_result(struct slot_results *results)
return HTTP_NOAUTH;
} else {
#ifdef LIBCURL_CAN_HANDLE_AUTH_ANY
- http_auth_methods &= ~CURLAUTH_GSSNEGOTIATE;
+ http_auth_methods &= ~CURLAUTH_NEGOTIATE;
#endif
return HTTP_REAUTH;
}
diff --git a/http.h b/http.h
index 5ab9d9c..bcc7d7d 100644
--- a/http.h
+++ b/http.h
@@ -42,6 +42,13 @@
#endif
/*
+ * Keep it compatible on system with cURL < 7.38.0
+ * */
+#ifndef CURLAUTH_NEGOTIATE
+#define CURLAUTH_NEGOTIATE CURLAUTH_GSSNEGOTIATE
+#endif
+
+/*
* CURLOPT_USE_SSL was known as CURLOPT_FTP_SSL up to 7.16.4,
* and the constants were known as CURLFTPSSL_*
*/
diff --git a/remote-curl.c b/remote-curl.c
index 6b83b77..d4fce63 100644
--- a/remote-curl.c
+++ b/remote-curl.c
@@ -542,7 +542,7 @@ static int post_rpc(struct rpc_state *rpc)
if (err != HTTP_OK)
return -1;
- if (results.auth_avail & CURLAUTH_GSSNEGOTIATE)
+ if (results.auth_avail & CURLAUTH_NEGOTIATE)
needs_100_continue = 1;
}
--
2.5.5
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2016-09-28 21:28 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-28 21:20 [PATCH] Replace deprecated CURLAUTH_GSSNEGOTIATE with CURLAUTH_NEGOTIATE Petr Stodulka
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).