#if defined(HAVE_GNUTLS) || defined(HAVE_OPENSSL)
# include <gnutls/gnutls.h>
# include <gnutls/x509.h>
#elif defined(HAVE_OPENSSL)
# include <openssl/ssl.h>
# include <openssl/err.h>
# include <openssl/rand.h>
#if defined(HAVE_OPENSSL) && OPENSSL_VERSION_NUMBER < 0x1010000fL || defined(LIBRESSL_VERSION_NUMBER)
# if !defined(LIBRESSL_VERSION_NUMBER)
# define OPENSSL_INIT_LOAD_SSL_STRINGS 0
# define OPENSSL_INIT_LOAD_CRYPTO_STRINGS 0
# define OPENSSL_VERSION SSLEAY_VERSION
# define OpenSSL_version SSLeay_version
# define TLS_method TLSv1_2_method
# define TLS_client_method TLSv1_2_client_method
# define SSL_CTX_get_ciphers(ciphers) ((ciphers)->cipher_list)
# if !defined(LIBRESSL_VERSION_NUMBER)
# define SSL_CTX_set_min_proto_version(ctx, TLSv) 1
struct zbx_thread_sendval_tls_args
gnutls_certificate_credentials_t my_cert_creds;
gnutls_psk_client_credentials_t my_psk_client_creds;
gnutls_priority_t ciphersuites_cert;
gnutls_priority_t ciphersuites_psk;