proper gcrypt thread initialization in tests

This commit is contained in:
Christian Grothoff
2013-09-15 20:22:40 +00:00
parent 4c1b251d75
commit a2425da6f9
10 changed files with 82 additions and 10 deletions
+9 -1
View File
@@ -27,7 +27,7 @@
#include "platform.h"
#include "microhttpd.h"
#include <curl/curl.h>
#include <gcrypt.h>
#include "tls_test_common.h"
extern int curl_check_version (const char *req_version, ...);
@@ -151,11 +151,19 @@ test_query_session ()
}
GCRY_THREAD_OPTION_PTHREAD_IMPL;
int
main (int argc, char *const *argv)
{
unsigned int errorCount = 0;
gcry_control (GCRYCTL_ENABLE_QUICK_RANDOM, 0);
gcry_control (GCRYCTL_SET_THREAD_CBS, &gcry_threads_pthread);
#ifdef GCRYCTL_INITIALIZATION_FINISHED
gcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0);
#endif
if (0 != curl_global_init (CURL_GLOBAL_ALL))
{
fprintf (stderr, "Error (code: %u)\n", errorCount);