aboutsummaryrefslogtreecommitdiff
path: root/src/microhttpd/test_dauth_userhash.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/microhttpd/test_dauth_userhash.c')
-rw-r--r--src/microhttpd/test_dauth_userhash.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/microhttpd/test_dauth_userhash.c b/src/microhttpd/test_dauth_userhash.c
index 633ab4b9..c145beb0 100644
--- a/src/microhttpd/test_dauth_userhash.c
+++ b/src/microhttpd/test_dauth_userhash.c
@@ -26,9 +26,16 @@
26#include <stdio.h> 26#include <stdio.h>
27#include <stdlib.h> 27#include <stdlib.h>
28#include <string.h> 28#include <string.h>
29#include "mhd_options.h"
29#include "microhttpd.h" 30#include "microhttpd.h"
30#include "test_helpers.h" 31#include "test_helpers.h"
31 32
33#if defined(MHD_HTTPS_REQUIRE_GCRYPT) && \
34 (defined(MHD_SHA256_TLSLIB) || defined(MHD_MD5_TLSLIB))
35#define NEED_GCRYP_INIT 1
36#include <gcrypt.h>
37#endif /* MHD_HTTPS_REQUIRE_GCRYPT && (MHD_SHA256_TLSLIB || MHD_MD5_TLSLIB) */
38
32static int verbose = 1; /* verbose level (0-1)*/ 39static int verbose = 1; /* verbose level (0-1)*/
33 40
34/* Declarations and data */ 41/* Declarations and data */
@@ -748,6 +755,13 @@ main (int argc, char *argv[])
748 if (has_param (argc, argv, "-s") || has_param (argc, argv, "--silent")) 755 if (has_param (argc, argv, "-s") || has_param (argc, argv, "--silent"))
749 verbose = 0; 756 verbose = 0;
750 757
758#ifdef NEED_GCRYP_INIT
759 gcry_control (GCRYCTL_ENABLE_QUICK_RANDOM, 0);
760#ifdef GCRYCTL_INITIALIZATION_FINISHED
761 gcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0);
762#endif /* GCRYCTL_INITIALIZATION_FINISHED */
763#endif /* NEED_GCRYP_INIT */
764
751 if (MHD_is_feature_supported (MHD_FEATURE_DIGEST_AUTH_MD5)) 765 if (MHD_is_feature_supported (MHD_FEATURE_DIGEST_AUTH_MD5))
752 num_failed += test_md5 (); 766 num_failed += test_md5 ();
753 num_failed += test_md5_failure (); 767 num_failed += test_md5_failure ();