aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMichael Osipov <1983-01-06@gmx.net>2014-07-21 09:53:46 +0200
committerDaniel Stenberg <daniel@haxx.se>2014-07-23 00:01:39 +0200
commite38ba430142153e95e2b0abe08a31d626a5c5864 (patch)
tree68b6fd17b6c778e3c44b64aced30452710452637 /lib
parent46750c39bd3ece85ddef6a9dafd04bcd2748bc50 (diff)
curl.h/features: Deprecate GSS-Negotiate macros due to bad naming
- Replace CURLAUTH_GSSNEGOTIATE with CURLAUTH_NEGOTIATE - CURL_VERSION_GSSNEGOTIATE is deprecated which is served by CURL_VERSION_SSPI, CURL_VERSION_GSSAPI and CURUL_VERSION_SPNEGO now. - Remove display of feature 'GSS-Negotiate'
Diffstat (limited to 'lib')
-rw-r--r--lib/curl_setup.h2
-rw-r--r--lib/http.c22
-rw-r--r--lib/http_negotiate.h4
-rw-r--r--lib/http_negotiate_sspi.c4
-rw-r--r--lib/url.c12
-rw-r--r--lib/urldata.h4
-rw-r--r--lib/version.c3
7 files changed, 24 insertions, 27 deletions
diff --git a/lib/curl_setup.h b/lib/curl_setup.h
index 7618b5638..173731c49 100644
--- a/lib/curl_setup.h
+++ b/lib/curl_setup.h
@@ -610,7 +610,7 @@ int netware_init(void);
#if !defined(CURL_DISABLE_CRYPTO_AUTH) && \
(defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI))
-#define USE_HTTP_NEGOTIATE
+#define USE_SPNEGO
#endif
/* Single point where USE_NTLM definition might be done */
diff --git a/lib/http.c b/lib/http.c
index 8cd15dece..d59dffcf2 100644
--- a/lib/http.c
+++ b/lib/http.c
@@ -328,8 +328,8 @@ static bool pickoneauth(struct auth *pick)
/* The order of these checks is highly relevant, as this will be the order
of preference in case of the existence of multiple accepted types. */
- if(avail & CURLAUTH_GSSNEGOTIATE)
- pick->picked = CURLAUTH_GSSNEGOTIATE;
+ if(avail & CURLAUTH_NEGOTIATE)
+ pick->picked = CURLAUTH_NEGOTIATE;
else if(avail & CURLAUTH_DIGEST)
pick->picked = CURLAUTH_DIGEST;
else if(avail & CURLAUTH_NTLM)
@@ -557,7 +557,7 @@ output_auth_headers(struct connectdata *conn,
struct SessionHandle *data = conn->data;
const char *auth=NULL;
CURLcode result = CURLE_OK;
-#ifdef USE_HTTP_NEGOTIATE
+#ifdef USE_SPNEGO
struct negotiatedata *negdata = proxy?
&data->state.proxyneg:&data->state.negotiate;
#endif
@@ -567,9 +567,9 @@ output_auth_headers(struct connectdata *conn,
(void)path;
#endif
-#ifdef USE_HTTP_NEGOTIATE
+#ifdef USE_SPNEGO
negdata->state = GSS_AUTHNONE;
- if((authstatus->picked == CURLAUTH_GSSNEGOTIATE) &&
+ if((authstatus->picked == CURLAUTH_NEGOTIATE) &&
negdata->context && !GSS_ERROR(negdata->status)) {
auth="Negotiate";
result = Curl_output_negotiate(conn, proxy);
@@ -737,7 +737,7 @@ CURLcode Curl_http_input_auth(struct connectdata *conn, bool proxy,
*/
struct SessionHandle *data = conn->data;
-#ifdef USE_HTTP_NEGOTIATE
+#ifdef USE_SPNEGO
struct negotiatedata *negdata = proxy?
&data->state.proxyneg:&data->state.negotiate;
#endif
@@ -771,13 +771,13 @@ CURLcode Curl_http_input_auth(struct connectdata *conn, bool proxy,
*/
while(*auth) {
-#ifdef USE_HTTP_NEGOTIATE
+#ifdef USE_SPNEGO
if(checkprefix("Negotiate", auth)) {
int neg;
- *availp |= CURLAUTH_GSSNEGOTIATE;
- authp->avail |= CURLAUTH_GSSNEGOTIATE;
+ *availp |= CURLAUTH_NEGOTIATE;
+ authp->avail |= CURLAUTH_NEGOTIATE;
- if(authp->picked == CURLAUTH_GSSNEGOTIATE) {
+ if(authp->picked == CURLAUTH_NEGOTIATE) {
if(negdata->state == GSS_AUTHSENT || negdata->state == GSS_AUTHNONE) {
neg = Curl_input_negotiate(conn, proxy, auth);
if(neg == 0) {
@@ -1440,7 +1440,7 @@ CURLcode Curl_http_done(struct connectdata *conn,
Curl_unencode_cleanup(conn);
-#ifdef USE_HTTP_NEGOTIATE
+#ifdef USE_SPNEGO
if(data->state.proxyneg.state == GSS_AUTHSENT ||
data->state.negotiate.state == GSS_AUTHSENT)
Curl_cleanup_negotiate(data);
diff --git a/lib/http_negotiate.h b/lib/http_negotiate.h
index e584d76fc..f7efe8cdd 100644
--- a/lib/http_negotiate.h
+++ b/lib/http_negotiate.h
@@ -22,7 +22,7 @@
*
***************************************************************************/
-#ifdef USE_HTTP_NEGOTIATE
+#ifdef USE_SPNEGO
/* this is for Negotiate header input */
int Curl_input_negotiate(struct connectdata *conn, bool proxy,
@@ -37,6 +37,6 @@ void Curl_cleanup_negotiate(struct SessionHandle *data);
#define GSS_ERROR(status) (status & 0x80000000)
#endif
-#endif /* USE_HTTP_NEGOTIATE */
+#endif /* USE_SPNEGO */
#endif /* HEADER_CURL_HTTP_NEGOTIATE_H */
diff --git a/lib/http_negotiate_sspi.c b/lib/http_negotiate_sspi.c
index 2bf131f90..84e5ebf89 100644
--- a/lib/http_negotiate_sspi.c
+++ b/lib/http_negotiate_sspi.c
@@ -24,7 +24,7 @@
#ifdef USE_WINDOWS_SSPI
-#if !defined(CURL_DISABLE_HTTP) && defined(USE_HTTP_NEGOTIATE)
+#if !defined(CURL_DISABLE_HTTP) && defined(USE_SPNEGO)
#include "urldata.h"
#include "sendf.h"
@@ -262,6 +262,6 @@ void Curl_cleanup_negotiate(struct SessionHandle *data)
cleanup(&data->state.proxyneg);
}
-#endif /* !CURL_DISABLE_HTTP && USE_HTTP_NEGOTIATE */
+#endif /* !CURL_DISABLE_HTTP && USE_SPNEGO */
#endif /* USE_WINDOWS_SSPI */
diff --git a/lib/url.c b/lib/url.c
index c0ec630c6..5ef0a7cc2 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -1267,9 +1267,9 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
#elif !defined(NTLM_WB_ENABLED)
auth &= ~CURLAUTH_NTLM_WB; /* no NTLM_WB support */
#endif
-#ifndef USE_HTTP_NEGOTIATE
- auth &= ~CURLAUTH_GSSNEGOTIATE; /* no GSS-Negotiate without GSSAPI or
- WINDOWS_SSPI */
+#ifndef USE_SPNEGO
+ auth &= ~CURLAUTH_NEGOTIATE; /* no Negotiate (SPNEGO) auth without
+ GSS-API or SSPI */
#endif
/* check if any auth bit lower than CURLAUTH_ONLY is still set */
@@ -1355,9 +1355,9 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
#elif !defined(NTLM_WB_ENABLED)
auth &= ~CURLAUTH_NTLM_WB; /* no NTLM_WB support */
#endif
-#ifndef USE_HTTP_NEGOTIATE
- auth &= ~CURLAUTH_GSSNEGOTIATE; /* no GSS-Negotiate without GSSAPI or
- WINDOWS_SSPI */
+#ifndef USE_SPNEGO
+ auth &= ~CURLAUTH_NEGOTIATE; /* no Negotiate (SPNEGO) auth without
+ GSS-API or SSPI */
#endif
/* check if any auth bit lower than CURLAUTH_ONLY is still set */
diff --git a/lib/urldata.h b/lib/urldata.h
index 3ed7292d3..02f91e001 100644
--- a/lib/urldata.h
+++ b/lib/urldata.h
@@ -444,7 +444,7 @@ struct ntlmdata {
#endif
};
-#ifdef USE_HTTP_NEGOTIATE
+#ifdef USE_SPNEGO
struct negotiatedata {
/* When doing Negotiate (SPNEGO) auth, we first need to send a token
and then validate the received one. */
@@ -1245,7 +1245,7 @@ struct UrlState {
struct digestdata digest; /* state data for host Digest auth */
struct digestdata proxydigest; /* state data for proxy Digest auth */
-#ifdef USE_HTTP_NEGOTIATE
+#ifdef USE_SPNEGO
struct negotiatedata negotiate; /* state data for host Negotiate auth */
struct negotiatedata proxyneg; /* state data for proxy Negotiate auth */
#endif
diff --git a/lib/version.c b/lib/version.c
index 7f0bc3617..788f3e9d1 100644
--- a/lib/version.c
+++ b/lib/version.c
@@ -262,9 +262,6 @@ static curl_version_info_data version_info = {
#ifdef HAVE_LIBZ
| CURL_VERSION_LIBZ
#endif
-#ifdef USE_HTTP_NEGOTIATE
- | CURL_VERSION_GSSNEGOTIATE
-#endif
#ifdef DEBUGBUILD
| CURL_VERSION_DEBUG
#endif