Fixed initialisation of old GnuTLS versions

This commit is contained in:
Evgeny Grin (Karlson2k)
2022-09-25 18:39:40 +03:00
parent 8815effe66
commit 1e288041bd
21 changed files with 84 additions and 82 deletions
+4 -4
View File
@@ -29,9 +29,9 @@
#include <curl/curl.h>
#include <limits.h>
#include <sys/stat.h>
#ifdef MHD_HTTPS_REQUIRE_GRYPT
#ifdef MHD_HTTPS_REQUIRE_GCRYPT
#include <gcrypt.h>
#endif /* MHD_HTTPS_REQUIRE_GRYPT */
#endif /* MHD_HTTPS_REQUIRE_GCRYPT */
#include "tls_test_common.h"
#include "tls_test_keys.h"
@@ -132,12 +132,12 @@ main (int argc, char *const *argv)
const char *aes256_sha = "AES256-SHA";
(void) argc; (void) argv; /* Unused. Silent compiler warning. */
#ifdef MHD_HTTPS_REQUIRE_GRYPT
#ifdef MHD_HTTPS_REQUIRE_GCRYPT
gcry_control (GCRYCTL_ENABLE_QUICK_RANDOM, 0);
#ifdef GCRYCTL_INITIALIZATION_FINISHED
gcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0);
#endif
#endif /* MHD_HTTPS_REQUIRE_GRYPT */
#endif /* MHD_HTTPS_REQUIRE_GCRYPT */
if (! testsuite_curl_global_init ())
return 99;
if (NULL == curl_version_info (CURLVERSION_NOW)->ssl_version)