diff options
Diffstat (limited to 'src/testcurl/test_digestauth.c')
-rw-r--r-- | src/testcurl/test_digestauth.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/src/testcurl/test_digestauth.c b/src/testcurl/test_digestauth.c index 387d8abf..adc5f330 100644 --- a/src/testcurl/test_digestauth.c +++ b/src/testcurl/test_digestauth.c | |||
@@ -26,18 +26,19 @@ | |||
26 | * @author Karlson2k (Evgeny Grin) | 26 | * @author Karlson2k (Evgeny Grin) |
27 | */ | 27 | */ |
28 | 28 | ||
29 | #include "MHD_config.h" | 29 | #include "mhd_options.h" |
30 | #include "platform.h" | 30 | #include "platform.h" |
31 | #include <curl/curl.h> | 31 | #include <curl/curl.h> |
32 | #include <microhttpd.h> | 32 | #include <microhttpd.h> |
33 | #include <stdlib.h> | 33 | #include <stdlib.h> |
34 | #include <string.h> | 34 | #include <string.h> |
35 | #include <time.h> | 35 | #include <time.h> |
36 | #ifdef MHD_HTTPS_REQUIRE_GCRYPT | 36 | |
37 | #ifdef HAVE_GCRYPT_H | 37 | #if defined(MHD_HTTPS_REQUIRE_GCRYPT) && \ |
38 | (defined(MHD_SHA256_TLSLIB) || defined(MHD_MD5_TLSLIB)) | ||
39 | #define NEED_GCRYP_INIT 1 | ||
38 | #include <gcrypt.h> | 40 | #include <gcrypt.h> |
39 | #endif | 41 | #endif /* MHD_HTTPS_REQUIRE_GCRYPT && (MHD_SHA256_TLSLIB || MHD_MD5_TLSLIB) */ |
40 | #endif /* MHD_HTTPS_REQUIRE_GCRYPT */ | ||
41 | 42 | ||
42 | #ifndef WINDOWS | 43 | #ifndef WINDOWS |
43 | #include <sys/socket.h> | 44 | #include <sys/socket.h> |
@@ -491,14 +492,12 @@ main (int argc, char *const *argv) | |||
491 | unsigned int errorCount = 0; | 492 | unsigned int errorCount = 0; |
492 | (void) argc; (void) argv; /* Unused. Silent compiler warning. */ | 493 | (void) argc; (void) argv; /* Unused. Silent compiler warning. */ |
493 | 494 | ||
494 | #ifdef MHD_HTTPS_REQUIRE_GCRYPT | 495 | #ifdef NEED_GCRYP_INIT |
495 | #ifdef HAVE_GCRYPT_H | ||
496 | gcry_control (GCRYCTL_ENABLE_QUICK_RANDOM, 0); | 496 | gcry_control (GCRYCTL_ENABLE_QUICK_RANDOM, 0); |
497 | #ifdef GCRYCTL_INITIALIZATION_FINISHED | 497 | #ifdef GCRYCTL_INITIALIZATION_FINISHED |
498 | gcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0); | 498 | gcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0); |
499 | #endif | 499 | #endif /* GCRYCTL_INITIALIZATION_FINISHED */ |
500 | #endif | 500 | #endif /* NEED_GCRYP_INIT */ |
501 | #endif /* MHD_HTTPS_REQUIRE_GCRYPT */ | ||
502 | if (0 != curl_global_init (CURL_GLOBAL_WIN32)) | 501 | if (0 != curl_global_init (CURL_GLOBAL_WIN32)) |
503 | return 2; | 502 | return 2; |
504 | errorCount += testDigestAuth (); | 503 | errorCount += testDigestAuth (); |