]> git.sur5r.net Git - openldap/commitdiff
expose ldap_tls_inplace()
authorPierangelo Masarati <ando@openldap.org>
Thu, 11 Aug 2005 12:14:24 +0000 (12:14 +0000)
committerPierangelo Masarati <ando@openldap.org>
Thu, 11 Aug 2005 12:14:24 +0000 (12:14 +0000)
include/ldap.h
libraries/libldap/tls.c

index e5efc52c2063f001edb2155141fd01de9e341eea..4678bf57c7f7769a4aa8532c5c65691580ebfc27 100644 (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,
index 6775238aa90c62ec53711383ba8f4d4397d71fdc..4f7a08b9e6b580464314138595b14fa2c3acf778 100644 (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 )
 {