expose ldap_tls_inplace()

This commit is contained in:
Pierangelo Masarati 2005-08-11 12:14:24 +00:00
parent 228af40058
commit ad62d9da1b
2 changed files with 18 additions and 0 deletions

View File

@ -1337,6 +1337,10 @@ ldap_initialize LDAP_P((
* in tls.c
*/
LDAP_F( int )
ldap_tls_inplace LDAP_P((
LDAP *ld ));
LDAP_F( int )
ldap_start_tls LDAP_P((
LDAP *ld,

View File

@ -827,6 +827,20 @@ ldap_pvt_tls_inplace ( Sockbuf *sb )
return HAS_TLS( sb ) ? 1 : 0;
}
int
ldap_tls_inplace( LDAP *ld )
{
Sockbuf *sb = NULL;
int rc;
rc = ldap_get_option( ld, LDAP_OPT_SOCKBUF, (void *)&sb );
if ( rc != LDAP_SUCCESS || sb == NULL ) {
return 0;
}
return ldap_pvt_tls_inplace( sb );
}
static X509 *
tls_get_cert( SSL *s )
{