mirror of
https://git.gnunet.org/libmicrohttpd.git
synced 2026-09-29 04:09:31 +03:00
proper gcrypt thread initialization in tests
This commit is contained in:
1 parent
4c1b251d75
commit
a2425da6f9
10 files changed
+82
-10
No files matched your search
@@ -32,6 +32,7 @@
|
||||
#include <sys/stat.h>
|
||||
#include <limits.h>
|
||||
#include <curl/curl.h>
|
||||
#include <gcrypt.h>
|
||||
#include "tls_test_common.h"
|
||||
|
||||
extern const char srv_key_pem[];
|
||||
@@ -122,6 +123,10 @@ test_parallel_clients (void *cls, const char *cipher_suite,
|
||||
}
|
||||
|
||||
|
||||
|
||||
GCRY_THREAD_OPTION_PTHREAD_IMPL;
|
||||
|
||||
|
||||
int
|
||||
main (int argc, char *const *argv)
|
||||
{
|
||||
@@ -130,6 +135,13 @@ main (int argc, char *const *argv)
|
||||
|
||||
/* initialize random seed used by curl clients */
|
||||
unsigned int iseed = (unsigned int) time (NULL);
|
||||
|
||||
|
||||
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
|
||||
srand (iseed);
|
||||
ssl_version = curl_version_info (CURLVERSION_NOW)->ssl_version;
|
||||
if (NULL == ssl_version)
|
||||
|
||||
Reference in new issue
Block a user