diff options
author | Daniel Stenberg <daniel@haxx.se> | 2009-02-24 08:30:09 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2009-02-24 08:30:09 +0000 |
commit | ea6531cf32a7c46d2c919f02c6b650e31a458052 (patch) | |
tree | aecd2cb6cdb7c389050aa79051fe1a287eabf7a6 /lib | |
parent | 2afb88e2ce8dc5e1174bd7e79d41274724626dd0 (diff) |
- Brian J. Murrell found out that Negotiate proxy authentication didn't work.
It happened because the code used the struct for server-based auth all the
time for both proxy and server auth which of course was wrong.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/http.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/http.c b/lib/http.c index dc5066f8a..dfd19dd86 100644 --- a/lib/http.c +++ b/lib/http.c @@ -516,6 +516,10 @@ output_auth_headers(struct connectdata *conn, struct SessionHandle *data = conn->data; const char *auth=NULL; CURLcode result = CURLE_OK; +#ifdef HAVE_GSSAPI + struct negotiatedata *negdata = proxy? + &data->state.proxyneg:&data->state.negotiate; +#endif #ifndef CURL_DISABLE_CRYPTO_AUTH (void)request; @@ -524,14 +528,13 @@ output_auth_headers(struct connectdata *conn, #ifdef HAVE_GSSAPI if((authstatus->picked == CURLAUTH_GSSNEGOTIATE) && - data->state.negotiate.context && - !GSS_ERROR(data->state.negotiate.status)) { + negdata->context && !GSS_ERROR(negdata->status)) { auth="GSS-Negotiate"; result = Curl_output_negotiate(conn, proxy); if(result) return result; authstatus->done = TRUE; - data->state.negotiate.state = GSS_AUTHSENT; + negdata->state = GSS_AUTHSENT; } else #endif |