aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSteve Holme <steve_holme@hotmail.com>2014-11-06 10:23:08 +0000
committerSteve Holme <steve_holme@hotmail.com>2014-11-06 11:10:08 +0000
commit1033acd92db83c3c87d071ef6debe9b1d0628b46 (patch)
tree125664777968b2e0a4227183e52396580903006d /lib
parent36bf1413330dfeb506210b8c5797507bc82dc5e5 (diff)
http_digest: Added required SSPI based variables to digest structure
Diffstat (limited to 'lib')
-rw-r--r--lib/http_digest.c9
-rw-r--r--lib/urldata.h4
2 files changed, 12 insertions, 1 deletions
diff --git a/lib/http_digest.c b/lib/http_digest.c
index a75ca9d59..f52c8dd22 100644
--- a/lib/http_digest.c
+++ b/lib/http_digest.c
@@ -79,6 +79,7 @@ CURLcode Curl_output_digest(struct connectdata *conn,
char *tmp;
char *response;
size_t len;
+ bool have_chlg;
/* 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 */
@@ -116,7 +117,13 @@ CURLcode Curl_output_digest(struct connectdata *conn,
if(!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;
return CURLE_OK;
}
diff --git a/lib/urldata.h b/lib/urldata.h
index 62a2b8048..f0f903844 100644
--- a/lib/urldata.h
+++ b/lib/urldata.h
@@ -391,6 +391,9 @@ struct curl_ssl_session {
/* Struct used for Digest challenge-response authentication */
struct digestdata {
+#if defined(USE_WINDOWS_SSPI)
+ BYTE *input_token;
+#else
char *nonce;
char *cnonce;
char *realm;
@@ -400,6 +403,7 @@ struct digestdata {
char *qop;
char *algorithm;
int nc; /* nounce count */
+#endif
};
typedef enum {