From 10a6ffa3e9c2e9418ab70d68bf6aa00871d41b8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Kuzn=C3=ADk?= Date: Fri, 22 Sep 2017 09:22:56 +0100 Subject: [PATCH] Expose ldap_int_tls_connect as ldap_pvt_tls_connect --- include/ldap_pvt.h | 1 + libraries/libldap/tls2.c | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/include/ldap_pvt.h b/include/ldap_pvt.h index e86b032cb4..00a01ba093 100644 --- a/include/ldap_pvt.h +++ b/include/ldap_pvt.h @@ -428,6 +428,7 @@ 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_init_def_ctx LDAP_P(( int is_server )); LDAP_F (int) ldap_pvt_tls_accept LDAP_P(( Sockbuf *sb, void *ctx_arg )); +LDAP_F (int) ldap_pvt_tls_connect LDAP_P(( struct ldap *ld, Sockbuf *sb, const char *host )); LDAP_F (int) ldap_pvt_tls_inplace LDAP_P(( Sockbuf *sb )); LDAP_F (void *) ldap_pvt_tls_sb_ctx LDAP_P(( Sockbuf *sb )); LDAP_F (void) ldap_pvt_tls_ctx_free LDAP_P(( void * )); diff --git a/libraries/libldap/tls2.c b/libraries/libldap/tls2.c index 4932b31d86..25582099d8 100644 --- a/libraries/libldap/tls2.c +++ b/libraries/libldap/tls2.c @@ -421,6 +421,13 @@ ldap_int_tls_connect( LDAP *ld, LDAPConn *conn, const char *host ) return 0; } +int +ldap_pvt_tls_connect( LDAP *ld, Sockbuf *sb, const char *host ) +{ + LDAPConn conn = { .lconn_sb = sb }; + return ldap_int_tls_connect( ld, &conn, host ); +} + /* * Call this to do a TLS accept on a sockbuf. * Everything else is the same as with tls_connect.