diff options
Diffstat (limited to 'src/testcurl/test_digestauth2.c')
-rw-r--r-- | src/testcurl/test_digestauth2.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/src/testcurl/test_digestauth2.c b/src/testcurl/test_digestauth2.c index 2ec78e26..9566159d 100644 --- a/src/testcurl/test_digestauth2.c +++ b/src/testcurl/test_digestauth2.c | |||
@@ -568,7 +568,13 @@ ahc_echo (void *cls, | |||
568 | } | 568 | } |
569 | if (! test_rfc2069) | 569 | if (! test_rfc2069) |
570 | { | 570 | { |
571 | if (10 >= dinfo->cnonce_len) | 571 | if ( |
572 | #if CURL_AT_LEAST_VERSION (7,37,1) | ||
573 | 10 >= dinfo->cnonce_len | ||
574 | #else /* libcurl before 7.37.1 */ | ||
575 | 8 > dinfo->cnonce_len | ||
576 | #endif /* libcurl before 7.37.1 */ | ||
577 | ) | ||
572 | { | 578 | { |
573 | fprintf (stderr, "Unexpected small 'cnonce_len': %ld. ", | 579 | fprintf (stderr, "Unexpected small 'cnonce_len': %ld. ", |
574 | (long) dinfo->cnonce_len); | 580 | (long) dinfo->cnonce_len); |
@@ -879,11 +885,10 @@ ahc_echo (void *cls, | |||
879 | if (NULL == response) | 885 | if (NULL == response) |
880 | mhdErrorExitDesc ("Response creation failed"); | 886 | mhdErrorExitDesc ("Response creation failed"); |
881 | res = | 887 | res = |
882 | MHD_queue_auth_required_response3 (connection, REALM_VAL, OPAQUE_VALUE, | 888 | MHD_queue_auth_required_response3 ( |
883 | "/", response, 0, | 889 | connection, REALM_VAL, OPAQUE_VALUE, "/", response, 0, |
884 | (enum MHD_DigestAuthMultiQOP) qop, | 890 | (enum MHD_DigestAuthMultiQOP) qop, |
885 | (enum MHD_DigestAuthMultiAlgo3) algo3, | 891 | (enum MHD_DigestAuthMultiAlgo3) algo3, test_userhash, 0); |
886 | test_userhash, 0); | ||
887 | if (MHD_YES != res) | 892 | if (MHD_YES != res) |
888 | mhdErrorExitDesc ("'MHD_queue_auth_required_response3()' failed"); | 893 | mhdErrorExitDesc ("'MHD_queue_auth_required_response3()' failed"); |
889 | } | 894 | } |