http_digest: Added required SSPI based variables to digest structure

This commit is contained in:
Steve Holme
2014-11-06 10:23:08 +00:00
parent 36bf141333
commit 1033acd92d
2 changed files with 12 additions and 1 deletions

View File

@@ -79,6 +79,7 @@ CURLcode Curl_output_digest(struct connectdata *conn,
char *tmp; char *tmp;
char *response; char *response;
size_t len; size_t len;
bool have_chlg;
/* Point to the address of the pointer that holds the string to send to the /* Point to the address of the pointer that holds the string to send to the
server, which is for a plain host or for a HTTP proxy */ server, which is for a plain host or for a HTTP proxy */
@@ -116,7 +117,13 @@ CURLcode Curl_output_digest(struct connectdata *conn,
if(!passwdp) if(!passwdp)
passwdp=""; passwdp="";
if(!d->nonce) { #if defined(USE_WINDOWS_SSPI)
have_chlg = d->input_token ? TRUE : FALSE;
#else
have_chlg = d->nonce ? TRUE : FALSE;
#endif
if(!have_chlg) {
authp->done = FALSE; authp->done = FALSE;
return CURLE_OK; return CURLE_OK;
} }

View File

@@ -391,6 +391,9 @@ struct curl_ssl_session {
/* Struct used for Digest challenge-response authentication */ /* Struct used for Digest challenge-response authentication */
struct digestdata { struct digestdata {
#if defined(USE_WINDOWS_SSPI)
BYTE *input_token;
#else
char *nonce; char *nonce;
char *cnonce; char *cnonce;
char *realm; char *realm;
@@ -400,6 +403,7 @@ struct digestdata {
char *qop; char *qop;
char *algorithm; char *algorithm;
int nc; /* nounce count */ int nc; /* nounce count */
#endif
}; };
typedef enum { typedef enum {