Dropped dependency on libgcrypt with new GnuTLS (>2.12.20) versions

This commit is contained in:
Evgeny Grin (Karlson2k) committed 2017-06-20 23:55:34 +03:00
1 parent 6364c4700d
commit a7b7a32ec6
19 files changed
+198 -44

No files matched your search

+2
View File
@@ -28,7 +28,9 @@
#include <limits.h>
#include <sys/stat.h>
#include <curl/curl.h>
#ifdef MHD_HTTPS_REQUIRE_GRYPT
#include <gcrypt.h>
#endif /* MHD_HTTPS_REQUIRE_GRYPT */
#include "tls_test_common.h"
extern const char srv_key_pem[];
+4
View File
@@ -29,7 +29,9 @@
#include <limits.h>
#include <sys/stat.h>
#include <curl/curl.h>
#ifdef MHD_HTTPS_REQUIRE_GRYPT
#include <gcrypt.h>
#endif /* MHD_HTTPS_REQUIRE_GRYPT */
#include "tls_test_common.h"
extern const char srv_key_pem[];
@@ -102,10 +104,12 @@ main (int argc, char *const *argv)
const char *aes256_sha_tlsv1 = "AES256-SHA";
const char *des_cbc3_sha_tlsv1 = "DES-CBC3-SHA";
#ifdef MHD_HTTPS_REQUIRE_GRYPT
gcry_control (GCRYCTL_ENABLE_QUICK_RANDOM, 0);
#ifdef GCRYCTL_INITIALIZATION_FINISHED
gcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0);
#endif
#endif /* MHD_HTTPS_REQUIRE_GRYPT */
if (0 != curl_global_init (CURL_GLOBAL_ALL))
{
fprintf (stderr, "Error: %s\n", strerror (errno));
@@ -31,7 +31,9 @@
#include <limits.h>
#include <curl/curl.h>
#include <pthread.h>
#ifdef MHD_HTTPS_REQUIRE_GRYPT
#include <gcrypt.h>
#endif /* MHD_HTTPS_REQUIRE_GRYPT */
#include "tls_test_common.h"
#if defined(CPU_COUNT) && (CPU_COUNT+0) < 4
@@ -33,7 +33,9 @@
#include <limits.h>
#include <curl/curl.h>
#include <pthread.h>
#ifdef MHD_HTTPS_REQUIRE_GRYPT
#include <gcrypt.h>
#endif /* MHD_HTTPS_REQUIRE_GRYPT */
#include "tls_test_common.h"
#if defined(CPU_COUNT) && (CPU_COUNT+0) < 4
@@ -140,9 +142,11 @@ main (int argc, char *const *argv)
/* initialize random seed used by curl clients */
unsigned int iseed = (unsigned int) time (NULL);
#ifdef MHD_HTTPS_REQUIRE_GRYPT
#ifdef GCRYCTL_INITIALIZATION_FINISHED
gcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0);
#endif
#endif /* MHD_HTTPS_REQUIRE_GRYPT */
srand (iseed);
if (0 != curl_global_init (CURL_GLOBAL_ALL))
{
@@ -29,7 +29,9 @@
#include <limits.h>
#include <sys/stat.h>
#include <curl/curl.h>
#ifdef MHD_HTTPS_REQUIRE_GRYPT
#include <gcrypt.h>
#endif /* MHD_HTTPS_REQUIRE_GRYPT */
#include "tls_test_common.h"
extern const char srv_key_pem[];
@@ -29,7 +29,9 @@
#include <curl/curl.h>
#include <limits.h>
#include <sys/stat.h>
#ifdef MHD_HTTPS_REQUIRE_GRYPT
#include <gcrypt.h>
#endif /* MHD_HTTPS_REQUIRE_GRYPT */
#include "tls_test_common.h"
extern int curl_check_version (const char *req_version, ...);
@@ -98,10 +100,12 @@ main (int argc, char *const *argv)
FILE *cert;
const char *aes256_sha = "AES256-SHA";
#ifdef MHD_HTTPS_REQUIRE_GRYPT
gcry_control (GCRYCTL_ENABLE_QUICK_RANDOM, 0);
#ifdef GCRYCTL_INITIALIZATION_FINISHED
gcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0);
#endif
#endif /* MHD_HTTPS_REQUIRE_GRYPT */
if (0 != curl_global_init (CURL_GLOBAL_ALL))
{
fprintf (stderr, "Error (code: %u). l:%d f:%s\n", errorCount, __LINE__,
@@ -27,7 +27,9 @@
#include "platform.h"
#include "microhttpd.h"
#include <curl/curl.h>
#ifdef MHD_HTTPS_REQUIRE_GRYPT
#include <gcrypt.h>
#endif /* MHD_HTTPS_REQUIRE_GRYPT */
#include "tls_test_common.h"
extern int curl_check_version (const char *req_version, ...);
@@ -173,10 +175,12 @@ main (int argc, char *const *argv)
unsigned int errorCount = 0;
const char *ssl_version;
#ifdef MHD_HTTPS_REQUIRE_GRYPT
gcry_control (GCRYCTL_ENABLE_QUICK_RANDOM, 0);
#ifdef GCRYCTL_INITIALIZATION_FINISHED
gcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0);
#endif
#endif /* MHD_HTTPS_REQUIRE_GRYPT */
if (0 != curl_global_init (CURL_GLOBAL_ALL))
{
fprintf (stderr, "Error (code: %u)\n", errorCount);
+4
View File
@@ -28,7 +28,9 @@
#include <limits.h>
#include <sys/stat.h>
#include <curl/curl.h>
#ifdef MHD_HTTPS_REQUIRE_GRYPT
#include <gcrypt.h>
#endif /* MHD_HTTPS_REQUIRE_GRYPT */
#include "tls_test_common.h"
#include <gnutls/gnutls.h>
@@ -249,10 +251,12 @@ main (int argc, char *const *argv)
unsigned int error_count = 0;
struct MHD_Daemon *d;
#ifdef MHD_HTTPS_REQUIRE_GRYPT
gcry_control (GCRYCTL_ENABLE_QUICK_RANDOM, 0);
#ifdef GCRYCTL_INITIALIZATION_FINISHED
gcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0);
#endif
#endif /* MHD_HTTPS_REQUIRE_GRYPT */
if (0 != curl_global_init (CURL_GLOBAL_ALL))
{
fprintf (stderr, "Error: %s\n", strerror (errno));
+4
View File
@@ -28,7 +28,9 @@
#include "platform.h"
#include "microhttpd.h"
#include "tls_test_common.h"
#ifdef MHD_HTTPS_REQUIRE_GRYPT
#include <gcrypt.h>
#endif /* MHD_HTTPS_REQUIRE_GRYPT */
#include "mhd_sockets.h" /* only macros used */
@@ -109,10 +111,12 @@ main (int argc, char *const *argv)
gnutls_certificate_credentials_t xcred;
#ifdef MHD_HTTPS_REQUIRE_GRYPT
gcry_control (GCRYCTL_ENABLE_QUICK_RANDOM, 0);
#ifdef GCRYCTL_INITIALIZATION_FINISHED
gcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0);
#endif
#endif /* MHD_HTTPS_REQUIRE_GRYPT */
gnutls_global_init ();
gnutls_global_set_log_level (11);
@@ -29,7 +29,9 @@
#include <curl/curl.h>
#include <limits.h>
#include <sys/stat.h>
#ifdef MHD_HTTPS_REQUIRE_GRYPT
#include <gcrypt.h>
#endif /* MHD_HTTPS_REQUIRE_GRYPT */
#include "tls_test_common.h"
extern int curl_check_version (const char *req_version, ...);
@@ -75,10 +77,12 @@ main (int argc, char *const *argv)
unsigned int errorCount = 0;
char *aes256_sha = "AES256-SHA";
#ifdef MHD_HTTPS_REQUIRE_GRYPT
gcry_control (GCRYCTL_ENABLE_QUICK_RANDOM, 0);
#ifdef GCRYCTL_INITIALIZATION_FINISHED
gcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0);
#endif
#endif /* MHD_HTTPS_REQUIRE_GRYPT */
if (0 != curl_global_init (CURL_GLOBAL_ALL))
{
fprintf (stderr, "Error (code: %u)\n", errorCount);
+5
View File
@@ -29,6 +29,9 @@
#include "microhttpd.h"
#include "tls_test_common.h"
#include "mhd_sockets.h" /* only macros used */
#ifdef MHD_HTTPS_REQUIRE_GRYPT
#include <gcrypt.h>
#endif /* MHD_HTTPS_REQUIRE_GRYPT */
#define MAX_EXT_DATA_LENGTH 256
@@ -213,10 +216,12 @@ main (int argc, char *const *argv)
-1
};
#ifdef MHD_HTTPS_REQUIRE_GRYPT
gcry_control (GCRYCTL_ENABLE_QUICK_RANDOM, 0);
#ifdef GCRYCTL_INITIALIZATION_FINISHED
gcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0);
#endif
#endif /* MHD_HTTPS_REQUIRE_GRYPT */
MHD_gtls_global_set_log_level (11);
if ((test_fd = setup_test_file ()) == NULL)
+4
View File
@@ -28,7 +28,9 @@
#include "microhttpd.h"
#include <sys/stat.h>
#include <limits.h>
#ifdef MHD_HTTPS_REQUIRE_GRYPT
#include <gcrypt.h>
#endif /* MHD_HTTPS_REQUIRE_GRYPT */
#include "tls_test_common.h"
extern const char srv_key_pem[];
@@ -85,11 +87,13 @@ main (int argc, char *const *argv)
int daemon_flags =
MHD_USE_THREAD_PER_CONNECTION | MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_TLS | MHD_USE_ERROR_LOG;
#ifdef MHD_HTTPS_REQUIRE_GRYPT
gcry_control (GCRYCTL_DISABLE_SECMEM, 0);
gcry_control (GCRYCTL_ENABLE_QUICK_RANDOM, 0);
#ifdef GCRYCTL_INITIALIZATION_FINISHED
gcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0);
#endif
#endif /* MHD_HTTPS_REQUIRE_GRYPT */
if (curl_check_version (MHD_REQ_CURL_VERSION))
{
return 77;