]> granicus.if.org Git - curl/commitdiff
http_digest: Added required SSPI based variables to digest structure
authorSteve Holme <steve_holme@hotmail.com>
Thu, 6 Nov 2014 10:23:08 +0000 (10:23 +0000)
committerSteve Holme <steve_holme@hotmail.com>
Thu, 6 Nov 2014 11:10:08 +0000 (11:10 +0000)
lib/http_digest.c
lib/urldata.h

index a75ca9d59b3ebc23aefc7586f764c73b6e9621c4..f52c8dd22d7a20f878a2cfaefd68b0382433d17d 100644 (file)
@@ -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;
   }
index 62a2b8048c444994e2d64f0e1e9f907dd5ebc868..f0f903844ca024ad1f4cf7b0e8f671a203fa9d8a 100644 (file)
@@ -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 {