1
0
mirror of https://github.com/apache/httpd.git synced 2025-08-08 15:02:10 +03:00

* modules/ssl/ssl_private.h: Define X509_up_ref and EVP_PKEY_up_ref

for OpenSSL < 1.1.

* modules/ssl/ssl_engine_kernel.c (modssl_set_cert_info):
* modules/ssl/ssl_util_stapling.c (stapling_get_issuer): 
  Use the above macros for all OpenSSL versions.

Github: closes #104


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1875702 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Joe Orton
2020-03-26 11:03:54 +00:00
parent 697443a4f3
commit 11d565c3ce
3 changed files with 2 additions and 12 deletions

View File

@@ -1950,19 +1950,11 @@ static void modssl_proxy_info_log(conn_rec *c,
* so we need to increment here to prevent them from
* being freed.
*/
#if MODSSL_USE_OPENSSL_PRE_1_1_API
#define modssl_set_cert_info(info, cert, pkey) \
*cert = info->x509; \
CRYPTO_add(&(*cert)->references, +1, CRYPTO_LOCK_X509); \
*pkey = info->x_pkey->dec_pkey; \
CRYPTO_add(&(*pkey)->references, +1, CRYPTO_LOCK_X509_PKEY)
#else
#define modssl_set_cert_info(info, cert, pkey) \
*cert = info->x509; \
X509_up_ref(*cert); \
*pkey = info->x_pkey->dec_pkey; \
EVP_PKEY_up_ref(*pkey);
#endif
int ssl_callback_proxy_cert(SSL *ssl, X509 **x509, EVP_PKEY **pkey)
{