Navigation Menu

Skip to content

Commit

Permalink
Don't clear GSSAPI state between each exchange in the negotiation
Browse files Browse the repository at this point in the history
GSSAPI doesn't work very well if we forget everything ever time.

XX: Is Curl_http_done() the right place to do the final cleanup?
  • Loading branch information
David Woodhouse authored and bagder committed Jul 16, 2014
1 parent 59431c2 commit f78ae41
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
6 changes: 6 additions & 0 deletions lib/http.c
Expand Up @@ -1443,6 +1443,12 @@ CURLcode Curl_http_done(struct connectdata *conn,

Curl_unencode_cleanup(conn);

#ifdef USE_HTTP_NEGOTIATE
if(data->state.proxyneg.state == GSS_AUTHSENT ||
data->state.negotiate.state == GSS_AUTHSENT)
Curl_cleanup_negotiate(data);
#endif

/* set the proper values (possibly modified on POST) */
conn->fread_func = data->set.fread_func; /* restore */
conn->fread_in = data->set.in; /* restore */
Expand Down
1 change: 0 additions & 1 deletion lib/http_negotiate.c
Expand Up @@ -250,7 +250,6 @@ CURLcode Curl_output_negotiate(struct connectdata *conn, bool proxy)
}

Curl_safefree(encoded);
Curl_cleanup_negotiate(conn->data);

return (userp == NULL) ? CURLE_OUT_OF_MEMORY : CURLE_OK;
}
Expand Down
1 change: 0 additions & 1 deletion lib/http_negotiate_sspi.c
Expand Up @@ -268,7 +268,6 @@ CURLcode Curl_output_negotiate(struct connectdata *conn, bool proxy)
else
conn->allocptr.userpwd = userp;
free(encoded);
Curl_cleanup_negotiate (conn->data);
return (userp == NULL) ? CURLE_OUT_OF_MEMORY : CURLE_OK;
}

Expand Down

0 comments on commit f78ae41

Please sign in to comment.