Add ldap_pvt_tls_destroy

This commit is contained in:
Kurt Zeilenga 2001-11-13 19:28:32 +00:00
parent 8e7214249d
commit 06567ee554
2 changed files with 12 additions and 0 deletions

View File

@ -169,6 +169,7 @@ ldap_pvt_str2lower LDAP_P(( char *str ));
/* tls.c */
LDAP_F (int) ldap_pvt_tls_init LDAP_P(( void ));
LDAP_F (void) ldap_pvt_tls_destroy LDAP_P(( void ));
LDAP_F (int) ldap_pvt_tls_connect LDAP_P(( struct ldap *ld,
Sockbuf *sb, void *ctx_arg ));
LDAP_F (int) ldap_pvt_tls_accept LDAP_P(( Sockbuf *sb, void *ctx_arg ));

View File

@ -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.
*/