From 505209447857aa4c90dc405db78e9ccbefad961f Mon Sep 17 00:00:00 2001 From: Doug MacEachern Date: Sat, 30 Mar 2002 08:11:44 +0000 Subject: [PATCH] add/use EVP_PKEY_reference_inc and X509_reference_inc compat macros to get these changes working with sslc git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94341 13f79535-47bb-0310-9956-ffa450edef68 --- modules/ssl/ssl_engine_kernel.c | 4 ++-- modules/ssl/ssl_toolkit_compat.h | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/modules/ssl/ssl_engine_kernel.c b/modules/ssl/ssl_engine_kernel.c index 1dbbf26318..d06f8ff4e8 100644 --- a/modules/ssl/ssl_engine_kernel.c +++ b/modules/ssl/ssl_engine_kernel.c @@ -1578,9 +1578,9 @@ static void modssl_proxy_info_log(server_rec *s, */ #define modssl_set_cert_info(info, cert, pkey) \ *cert = info->x509; \ + X509_reference_inc(*cert); \ *pkey = info->x_pkey->dec_pkey; \ - CRYPTO_add(&((*cert)->references), +1, CRYPTO_LOCK_X509_PKEY); \ - CRYPTO_add(&((*pkey)->references), +1, CRYPTO_LOCK_X509_PKEY) + EVP_PKEY_reference_inc(*pkey) int ssl_callback_proxy_cert(SSL *ssl, X509 **x509, EVP_PKEY **pkey) { diff --git a/modules/ssl/ssl_toolkit_compat.h b/modules/ssl/ssl_toolkit_compat.h index 6ed01f8b12..7501402743 100644 --- a/modules/ssl/ssl_toolkit_compat.h +++ b/modules/ssl/ssl_toolkit_compat.h @@ -105,6 +105,12 @@ #define modssl_set_cipher_list SSL_set_cipher_list +#define EVP_PKEY_reference_inc(pkey) \ + CRYPTO_add(&((pkey)->references), +1, CRYPTO_LOCK_X509_PKEY) + +#define X509_reference_inc(cert) \ + CRYPTO_add(&((cert)->references), +1, CRYPTO_LOCK_X509) + #define HAVE_SSL_RAND_EGD /* since 9.5.1 */ #define HAVE_SSL_X509V3_EXT_d2i -- 2.40.0