24 #ifndef OPENSSL_SUPPORT_H_INCLUDED
25 #define OPENSSL_SUPPORT_H_INCLUDED
28 #include <openssl/ssl.h>
29 #include <openssl/dh.h>
32 #if !SYSLOG_NG_HAVE_DECL_SSL_CTX_GET0_PARAM
36 #if !SYSLOG_NG_HAVE_DECL_X509_STORE_CTX_GET0_CERT
40 #if !SYSLOG_NG_HAVE_DECL_X509_GET_EXTENSION_FLAGS
45 #if SYSLOG_NG_HAVE_DECL_EVP_MD_CTX_RESET
46 #include <openssl/evp.h>
47 #define EVP_MD_CTX_cleanup EVP_MD_CTX_reset
48 #define DECLARE_EVP_MD_CTX(md_ctx) EVP_MD_CTX * md_ctx = EVP_MD_CTX_create()
50 #define DECLARE_EVP_MD_CTX(md_ctx) EVP_MD_CTX _##md_ctx; EVP_MD_CTX * md_ctx = & _##md_ctx
51 #define EVP_MD_CTX_destroy(md_ctx) EVP_MD_CTX_cleanup(md_ctx)
54 #if !SYSLOG_NG_HAVE_DECL_ASN1_STRING_GET0_DATA
55 #define ASN1_STRING_get0_data ASN1_STRING_data
58 #if OPENSSL_VERSION_NUMBER < 0x30000000L
59 #define SYSLOG_NG_HAVE_DECL_DIGEST_MD4 1
61 #define SYSLOG_NG_HAVE_DECL_DIGEST_MD4 0
64 #if !SYSLOG_NG_HAVE_DECL_DH_SET0_PQG && OPENSSL_VERSION_NUMBER < 0x30000000L
65 int DH_set0_pqg(DH *dh, BIGNUM *p, BIGNUM *q, BIGNUM *g);
68 #if !SYSLOG_NG_HAVE_DECL_BN_GET_RFC3526_PRIME_2048
gboolean openssl_ctx_load_dh_from_file(SSL_CTX *ctx, const gchar *dhparam_file)
Definition: openssl_support.c:245
BIGNUM * BN_get_rfc3526_prime_2048(BIGNUM *bn)
Definition: openssl_support.c:314
void openssl_ctx_setup_ecdh(SSL_CTX *ctx)
Definition: openssl_support.c:166
X509_VERIFY_PARAM * SSL_CTX_get0_param(SSL_CTX *ctx)
Definition: openssl_support.c:31
X509 * X509_STORE_CTX_get0_cert(X509_STORE_CTX *ctx)
Definition: openssl_support.c:38
gboolean openssl_ctx_setup_dh(SSL_CTX *ctx)
Definition: openssl_support.c:189
void openssl_ctx_setup_session_tickets(SSL_CTX *ctx)
Definition: openssl_support.c:321
uint32_t X509_get_extension_flags(X509 *x)
Definition: openssl_support.c:45
int DH_set0_pqg(DH *dh, BIGNUM *p, BIGNUM *q, BIGNUM *g)
Definition: openssl_support.c:283
void openssl_crypto_init_threading(void)
Definition: openssl_support.c:129
void openssl_crypto_deinit_threading(void)
Definition: openssl_support.c:136
void openssl_init(void)
Definition: openssl_support.c:156