aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvgeny Grin (Karlson2k) <k2k@narod.ru>2022-09-23 19:09:08 +0300
committerEvgeny Grin (Karlson2k) <k2k@narod.ru>2022-09-25 18:39:40 +0300
commit1e288041bd2895ae80cd6e6c62e3511262510cde (patch)
tree30d38482ffafc335117c5acd246f7190a9b1d794
parent8815effe667c79e8145b64e110adc9e16990b43c (diff)
downloadlibmicrohttpd-1e288041bd2895ae80cd6e6c62e3511262510cde.tar.gz
libmicrohttpd-1e288041bd2895ae80cd6e6c62e3511262510cde.zip
Fixed initialisation of old GnuTLS versions
-rw-r--r--src/gnutls/init.c16
-rw-r--r--src/microhttpd/daemon.c14
-rw-r--r--src/testcurl/https/test_empty_response.c4
-rw-r--r--src/testcurl/https/test_https_get.c8
-rw-r--r--src/testcurl/https/test_https_get_iovec.c8
-rw-r--r--src/testcurl/https/test_https_get_parallel.c4
-rw-r--r--src/testcurl/https/test_https_get_parallel_threads.c8
-rw-r--r--src/testcurl/https/test_https_get_select.c4
-rw-r--r--src/testcurl/https/test_https_multi_daemon.c8
-rw-r--r--src/testcurl/https/test_https_session_info.c8
-rw-r--r--src/testcurl/https/test_https_sni.c8
-rw-r--r--src/testcurl/https/test_https_time_out.c8
-rw-r--r--src/testcurl/https/test_tls_authentication.c8
-rw-r--r--src/testcurl/https/test_tls_extensions.c8
-rw-r--r--src/testcurl/https/test_tls_options.c8
-rw-r--r--src/testcurl/test_basicauth.c4
-rw-r--r--src/testcurl/test_digestauth.c8
-rw-r--r--src/testcurl/test_digestauth_concurrent.c8
-rw-r--r--src/testcurl/test_digestauth_sha256.c8
-rw-r--r--src/testcurl/test_digestauth_with_arguments.c8
-rw-r--r--src/testcurl/test_postform.c8
21 files changed, 84 insertions, 82 deletions
diff --git a/src/gnutls/init.c b/src/gnutls/init.c
index 638f629c..4c47d162 100644
--- a/src/gnutls/init.c
+++ b/src/gnutls/init.c
@@ -26,7 +26,7 @@
26#include "init.h" 26#include "init.h"
27 27
28 28
29#ifdef MHD_HTTPS_REQUIRE_GRYPT 29#ifdef MHD_HTTPS_REQUIRE_GCRYPT
30#if defined(HTTPS_SUPPORT) && GCRYPT_VERSION_NUMBER < 0x010600 30#if defined(HTTPS_SUPPORT) && GCRYPT_VERSION_NUMBER < 0x010600
31#if defined(MHD_USE_POSIX_THREADS) 31#if defined(MHD_USE_POSIX_THREADS)
32GCRY_THREAD_OPTION_PTHREAD_IMPL; 32GCRY_THREAD_OPTION_PTHREAD_IMPL;
@@ -40,7 +40,7 @@ gcry_w32_mutex_init (void **ppmtx)
40 40
41 if (NULL == *ppmtx) 41 if (NULL == *ppmtx)
42 return ENOMEM; 42 return ENOMEM;
43 if (! MHD_mutex_init_ ((MHD_mutex_*) *ppmtx)) 43 if (! MHD_mutex_init_ ((MHD_mutex_ *) *ppmtx))
44 { 44 {
45 free (*ppmtx); 45 free (*ppmtx);
46 *ppmtx = NULL; 46 *ppmtx = NULL;
@@ -53,7 +53,7 @@ gcry_w32_mutex_init (void **ppmtx)
53static int 53static int
54gcry_w32_mutex_destroy (void **ppmtx) 54gcry_w32_mutex_destroy (void **ppmtx)
55{ 55{
56 int res = (MHD_mutex_destroy_ ((MHD_mutex_*) *ppmtx)) ? 0 : EINVAL; 56 int res = (MHD_mutex_destroy_ ((MHD_mutex_ *) *ppmtx)) ? 0 : EINVAL;
57 free (*ppmtx); 57 free (*ppmtx);
58 return res; 58 return res;
59} 59}
@@ -62,14 +62,14 @@ gcry_w32_mutex_destroy (void **ppmtx)
62static int 62static int
63gcry_w32_mutex_lock (void **ppmtx) 63gcry_w32_mutex_lock (void **ppmtx)
64{ 64{
65 return MHD_mutex_lock_ ((MHD_mutex_*) *ppmtx) ? 0 : EINVAL; 65 return MHD_mutex_lock_ ((MHD_mutex_ *) *ppmtx) ? 0 : EINVAL;
66} 66}
67 67
68 68
69static int 69static int
70gcry_w32_mutex_unlock (void **ppmtx) 70gcry_w32_mutex_unlock (void **ppmtx)
71{ 71{
72 return MHD_mutex_unlock_ ((MHD_mutex_*) *ppmtx) ? 0 : EINVAL; 72 return MHD_mutex_unlock_ ((MHD_mutex_ *) *ppmtx) ? 0 : EINVAL;
73} 73}
74 74
75 75
@@ -82,7 +82,7 @@ static struct gcry_thread_cbs gcry_threads_w32 = {
82 82
83#endif /* defined(MHD_W32_MUTEX_) */ 83#endif /* defined(MHD_W32_MUTEX_) */
84#endif /* HTTPS_SUPPORT && GCRYPT_VERSION_NUMBER < 0x010600 */ 84#endif /* HTTPS_SUPPORT && GCRYPT_VERSION_NUMBER < 0x010600 */
85#endif /* MHD_HTTPS_REQUIRE_GRYPT */ 85#endif /* MHD_HTTPS_REQUIRE_GCRYPT */
86 86
87 87
88#ifndef _AUTOINIT_FUNCS_ARE_SUPPORTED 88#ifndef _AUTOINIT_FUNCS_ARE_SUPPORTED
@@ -129,7 +129,7 @@ MHD_TLS_init (void)
129 WSADATA wsd; 129 WSADATA wsd;
130#endif /* _WIN32 && ! __CYGWIN__ */ 130#endif /* _WIN32 && ! __CYGWIN__ */
131 131
132#ifdef MHD_HTTPS_REQUIRE_GRYPT 132#ifdef MHD_HTTPS_REQUIRE_GCRYPT
133#if GCRYPT_VERSION_NUMBER < 0x010600 133#if GCRYPT_VERSION_NUMBER < 0x010600
134#if defined(MHD_USE_POSIX_THREADS) 134#if defined(MHD_USE_POSIX_THREADS)
135 if (0 != gcry_control (GCRYCTL_SET_THREAD_CBS, 135 if (0 != gcry_control (GCRYCTL_SET_THREAD_CBS,
@@ -146,7 +146,7 @@ MHD_TLS_init (void)
146 MHD_PANIC (_ ( 146 MHD_PANIC (_ (
147 "libgcrypt is too old. MHD was compiled for libgcrypt 1.6.0 or newer.\n")); 147 "libgcrypt is too old. MHD was compiled for libgcrypt 1.6.0 or newer.\n"));
148#endif 148#endif
149#endif /* MHD_HTTPS_REQUIRE_GRYPT */ 149#endif /* MHD_HTTPS_REQUIRE_GCRYPT */
150 gnutls_global_init (); 150 gnutls_global_init ();
151} 151}
152 152
diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c
index fc293a1f..bb9daa52 100644
--- a/src/microhttpd/daemon.c
+++ b/src/microhttpd/daemon.c
@@ -55,9 +55,9 @@
55 55
56#ifdef HTTPS_SUPPORT 56#ifdef HTTPS_SUPPORT
57#include "connection_https.h" 57#include "connection_https.h"
58#ifdef MHD_HTTPS_REQUIRE_GRYPT 58#ifdef MHD_HTTPS_REQUIRE_GCRYPT
59#include <gcrypt.h> 59#include <gcrypt.h>
60#endif /* MHD_HTTPS_REQUIRE_GRYPT */ 60#endif /* MHD_HTTPS_REQUIRE_GCRYPT */
61#endif /* HTTPS_SUPPORT */ 61#endif /* HTTPS_SUPPORT */
62 62
63#if defined(_WIN32) && ! defined(__CYGWIN__) 63#if defined(_WIN32) && ! defined(__CYGWIN__)
@@ -8473,7 +8473,7 @@ MHD_is_feature_supported (enum MHD_FEATURE feature)
8473} 8473}
8474 8474
8475 8475
8476#ifdef MHD_HTTPS_REQUIRE_GRYPT 8476#ifdef MHD_HTTPS_REQUIRE_GCRYPT
8477#if defined(HTTPS_SUPPORT) && GCRYPT_VERSION_NUMBER < 0x010600 8477#if defined(HTTPS_SUPPORT) && GCRYPT_VERSION_NUMBER < 0x010600
8478#if defined(MHD_USE_POSIX_THREADS) 8478#if defined(MHD_USE_POSIX_THREADS)
8479GCRY_THREAD_OPTION_PTHREAD_IMPL; 8479GCRY_THREAD_OPTION_PTHREAD_IMPL;
@@ -8529,7 +8529,7 @@ static struct gcry_thread_cbs gcry_threads_w32 = {
8529 8529
8530#endif /* defined(MHD_W32_MUTEX_) */ 8530#endif /* defined(MHD_W32_MUTEX_) */
8531#endif /* HTTPS_SUPPORT && GCRYPT_VERSION_NUMBER < 0x010600 */ 8531#endif /* HTTPS_SUPPORT && GCRYPT_VERSION_NUMBER < 0x010600 */
8532#endif /* MHD_HTTPS_REQUIRE_GRYPT */ 8532#endif /* MHD_HTTPS_REQUIRE_GCRYPT */
8533 8533
8534/** 8534/**
8535 * Initialize do setup work. 8535 * Initialize do setup work.
@@ -8551,8 +8551,9 @@ MHD_init (void)
8551 MHD_PANIC (_ ("Winsock version 2.2 is not available.\n")); 8551 MHD_PANIC (_ ("Winsock version 2.2 is not available.\n"));
8552#endif /* MHD_WINSOCK_SOCKETS */ 8552#endif /* MHD_WINSOCK_SOCKETS */
8553#ifdef HTTPS_SUPPORT 8553#ifdef HTTPS_SUPPORT
8554#ifdef MHD_HTTPS_REQUIRE_GRYPT 8554#ifdef MHD_HTTPS_REQUIRE_GCRYPT
8555#if GCRYPT_VERSION_NUMBER < 0x010600 8555#if GCRYPT_VERSION_NUMBER < 0x010600
8556#if GNUTLS_VERSION_NUMBER <= 0x020b00
8556#if defined(MHD_USE_POSIX_THREADS) 8557#if defined(MHD_USE_POSIX_THREADS)
8557 if (0 != gcry_control (GCRYCTL_SET_THREAD_CBS, 8558 if (0 != gcry_control (GCRYCTL_SET_THREAD_CBS,
8558 &gcry_threads_pthread)) 8559 &gcry_threads_pthread))
@@ -8562,13 +8563,14 @@ MHD_init (void)
8562 &gcry_threads_w32)) 8563 &gcry_threads_w32))
8563 MHD_PANIC (_ ("Failed to initialise multithreading in libgcrypt.\n")); 8564 MHD_PANIC (_ ("Failed to initialise multithreading in libgcrypt.\n"));
8564#endif /* defined(MHD_W32_MUTEX_) */ 8565#endif /* defined(MHD_W32_MUTEX_) */
8566#endif /* GNUTLS_VERSION_NUMBER <= 0x020b00 */
8565 gcry_check_version (NULL); 8567 gcry_check_version (NULL);
8566#else 8568#else
8567 if (NULL == gcry_check_version ("1.6.0")) 8569 if (NULL == gcry_check_version ("1.6.0"))
8568 MHD_PANIC (_ ( 8570 MHD_PANIC (_ (
8569 "libgcrypt is too old. MHD was compiled for libgcrypt 1.6.0 or newer.\n")); 8571 "libgcrypt is too old. MHD was compiled for libgcrypt 1.6.0 or newer.\n"));
8570#endif 8572#endif
8571#endif /* MHD_HTTPS_REQUIRE_GRYPT */ 8573#endif /* MHD_HTTPS_REQUIRE_GCRYPT */
8572 gnutls_global_init (); 8574 gnutls_global_init ();
8573#endif /* HTTPS_SUPPORT */ 8575#endif /* HTTPS_SUPPORT */
8574 MHD_monotonic_sec_counter_init (); 8576 MHD_monotonic_sec_counter_init ();
diff --git a/src/testcurl/https/test_empty_response.c b/src/testcurl/https/test_empty_response.c
index a8de5cd2..3dc5b0bb 100644
--- a/src/testcurl/https/test_empty_response.c
+++ b/src/testcurl/https/test_empty_response.c
@@ -28,9 +28,9 @@
28#include <limits.h> 28#include <limits.h>
29#include <sys/stat.h> 29#include <sys/stat.h>
30#include <curl/curl.h> 30#include <curl/curl.h>
31#ifdef MHD_HTTPS_REQUIRE_GRYPT 31#ifdef MHD_HTTPS_REQUIRE_GCRYPT
32#include <gcrypt.h> 32#include <gcrypt.h>
33#endif /* MHD_HTTPS_REQUIRE_GRYPT */ 33#endif /* MHD_HTTPS_REQUIRE_GCRYPT */
34#include "tls_test_common.h" 34#include "tls_test_common.h"
35#include "tls_test_keys.h" 35#include "tls_test_keys.h"
36 36
diff --git a/src/testcurl/https/test_https_get.c b/src/testcurl/https/test_https_get.c
index 62546324..f2016cc2 100644
--- a/src/testcurl/https/test_https_get.c
+++ b/src/testcurl/https/test_https_get.c
@@ -29,9 +29,9 @@
29#include <limits.h> 29#include <limits.h>
30#include <sys/stat.h> 30#include <sys/stat.h>
31#include <curl/curl.h> 31#include <curl/curl.h>
32#ifdef MHD_HTTPS_REQUIRE_GRYPT 32#ifdef MHD_HTTPS_REQUIRE_GCRYPT
33#include <gcrypt.h> 33#include <gcrypt.h>
34#endif /* MHD_HTTPS_REQUIRE_GRYPT */ 34#endif /* MHD_HTTPS_REQUIRE_GCRYPT */
35#include "tls_test_common.h" 35#include "tls_test_common.h"
36#include "tls_test_keys.h" 36#include "tls_test_keys.h"
37 37
@@ -234,12 +234,12 @@ main (int argc, char *const *argv)
234 const char *aes256_sha_tlsv1 = "AES256-SHA"; 234 const char *aes256_sha_tlsv1 = "AES256-SHA";
235 (void) argc; (void) argv; /* Unused. Silent compiler warning. */ 235 (void) argc; (void) argv; /* Unused. Silent compiler warning. */
236 236
237#ifdef MHD_HTTPS_REQUIRE_GRYPT 237#ifdef MHD_HTTPS_REQUIRE_GCRYPT
238 gcry_control (GCRYCTL_ENABLE_QUICK_RANDOM, 0); 238 gcry_control (GCRYCTL_ENABLE_QUICK_RANDOM, 0);
239#ifdef GCRYCTL_INITIALIZATION_FINISHED 239#ifdef GCRYCTL_INITIALIZATION_FINISHED
240 gcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0); 240 gcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0);
241#endif 241#endif
242#endif /* MHD_HTTPS_REQUIRE_GRYPT */ 242#endif /* MHD_HTTPS_REQUIRE_GCRYPT */
243 if (! testsuite_curl_global_init ()) 243 if (! testsuite_curl_global_init ())
244 return 99; 244 return 99;
245 if (NULL == curl_version_info (CURLVERSION_NOW)->ssl_version) 245 if (NULL == curl_version_info (CURLVERSION_NOW)->ssl_version)
diff --git a/src/testcurl/https/test_https_get_iovec.c b/src/testcurl/https/test_https_get_iovec.c
index b2d46c3f..33272952 100644
--- a/src/testcurl/https/test_https_get_iovec.c
+++ b/src/testcurl/https/test_https_get_iovec.c
@@ -37,9 +37,9 @@
37#include <limits.h> 37#include <limits.h>
38#include <sys/stat.h> 38#include <sys/stat.h>
39#include <curl/curl.h> 39#include <curl/curl.h>
40#ifdef MHD_HTTPS_REQUIRE_GRYPT 40#ifdef MHD_HTTPS_REQUIRE_GCRYPT
41#include <gcrypt.h> 41#include <gcrypt.h>
42#endif /* MHD_HTTPS_REQUIRE_GRYPT */ 42#endif /* MHD_HTTPS_REQUIRE_GCRYPT */
43#include "tls_test_common.h" 43#include "tls_test_common.h"
44#include "tls_test_keys.h" 44#include "tls_test_keys.h"
45 45
@@ -391,12 +391,12 @@ main (int argc, char *const *argv)
391 const char *aes256_sha_tlsv1 = "AES256-SHA"; 391 const char *aes256_sha_tlsv1 = "AES256-SHA";
392 (void) argc; (void) argv; /* Unused. Silent compiler warning. */ 392 (void) argc; (void) argv; /* Unused. Silent compiler warning. */
393 393
394#ifdef MHD_HTTPS_REQUIRE_GRYPT 394#ifdef MHD_HTTPS_REQUIRE_GCRYPT
395 gcry_control (GCRYCTL_ENABLE_QUICK_RANDOM, 0); 395 gcry_control (GCRYCTL_ENABLE_QUICK_RANDOM, 0);
396#ifdef GCRYCTL_INITIALIZATION_FINISHED 396#ifdef GCRYCTL_INITIALIZATION_FINISHED
397 gcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0); 397 gcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0);
398#endif 398#endif
399#endif /* MHD_HTTPS_REQUIRE_GRYPT */ 399#endif /* MHD_HTTPS_REQUIRE_GCRYPT */
400 if (! testsuite_curl_global_init ()) 400 if (! testsuite_curl_global_init ())
401 return 99; 401 return 99;
402 if (NULL == curl_version_info (CURLVERSION_NOW)->ssl_version) 402 if (NULL == curl_version_info (CURLVERSION_NOW)->ssl_version)
diff --git a/src/testcurl/https/test_https_get_parallel.c b/src/testcurl/https/test_https_get_parallel.c
index 3de7cfe7..cf318a46 100644
--- a/src/testcurl/https/test_https_get_parallel.c
+++ b/src/testcurl/https/test_https_get_parallel.c
@@ -31,9 +31,9 @@
31#include <limits.h> 31#include <limits.h>
32#include <curl/curl.h> 32#include <curl/curl.h>
33#include <pthread.h> 33#include <pthread.h>
34#ifdef MHD_HTTPS_REQUIRE_GRYPT 34#ifdef MHD_HTTPS_REQUIRE_GCRYPT
35#include <gcrypt.h> 35#include <gcrypt.h>
36#endif /* MHD_HTTPS_REQUIRE_GRYPT */ 36#endif /* MHD_HTTPS_REQUIRE_GCRYPT */
37#include "tls_test_common.h" 37#include "tls_test_common.h"
38#include "tls_test_keys.h" 38#include "tls_test_keys.h"
39 39
diff --git a/src/testcurl/https/test_https_get_parallel_threads.c b/src/testcurl/https/test_https_get_parallel_threads.c
index 08ee35e6..e8df1e14 100644
--- a/src/testcurl/https/test_https_get_parallel_threads.c
+++ b/src/testcurl/https/test_https_get_parallel_threads.c
@@ -33,9 +33,9 @@
33#include <limits.h> 33#include <limits.h>
34#include <curl/curl.h> 34#include <curl/curl.h>
35#include <pthread.h> 35#include <pthread.h>
36#ifdef MHD_HTTPS_REQUIRE_GRYPT 36#ifdef MHD_HTTPS_REQUIRE_GCRYPT
37#include <gcrypt.h> 37#include <gcrypt.h>
38#endif /* MHD_HTTPS_REQUIRE_GRYPT */ 38#endif /* MHD_HTTPS_REQUIRE_GCRYPT */
39#include "tls_test_common.h" 39#include "tls_test_common.h"
40#include "tls_test_keys.h" 40#include "tls_test_keys.h"
41 41
@@ -152,11 +152,11 @@ main (int argc, char *const *argv)
152 /* initialize random seed used by curl clients */ 152 /* initialize random seed used by curl clients */
153 iseed = (unsigned int) time (NULL); 153 iseed = (unsigned int) time (NULL);
154 154
155#ifdef MHD_HTTPS_REQUIRE_GRYPT 155#ifdef MHD_HTTPS_REQUIRE_GCRYPT
156#ifdef GCRYCTL_INITIALIZATION_FINISHED 156#ifdef GCRYCTL_INITIALIZATION_FINISHED
157 gcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0); 157 gcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0);
158#endif 158#endif
159#endif /* MHD_HTTPS_REQUIRE_GRYPT */ 159#endif /* MHD_HTTPS_REQUIRE_GCRYPT */
160 srand (iseed); 160 srand (iseed);
161 if (! testsuite_curl_global_init ()) 161 if (! testsuite_curl_global_init ())
162 return 99; 162 return 99;
diff --git a/src/testcurl/https/test_https_get_select.c b/src/testcurl/https/test_https_get_select.c
index 3b45323b..92774771 100644
--- a/src/testcurl/https/test_https_get_select.c
+++ b/src/testcurl/https/test_https_get_select.c
@@ -29,9 +29,9 @@
29#include <limits.h> 29#include <limits.h>
30#include <sys/stat.h> 30#include <sys/stat.h>
31#include <curl/curl.h> 31#include <curl/curl.h>
32#ifdef MHD_HTTPS_REQUIRE_GRYPT 32#ifdef MHD_HTTPS_REQUIRE_GCRYPT
33#include <gcrypt.h> 33#include <gcrypt.h>
34#endif /* MHD_HTTPS_REQUIRE_GRYPT */ 34#endif /* MHD_HTTPS_REQUIRE_GCRYPT */
35#include "tls_test_common.h" 35#include "tls_test_common.h"
36#include "tls_test_keys.h" 36#include "tls_test_keys.h"
37 37
diff --git a/src/testcurl/https/test_https_multi_daemon.c b/src/testcurl/https/test_https_multi_daemon.c
index 10e7f6ed..da60c543 100644
--- a/src/testcurl/https/test_https_multi_daemon.c
+++ b/src/testcurl/https/test_https_multi_daemon.c
@@ -29,9 +29,9 @@
29#include <curl/curl.h> 29#include <curl/curl.h>
30#include <limits.h> 30#include <limits.h>
31#include <sys/stat.h> 31#include <sys/stat.h>
32#ifdef MHD_HTTPS_REQUIRE_GRYPT 32#ifdef MHD_HTTPS_REQUIRE_GCRYPT
33#include <gcrypt.h> 33#include <gcrypt.h>
34#endif /* MHD_HTTPS_REQUIRE_GRYPT */ 34#endif /* MHD_HTTPS_REQUIRE_GCRYPT */
35#include "tls_test_common.h" 35#include "tls_test_common.h"
36#include "tls_test_keys.h" 36#include "tls_test_keys.h"
37 37
@@ -132,12 +132,12 @@ main (int argc, char *const *argv)
132 const char *aes256_sha = "AES256-SHA"; 132 const char *aes256_sha = "AES256-SHA";
133 (void) argc; (void) argv; /* Unused. Silent compiler warning. */ 133 (void) argc; (void) argv; /* Unused. Silent compiler warning. */
134 134
135#ifdef MHD_HTTPS_REQUIRE_GRYPT 135#ifdef MHD_HTTPS_REQUIRE_GCRYPT
136 gcry_control (GCRYCTL_ENABLE_QUICK_RANDOM, 0); 136 gcry_control (GCRYCTL_ENABLE_QUICK_RANDOM, 0);
137#ifdef GCRYCTL_INITIALIZATION_FINISHED 137#ifdef GCRYCTL_INITIALIZATION_FINISHED
138 gcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0); 138 gcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0);
139#endif 139#endif
140#endif /* MHD_HTTPS_REQUIRE_GRYPT */ 140#endif /* MHD_HTTPS_REQUIRE_GCRYPT */
141 if (! testsuite_curl_global_init ()) 141 if (! testsuite_curl_global_init ())
142 return 99; 142 return 99;
143 if (NULL == curl_version_info (CURLVERSION_NOW)->ssl_version) 143 if (NULL == curl_version_info (CURLVERSION_NOW)->ssl_version)
diff --git a/src/testcurl/https/test_https_session_info.c b/src/testcurl/https/test_https_session_info.c
index fc6f82f7..12208ba7 100644
--- a/src/testcurl/https/test_https_session_info.c
+++ b/src/testcurl/https/test_https_session_info.c
@@ -29,9 +29,9 @@
29#include "platform.h" 29#include "platform.h"
30#include "microhttpd.h" 30#include "microhttpd.h"
31#include <curl/curl.h> 31#include <curl/curl.h>
32#ifdef MHD_HTTPS_REQUIRE_GRYPT 32#ifdef MHD_HTTPS_REQUIRE_GCRYPT
33#include <gcrypt.h> 33#include <gcrypt.h>
34#endif /* MHD_HTTPS_REQUIRE_GRYPT */ 34#endif /* MHD_HTTPS_REQUIRE_GCRYPT */
35#include "tls_test_common.h" 35#include "tls_test_common.h"
36#include "tls_test_keys.h" 36#include "tls_test_keys.h"
37 37
@@ -200,12 +200,12 @@ main (int argc, char *const *argv)
200 const char *ssl_version; 200 const char *ssl_version;
201 (void) argc; /* Unused. Silent compiler warning. */ 201 (void) argc; /* Unused. Silent compiler warning. */
202 202
203#ifdef MHD_HTTPS_REQUIRE_GRYPT 203#ifdef MHD_HTTPS_REQUIRE_GCRYPT
204 gcry_control (GCRYCTL_ENABLE_QUICK_RANDOM, 0); 204 gcry_control (GCRYCTL_ENABLE_QUICK_RANDOM, 0);
205#ifdef GCRYCTL_INITIALIZATION_FINISHED 205#ifdef GCRYCTL_INITIALIZATION_FINISHED
206 gcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0); 206 gcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0);
207#endif 207#endif
208#endif /* MHD_HTTPS_REQUIRE_GRYPT */ 208#endif /* MHD_HTTPS_REQUIRE_GCRYPT */
209 if (! testsuite_curl_global_init ()) 209 if (! testsuite_curl_global_init ())
210 return 99; 210 return 99;
211 211
diff --git a/src/testcurl/https/test_https_sni.c b/src/testcurl/https/test_https_sni.c
index 4ffe1d8f..3581aa17 100644
--- a/src/testcurl/https/test_https_sni.c
+++ b/src/testcurl/https/test_https_sni.c
@@ -28,9 +28,9 @@
28#include <limits.h> 28#include <limits.h>
29#include <sys/stat.h> 29#include <sys/stat.h>
30#include <curl/curl.h> 30#include <curl/curl.h>
31#ifdef MHD_HTTPS_REQUIRE_GRYPT 31#ifdef MHD_HTTPS_REQUIRE_GCRYPT
32#include <gcrypt.h> 32#include <gcrypt.h>
33#endif /* MHD_HTTPS_REQUIRE_GRYPT */ 33#endif /* MHD_HTTPS_REQUIRE_GCRYPT */
34#include "tls_test_common.h" 34#include "tls_test_common.h"
35#include <gnutls/gnutls.h> 35#include <gnutls/gnutls.h>
36 36
@@ -264,12 +264,12 @@ main (int argc, char *const *argv)
264 else 264 else
265 port = 3060; 265 port = 3060;
266 266
267#ifdef MHD_HTTPS_REQUIRE_GRYPT 267#ifdef MHD_HTTPS_REQUIRE_GCRYPT
268 gcry_control (GCRYCTL_ENABLE_QUICK_RANDOM, 0); 268 gcry_control (GCRYCTL_ENABLE_QUICK_RANDOM, 0);
269#ifdef GCRYCTL_INITIALIZATION_FINISHED 269#ifdef GCRYCTL_INITIALIZATION_FINISHED
270 gcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0); 270 gcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0);
271#endif 271#endif
272#endif /* MHD_HTTPS_REQUIRE_GRYPT */ 272#endif /* MHD_HTTPS_REQUIRE_GCRYPT */
273 if (! testsuite_curl_global_init ()) 273 if (! testsuite_curl_global_init ())
274 return 99; 274 return 99;
275 tls_backend = curl_version_info (CURLVERSION_NOW)->ssl_version; 275 tls_backend = curl_version_info (CURLVERSION_NOW)->ssl_version;
diff --git a/src/testcurl/https/test_https_time_out.c b/src/testcurl/https/test_https_time_out.c
index 939101a6..b9e48363 100644
--- a/src/testcurl/https/test_https_time_out.c
+++ b/src/testcurl/https/test_https_time_out.c
@@ -30,9 +30,9 @@
30#include "platform.h" 30#include "platform.h"
31#include "microhttpd.h" 31#include "microhttpd.h"
32#include "tls_test_common.h" 32#include "tls_test_common.h"
33#ifdef MHD_HTTPS_REQUIRE_GRYPT 33#ifdef MHD_HTTPS_REQUIRE_GCRYPT
34#include <gcrypt.h> 34#include <gcrypt.h>
35#endif /* MHD_HTTPS_REQUIRE_GRYPT */ 35#endif /* MHD_HTTPS_REQUIRE_GCRYPT */
36#ifdef HAVE_SIGNAL_H 36#ifdef HAVE_SIGNAL_H
37#include <signal.h> 37#include <signal.h>
38#endif /* HAVE_SIGNAL_H */ 38#endif /* HAVE_SIGNAL_H */
@@ -208,12 +208,12 @@ main (int argc, char *const *argv)
208#endif 208#endif
209#endif /* MHD_SEND_SPIPE_SUPPRESS_NEEDED */ 209#endif /* MHD_SEND_SPIPE_SUPPRESS_NEEDED */
210 210
211#ifdef MHD_HTTPS_REQUIRE_GRYPT 211#ifdef MHD_HTTPS_REQUIRE_GCRYPT
212 gcry_control (GCRYCTL_ENABLE_QUICK_RANDOM, 0); 212 gcry_control (GCRYCTL_ENABLE_QUICK_RANDOM, 0);
213#ifdef GCRYCTL_INITIALIZATION_FINISHED 213#ifdef GCRYCTL_INITIALIZATION_FINISHED
214 gcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0); 214 gcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0);
215#endif 215#endif
216#endif /* MHD_HTTPS_REQUIRE_GRYPT */ 216#endif /* MHD_HTTPS_REQUIRE_GCRYPT */
217 if (GNUTLS_E_SUCCESS != gnutls_global_init ()) 217 if (GNUTLS_E_SUCCESS != gnutls_global_init ())
218 { 218 {
219 fprintf (stderr, "Cannot initialize GnuTLS.\n"); 219 fprintf (stderr, "Cannot initialize GnuTLS.\n");
diff --git a/src/testcurl/https/test_tls_authentication.c b/src/testcurl/https/test_tls_authentication.c
index 22d47b26..0bb87f42 100644
--- a/src/testcurl/https/test_tls_authentication.c
+++ b/src/testcurl/https/test_tls_authentication.c
@@ -29,9 +29,9 @@
29#include <curl/curl.h> 29#include <curl/curl.h>
30#include <limits.h> 30#include <limits.h>
31#include <sys/stat.h> 31#include <sys/stat.h>
32#ifdef MHD_HTTPS_REQUIRE_GRYPT 32#ifdef MHD_HTTPS_REQUIRE_GCRYPT
33#include <gcrypt.h> 33#include <gcrypt.h>
34#endif /* MHD_HTTPS_REQUIRE_GRYPT */ 34#endif /* MHD_HTTPS_REQUIRE_GCRYPT */
35#include "tls_test_common.h" 35#include "tls_test_common.h"
36#include "tls_test_keys.h" 36#include "tls_test_keys.h"
37 37
@@ -90,12 +90,12 @@ main (int argc, char *const *argv)
90 (void) argc; 90 (void) argc;
91 (void) argv; /* Unused. Silent compiler warning. */ 91 (void) argv; /* Unused. Silent compiler warning. */
92 92
93#ifdef MHD_HTTPS_REQUIRE_GRYPT 93#ifdef MHD_HTTPS_REQUIRE_GCRYPT
94 gcry_control (GCRYCTL_ENABLE_QUICK_RANDOM, 0); 94 gcry_control (GCRYCTL_ENABLE_QUICK_RANDOM, 0);
95#ifdef GCRYCTL_INITIALIZATION_FINISHED 95#ifdef GCRYCTL_INITIALIZATION_FINISHED
96 gcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0); 96 gcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0);
97#endif 97#endif
98#endif /* MHD_HTTPS_REQUIRE_GRYPT */ 98#endif /* MHD_HTTPS_REQUIRE_GCRYPT */
99 if (! testsuite_curl_global_init ()) 99 if (! testsuite_curl_global_init ())
100 return 99; 100 return 99;
101 if (NULL == curl_version_info (CURLVERSION_NOW)->ssl_version) 101 if (NULL == curl_version_info (CURLVERSION_NOW)->ssl_version)
diff --git a/src/testcurl/https/test_tls_extensions.c b/src/testcurl/https/test_tls_extensions.c
index 3fe4ef71..277bd010 100644
--- a/src/testcurl/https/test_tls_extensions.c
+++ b/src/testcurl/https/test_tls_extensions.c
@@ -29,9 +29,9 @@
29#include "microhttpd.h" 29#include "microhttpd.h"
30#include "tls_test_common.h" 30#include "tls_test_common.h"
31#include "mhd_sockets.h" /* only macros used */ 31#include "mhd_sockets.h" /* only macros used */
32#ifdef MHD_HTTPS_REQUIRE_GRYPT 32#ifdef MHD_HTTPS_REQUIRE_GCRYPT
33#include <gcrypt.h> 33#include <gcrypt.h>
34#endif /* MHD_HTTPS_REQUIRE_GRYPT */ 34#endif /* MHD_HTTPS_REQUIRE_GCRYPT */
35#include "tls_test_keys.h" 35#include "tls_test_keys.h"
36 36
37#define MAX_EXT_DATA_LENGTH 256 37#define MAX_EXT_DATA_LENGTH 256
@@ -220,12 +220,12 @@ main (int argc, char *const *argv)
220 else 220 else
221 port = 3080; 221 port = 3080;
222 222
223#ifdef MHD_HTTPS_REQUIRE_GRYPT 223#ifdef MHD_HTTPS_REQUIRE_GCRYPT
224 gcry_control (GCRYCTL_ENABLE_QUICK_RANDOM, 0); 224 gcry_control (GCRYCTL_ENABLE_QUICK_RANDOM, 0);
225#ifdef GCRYCTL_INITIALIZATION_FINISHED 225#ifdef GCRYCTL_INITIALIZATION_FINISHED
226 gcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0); 226 gcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0);
227#endif 227#endif
228#endif /* MHD_HTTPS_REQUIRE_GRYPT */ 228#endif /* MHD_HTTPS_REQUIRE_GCRYPT */
229 MHD_gtls_global_set_log_level (11); 229 MHD_gtls_global_set_log_level (11);
230 230
231 if ((test_fd = setup_test_file ()) == NULL) 231 if ((test_fd = setup_test_file ()) == NULL)
diff --git a/src/testcurl/https/test_tls_options.c b/src/testcurl/https/test_tls_options.c
index 8c67a0c6..7e15e3ca 100644
--- a/src/testcurl/https/test_tls_options.c
+++ b/src/testcurl/https/test_tls_options.c
@@ -28,9 +28,9 @@
28#include "microhttpd.h" 28#include "microhttpd.h"
29#include <sys/stat.h> 29#include <sys/stat.h>
30#include <limits.h> 30#include <limits.h>
31#ifdef MHD_HTTPS_REQUIRE_GRYPT 31#ifdef MHD_HTTPS_REQUIRE_GCRYPT
32#include <gcrypt.h> 32#include <gcrypt.h>
33#endif /* MHD_HTTPS_REQUIRE_GRYPT */ 33#endif /* MHD_HTTPS_REQUIRE_GCRYPT */
34#include "tls_test_common.h" 34#include "tls_test_common.h"
35#include "tls_test_keys.h" 35#include "tls_test_keys.h"
36 36
@@ -100,13 +100,13 @@ main (int argc, char *const *argv)
100 else 100 else
101 port = 3010; 101 port = 3010;
102 102
103#ifdef MHD_HTTPS_REQUIRE_GRYPT 103#ifdef MHD_HTTPS_REQUIRE_GCRYPT
104 gcry_control (GCRYCTL_DISABLE_SECMEM, 0); 104 gcry_control (GCRYCTL_DISABLE_SECMEM, 0);
105 gcry_control (GCRYCTL_ENABLE_QUICK_RANDOM, 0); 105 gcry_control (GCRYCTL_ENABLE_QUICK_RANDOM, 0);
106#ifdef GCRYCTL_INITIALIZATION_FINISHED 106#ifdef GCRYCTL_INITIALIZATION_FINISHED
107 gcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0); 107 gcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0);
108#endif 108#endif
109#endif /* MHD_HTTPS_REQUIRE_GRYPT */ 109#endif /* MHD_HTTPS_REQUIRE_GCRYPT */
110 if (! testsuite_curl_global_init ()) 110 if (! testsuite_curl_global_init ())
111 return 99; 111 return 99;
112 112
diff --git a/src/testcurl/test_basicauth.c b/src/testcurl/test_basicauth.c
index ed0406db..f9ce2455 100644
--- a/src/testcurl/test_basicauth.c
+++ b/src/testcurl/test_basicauth.c
@@ -721,14 +721,14 @@ main (int argc, char *const *argv)
721 } 721 }
722#endif /* libcurl version before 7.21.3 */ 722#endif /* libcurl version before 7.21.3 */
723 723
724#ifdef MHD_HTTPS_REQUIRE_GRYPT 724#ifdef MHD_HTTPS_REQUIRE_GCRYPT
725#ifdef HAVE_GCRYPT_H 725#ifdef HAVE_GCRYPT_H
726 gcry_control (GCRYCTL_ENABLE_QUICK_RANDOM, 0); 726 gcry_control (GCRYCTL_ENABLE_QUICK_RANDOM, 0);
727#ifdef GCRYCTL_INITIALIZATION_FINISHED 727#ifdef GCRYCTL_INITIALIZATION_FINISHED
728 gcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0); 728 gcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0);
729#endif 729#endif
730#endif 730#endif
731#endif /* MHD_HTTPS_REQUIRE_GRYPT */ 731#endif /* MHD_HTTPS_REQUIRE_GCRYPT */
732 oldapi = has_in_name (argv[0], "_oldapi"); 732 oldapi = has_in_name (argv[0], "_oldapi");
733 if (0 != curl_global_init (CURL_GLOBAL_WIN32)) 733 if (0 != curl_global_init (CURL_GLOBAL_WIN32))
734 return 2; 734 return 2;
diff --git a/src/testcurl/test_digestauth.c b/src/testcurl/test_digestauth.c
index 61b5b647..387d8abf 100644
--- a/src/testcurl/test_digestauth.c
+++ b/src/testcurl/test_digestauth.c
@@ -33,11 +33,11 @@
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_GRYPT 36#ifdef MHD_HTTPS_REQUIRE_GCRYPT
37#ifdef HAVE_GCRYPT_H 37#ifdef HAVE_GCRYPT_H
38#include <gcrypt.h> 38#include <gcrypt.h>
39#endif 39#endif
40#endif /* MHD_HTTPS_REQUIRE_GRYPT */ 40#endif /* MHD_HTTPS_REQUIRE_GCRYPT */
41 41
42#ifndef WINDOWS 42#ifndef WINDOWS
43#include <sys/socket.h> 43#include <sys/socket.h>
@@ -491,14 +491,14 @@ main (int argc, char *const *argv)
491 unsigned int errorCount = 0; 491 unsigned int errorCount = 0;
492 (void) argc; (void) argv; /* Unused. Silent compiler warning. */ 492 (void) argc; (void) argv; /* Unused. Silent compiler warning. */
493 493
494#ifdef MHD_HTTPS_REQUIRE_GRYPT 494#ifdef MHD_HTTPS_REQUIRE_GCRYPT
495#ifdef HAVE_GCRYPT_H 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
500#endif 500#endif
501#endif /* MHD_HTTPS_REQUIRE_GRYPT */ 501#endif /* MHD_HTTPS_REQUIRE_GCRYPT */
502 if (0 != curl_global_init (CURL_GLOBAL_WIN32)) 502 if (0 != curl_global_init (CURL_GLOBAL_WIN32))
503 return 2; 503 return 2;
504 errorCount += testDigestAuth (); 504 errorCount += testDigestAuth ();
diff --git a/src/testcurl/test_digestauth_concurrent.c b/src/testcurl/test_digestauth_concurrent.c
index efda16b6..d2bcfd47 100644
--- a/src/testcurl/test_digestauth_concurrent.c
+++ b/src/testcurl/test_digestauth_concurrent.c
@@ -33,11 +33,11 @@
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_GRYPT 36#ifdef MHD_HTTPS_REQUIRE_GCRYPT
37#ifdef HAVE_GCRYPT_H 37#ifdef HAVE_GCRYPT_H
38#include <gcrypt.h> 38#include <gcrypt.h>
39#endif 39#endif
40#endif /* MHD_HTTPS_REQUIRE_GRYPT */ 40#endif /* MHD_HTTPS_REQUIRE_GCRYPT */
41 41
42#ifndef WINDOWS 42#ifndef WINDOWS
43#include <sys/socket.h> 43#include <sys/socket.h>
@@ -669,14 +669,14 @@ main (int argc, char *const *argv)
669 has_param (argc, argv, "-s") || 669 has_param (argc, argv, "-s") ||
670 has_param (argc, argv, "--silent")); 670 has_param (argc, argv, "--silent"));
671 671
672 #ifdef MHD_HTTPS_REQUIRE_GRYPT 672 #ifdef MHD_HTTPS_REQUIRE_GCRYPT
673#ifdef HAVE_GCRYPT_H 673#ifdef HAVE_GCRYPT_H
674 gcry_control (GCRYCTL_ENABLE_QUICK_RANDOM, 0); 674 gcry_control (GCRYCTL_ENABLE_QUICK_RANDOM, 0);
675#ifdef GCRYCTL_INITIALIZATION_FINISHED 675#ifdef GCRYCTL_INITIALIZATION_FINISHED
676 gcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0); 676 gcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0);
677#endif 677#endif
678#endif 678#endif
679#endif /* MHD_HTTPS_REQUIRE_GRYPT */ 679#endif /* MHD_HTTPS_REQUIRE_GCRYPT */
680 if (0 != curl_global_init (CURL_GLOBAL_WIN32)) 680 if (0 != curl_global_init (CURL_GLOBAL_WIN32))
681 return 2; 681 return 2;
682 errorCount += testDigestAuth (); 682 errorCount += testDigestAuth ();
diff --git a/src/testcurl/test_digestauth_sha256.c b/src/testcurl/test_digestauth_sha256.c
index 093fe263..0781c44c 100644
--- a/src/testcurl/test_digestauth_sha256.c
+++ b/src/testcurl/test_digestauth_sha256.c
@@ -34,11 +34,11 @@
34#include <stdlib.h> 34#include <stdlib.h>
35#include <string.h> 35#include <string.h>
36#include <time.h> 36#include <time.h>
37#ifdef MHD_HTTPS_REQUIRE_GRYPT 37#ifdef MHD_HTTPS_REQUIRE_GCRYPT
38#ifdef HAVE_GCRYPT_H 38#ifdef HAVE_GCRYPT_H
39#include <gcrypt.h> 39#include <gcrypt.h>
40#endif 40#endif
41#endif /* MHD_HTTPS_REQUIRE_GRYPT */ 41#endif /* MHD_HTTPS_REQUIRE_GCRYPT */
42 42
43#ifndef WINDOWS 43#ifndef WINDOWS
44#include <sys/socket.h> 44#include <sys/socket.h>
@@ -320,14 +320,14 @@ main (int argc, char *const *argv)
320 /* curl added SHA256 support in 7.57 = 7.0x39 */ 320 /* curl added SHA256 support in 7.57 = 7.0x39 */
321 if (d->version_num < 0x073900) 321 if (d->version_num < 0x073900)
322 return 77; /* skip test, curl is too old */ 322 return 77; /* skip test, curl is too old */
323#ifdef MHD_HTTPS_REQUIRE_GRYPT 323#ifdef MHD_HTTPS_REQUIRE_GCRYPT
324#ifdef HAVE_GCRYPT_H 324#ifdef HAVE_GCRYPT_H
325 gcry_control (GCRYCTL_ENABLE_QUICK_RANDOM, 0); 325 gcry_control (GCRYCTL_ENABLE_QUICK_RANDOM, 0);
326#ifdef GCRYCTL_INITIALIZATION_FINISHED 326#ifdef GCRYCTL_INITIALIZATION_FINISHED
327 gcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0); 327 gcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0);
328#endif 328#endif
329#endif 329#endif
330#endif /* MHD_HTTPS_REQUIRE_GRYPT */ 330#endif /* MHD_HTTPS_REQUIRE_GCRYPT */
331 if (0 != curl_global_init (CURL_GLOBAL_WIN32)) 331 if (0 != curl_global_init (CURL_GLOBAL_WIN32))
332 return 2; 332 return 2;
333 errorCount += testDigestAuth (); 333 errorCount += testDigestAuth ();
diff --git a/src/testcurl/test_digestauth_with_arguments.c b/src/testcurl/test_digestauth_with_arguments.c
index aabf1b7e..09d70674 100644
--- a/src/testcurl/test_digestauth_with_arguments.c
+++ b/src/testcurl/test_digestauth_with_arguments.c
@@ -32,11 +32,11 @@
32#include <stdlib.h> 32#include <stdlib.h>
33#include <string.h> 33#include <string.h>
34#include <time.h> 34#include <time.h>
35#ifdef MHD_HTTPS_REQUIRE_GRYPT 35#ifdef MHD_HTTPS_REQUIRE_GCRYPT
36#ifdef HAVE_GCRYPT_H 36#ifdef HAVE_GCRYPT_H
37#include <gcrypt.h> 37#include <gcrypt.h>
38#endif 38#endif
39#endif /* MHD_HTTPS_REQUIRE_GRYPT */ 39#endif /* MHD_HTTPS_REQUIRE_GCRYPT */
40 40
41#ifndef WINDOWS 41#ifndef WINDOWS
42#include <sys/socket.h> 42#include <sys/socket.h>
@@ -289,14 +289,14 @@ main (int argc, char *const *argv)
289 } 289 }
290#endif /* libcurl version 7.62.x */ 290#endif /* libcurl version 7.62.x */
291 291
292#ifdef MHD_HTTPS_REQUIRE_GRYPT 292#ifdef MHD_HTTPS_REQUIRE_GCRYPT
293#ifdef HAVE_GCRYPT_H 293#ifdef HAVE_GCRYPT_H
294 gcry_control (GCRYCTL_ENABLE_QUICK_RANDOM, 0); 294 gcry_control (GCRYCTL_ENABLE_QUICK_RANDOM, 0);
295#ifdef GCRYCTL_INITIALIZATION_FINISHED 295#ifdef GCRYCTL_INITIALIZATION_FINISHED
296 gcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0); 296 gcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0);
297#endif 297#endif
298#endif 298#endif
299#endif /* MHD_HTTPS_REQUIRE_GRYPT */ 299#endif /* MHD_HTTPS_REQUIRE_GCRYPT */
300 if (0 != curl_global_init (CURL_GLOBAL_WIN32)) 300 if (0 != curl_global_init (CURL_GLOBAL_WIN32))
301 return 2; 301 return 2;
302 errorCount += testDigestAuth (); 302 errorCount += testDigestAuth ();
diff --git a/src/testcurl/test_postform.c b/src/testcurl/test_postform.c
index a2dfd41d..1ada80e2 100644
--- a/src/testcurl/test_postform.c
+++ b/src/testcurl/test_postform.c
@@ -33,11 +33,11 @@
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_GRYPT 36#ifdef MHD_HTTPS_REQUIRE_GCRYPT
37#ifdef HAVE_GCRYPT_H 37#ifdef HAVE_GCRYPT_H
38#include <gcrypt.h> 38#include <gcrypt.h>
39#endif 39#endif
40#endif /* MHD_HTTPS_REQUIRE_GRYPT */ 40#endif /* MHD_HTTPS_REQUIRE_GCRYPT */
41 41
42#ifndef WINDOWS 42#ifndef WINDOWS
43#include <unistd.h> 43#include <unistd.h>
@@ -624,14 +624,14 @@ main (int argc, char *const *argv)
624 unsigned int errorCount = 0; 624 unsigned int errorCount = 0;
625 (void) argc; /* Unused. Silent compiler warning. */ 625 (void) argc; /* Unused. Silent compiler warning. */
626 626
627#ifdef MHD_HTTPS_REQUIRE_GRYPT 627#ifdef MHD_HTTPS_REQUIRE_GCRYPT
628#ifdef HAVE_GCRYPT_H 628#ifdef HAVE_GCRYPT_H
629 gcry_control (GCRYCTL_ENABLE_QUICK_RANDOM, 0); 629 gcry_control (GCRYCTL_ENABLE_QUICK_RANDOM, 0);
630#ifdef GCRYCTL_INITIALIZATION_FINISHED 630#ifdef GCRYCTL_INITIALIZATION_FINISHED
631 gcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0); 631 gcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0);
632#endif 632#endif
633#endif 633#endif
634#endif /* MHD_HTTPS_REQUIRE_GRYPT */ 634#endif /* MHD_HTTPS_REQUIRE_GCRYPT */
635 if ((NULL == argv) || (0 == argv[0])) 635 if ((NULL == argv) || (0 == argv[0]))
636 return 99; 636 return 99;
637 oneone = has_in_name (argv[0], "11"); 637 oneone = has_in_name (argv[0], "11");