]> git.sur5r.net Git - openldap/commitdiff
ITS#8353 partial fix
authorHoward Chu <hyc@openldap.org>
Tue, 26 Jan 2016 18:06:46 +0000 (18:06 +0000)
committerHoward Chu <hyc@openldap.org>
Tue, 26 Jan 2016 18:06:46 +0000 (18:06 +0000)
Use newly added SSL_CTX_up_ref()
Still waiting for X509_NAME accessor

libraries/libldap/tls_o.c

index e3379efd4ca49884b2a6a6b6aed153e4b78418e1..37d583a26ae381a2d7bc1f66c09dcc5c3a00bc95 100644 (file)
@@ -187,7 +187,10 @@ static void
 tlso_ctx_ref( tls_ctx *ctx )
 {
        tlso_ctx *c = (tlso_ctx *)ctx;
-       CRYPTO_add( &c->references, 1, CRYPTO_LOCK_SSL_CTX );
+#if OPENSSL_VERSION_NUMBER < 0x10100000
+#define        SSL_CTX_up_ref(ctx)     CRYPTO_add( &(ctx->references), 1, CRYPTO_LOCK_SSL_CTX )
+#endif
+       SSL_CTX_up_ref( c );
 }
 
 static void