29 |
|
|
30 |
#include <gnutls/gnutls.h> |
#include <gnutls/gnutls.h> |
31 |
#include <gnutls/x509.h> |
#include <gnutls/x509.h> |
32 |
|
#include <gcrypt.h> |
33 |
|
GCRY_THREAD_OPTION_PTHREAD_IMPL; |
34 |
|
|
35 |
#ifdef ENABLE_SMP |
#ifdef ENABLE_SMP |
36 |
pthread_mutex_t ssl_session_cache_lock = PTHREAD_MUTEX_INITIALIZER; |
pthread_mutex_t ssl_session_cache_lock = PTHREAD_MUTEX_INITIALIZER; |
215 |
|
|
216 |
log_error_time(); |
log_error_time(); |
217 |
fprintf(stderr, "tls: Initializing GnuTLS/%s.\n", gnutls_check_version(NULL)); |
fprintf(stderr, "tls: Initializing GnuTLS/%s.\n", gnutls_check_version(NULL)); |
218 |
|
gcry_control (GCRYCTL_SET_THREAD_CBS, &gcry_threads_pthread); |
219 |
gnutls_global_init(); |
gnutls_global_init(); |
220 |
|
|
221 |
if (gnutls_certificate_allocate_credentials( &credentials[0]) < 0) { |
if (gnutls_certificate_allocate_credentials( &credentials[0]) < 0) { |