mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-06 10:46:21 +08:00
Bump SSL_CTX refcount whenever it gets retrieved
This commit is contained in:
parent
d18277eac9
commit
7709d4d89e
@ -1245,6 +1245,10 @@ ldap_pvt_tls_get_option( LDAP *ld, int option, void *arg )
|
|||||||
break;
|
break;
|
||||||
case LDAP_OPT_X_TLS_CTX:
|
case LDAP_OPT_X_TLS_CTX:
|
||||||
*(void **)arg = lo->ldo_tls_ctx;
|
*(void **)arg = lo->ldo_tls_ctx;
|
||||||
|
if ( lo->ldo_tls_ctx ) {
|
||||||
|
SSL_CTX *ctx = lo->ldo_tls_ctx;
|
||||||
|
CRYPTO_add( &ctx->references, 1, CRYPTO_LOCK_SSL_CTX );
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case LDAP_OPT_X_TLS_CACERTFILE:
|
case LDAP_OPT_X_TLS_CACERTFILE:
|
||||||
*(char **)arg = lo->ldo_tls_cacertfile ?
|
*(char **)arg = lo->ldo_tls_cacertfile ?
|
||||||
|
Loading…
Reference in New Issue
Block a user