aboutsummaryrefslogtreecommitdiff
path: root/src/testcurl/https/test_https_time_out.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/testcurl/https/test_https_time_out.c')
-rw-r--r--src/testcurl/https/test_https_time_out.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/testcurl/https/test_https_time_out.c b/src/testcurl/https/test_https_time_out.c
index 16b171ac..112f5390 100644
--- a/src/testcurl/https/test_https_time_out.c
+++ b/src/testcurl/https/test_https_time_out.c
@@ -29,13 +29,14 @@
29#include "microhttpd.h" 29#include "microhttpd.h"
30#include "internal.h" 30#include "internal.h"
31#include "tls_test_common.h" 31#include "tls_test_common.h"
32#include <gcrypt.h>
32 33
33extern const char srv_key_pem[]; 34extern const char srv_key_pem[];
34extern const char srv_self_signed_cert_pem[]; 35extern const char srv_self_signed_cert_pem[];
35 36
36static const int TIME_OUT = 3; 37static const int TIME_OUT = 3;
37 38
38char *http_get_req = "GET / HTTP/1.1\r\n\r\n"; 39static const char *http_get_req = "GET / HTTP/1.1\r\n\r\n";
39 40
40static int 41static int
41test_tls_session_time_out (gnutls_session_t session) 42test_tls_session_time_out (gnutls_session_t session)
@@ -89,6 +90,8 @@ test_tls_session_time_out (gnutls_session_t session)
89 return 0; 90 return 0;
90} 91}
91 92
93GCRY_THREAD_OPTION_PTHREAD_IMPL;
94
92int 95int
93main (int argc, char *const *argv) 96main (int argc, char *const *argv)
94{ 97{
@@ -99,6 +102,12 @@ main (int argc, char *const *argv)
99 gnutls_datum_t cert; 102 gnutls_datum_t cert;
100 gnutls_certificate_credentials_t xcred; 103 gnutls_certificate_credentials_t xcred;
101 104
105
106 gcry_control (GCRYCTL_ENABLE_QUICK_RANDOM, 0);
107 gcry_control (GCRYCTL_SET_THREAD_CBS, &gcry_threads_pthread);
108#ifdef GCRYCTL_INITIALIZATION_FINISHED
109 gcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0);
110#endif
102 gnutls_global_init (); 111 gnutls_global_init ();
103 gnutls_global_set_log_level (11); 112 gnutls_global_set_log_level (11);
104 113