mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-01-02 13:09:42 -05:00
Added ldap_pvt_tls_destroy() to cleanup TLS library on shutdown
This commit is contained in:
parent
67886fc4a1
commit
33ace5610c
3 changed files with 16 additions and 0 deletions
|
|
@ -173,6 +173,7 @@ LDAP_F (int) ldap_pvt_tls_get_option LDAP_P(( struct ldap *ld,
|
|||
LDAP_F (int) ldap_pvt_tls_set_option LDAP_P(( struct ldap *ld,
|
||||
int option, void *arg ));
|
||||
|
||||
LDAP_F (void) ldap_pvt_tls_destroy LDAP_P(( void ));
|
||||
LDAP_F (int) ldap_pvt_tls_init LDAP_P(( void ));
|
||||
LDAP_F (int) ldap_pvt_tls_accept LDAP_P(( Sockbuf *sb, void *ctx_arg ));
|
||||
LDAP_F (int) ldap_pvt_tls_inplace LDAP_P(( Sockbuf *sb ));
|
||||
|
|
|
|||
|
|
@ -97,6 +97,17 @@ static void tls_init_threads( void )
|
|||
}
|
||||
#endif /* LDAP_R_COMPILE */
|
||||
|
||||
/*
|
||||
* Tear down the TLS subsystem. Should only be called once.
|
||||
*/
|
||||
void
|
||||
ldap_pvt_tls_destroy( void )
|
||||
{
|
||||
SSL_CTX_free(tls_def_ctx);
|
||||
EVP_cleanup();
|
||||
ERR_free_strings();
|
||||
}
|
||||
|
||||
/*
|
||||
* Initialize TLS subsystem. Should be called only once.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -542,6 +542,10 @@ stop:
|
|||
#endif
|
||||
slapd_daemon_destroy();
|
||||
|
||||
#ifdef HAVE_TLS
|
||||
ldap_pvt_tls_destroy();
|
||||
#endif
|
||||
|
||||
#ifdef CSRIMALLOC
|
||||
mal_dumpleaktrace( leakfile );
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in a new issue