From: Doug MacEachern Date: Sat, 30 Mar 2002 08:11:44 +0000 (+0000) Subject: add/use EVP_PKEY_reference_inc and X509_reference_inc compat macros X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=be0788338f36eb0ded29f086489e58e7bb614a64;p=thirdparty%2Fapache%2Fhttpd.git 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/modules/ssl@94341 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/ssl_engine_kernel.c b/ssl_engine_kernel.c index 1dbbf263188..d06f8ff4e80 100644 --- a/ssl_engine_kernel.c +++ b/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/ssl_toolkit_compat.h b/ssl_toolkit_compat.h index 6ed01f8b12d..7501402743b 100644 --- a/ssl_toolkit_compat.h +++ b/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