diff options
Diffstat (limited to 'src/testcurl/https/test_https_time_out.c')
-rw-r--r-- | src/testcurl/https/test_https_time_out.c | 11 |
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 | ||
33 | extern const char srv_key_pem[]; | 34 | extern const char srv_key_pem[]; |
34 | extern const char srv_self_signed_cert_pem[]; | 35 | extern const char srv_self_signed_cert_pem[]; |
35 | 36 | ||
36 | static const int TIME_OUT = 3; | 37 | static const int TIME_OUT = 3; |
37 | 38 | ||
38 | char *http_get_req = "GET / HTTP/1.1\r\n\r\n"; | 39 | static const char *http_get_req = "GET / HTTP/1.1\r\n\r\n"; |
39 | 40 | ||
40 | static int | 41 | static int |
41 | test_tls_session_time_out (gnutls_session_t session) | 42 | test_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 | ||
93 | GCRY_THREAD_OPTION_PTHREAD_IMPL; | ||
94 | |||
92 | int | 95 | int |
93 | main (int argc, char *const *argv) | 96 | main (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 | ||