digest_sspi: Fix nonce-count generation in HTTP digest

- on the first invocation: keep security context returned by
  InitializeSecurityContext()

- on subsequent invocations: use MakeSignature() instead of
  InitializeSecurityContext() to generate HTTP digest response

Bug: https://github.com/curl/curl/issues/870
Reported-by: Andreas Roth

Closes https://github.com/curl/curl/pull/1251
This commit is contained in:
Max Khon 2017-02-06 23:40:51 +06:00 committed by Jay Satiro
parent 889ca45ab8
commit f77dabefd8
4 changed files with 259 additions and 103 deletions

View file

@ -408,6 +408,7 @@ struct digestdata {
#if defined(USE_WINDOWS_SSPI)
BYTE *input_token;
size_t input_token_len;
CtxtHandle *http_context;
#else
char *nonce;
char *cnonce;