]> granicus.if.org Git - apache/commitdiff
add/use EVP_PKEY_reference_inc and X509_reference_inc compat macros
authorDoug MacEachern <dougm@apache.org>
Sat, 30 Mar 2002 08:11:44 +0000 (08:11 +0000)
committerDoug MacEachern <dougm@apache.org>
Sat, 30 Mar 2002 08:11:44 +0000 (08:11 +0000)
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
modules/ssl/ssl_toolkit_compat.h

index 1dbbf2631884e4840cadd53b234741d07d9a3432..d06f8ff4e8050e491095d219919b00c3f8d02db6 100644 (file)
@@ -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) 
 {
index 6ed01f8b12dc46df5be4c91b8d1e33e60cb142c5..7501402743b4b39608e9c8849ecdd00391d4163c 100644 (file)
 
 #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