From 9f7d119ce3785f2522c9c762dcf5375a787dfd6f Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Fri, 10 Jun 2011 02:11:26 -0700 Subject: [PATCH] Add LDAP_OPT_X_TLS_PACKAGE to return the name of the underlying TLS implementation --- include/ldap.h | 1 + libraries/libldap/tls2.c | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/include/ldap.h b/include/ldap.h index 9d7ae014ca..3f0c1c4ce8 100644 --- a/include/ldap.h +++ b/include/ldap.h @@ -157,6 +157,7 @@ LDAP_BEGIN_DECL #define LDAP_OPT_X_TLS_DHFILE 0x600e #define LDAP_OPT_X_TLS_NEWCTX 0x600f #define LDAP_OPT_X_TLS_CRLFILE 0x6010 /* GNUtls only */ +#define LDAP_OPT_X_TLS_PACKAGE 0x6011 #define LDAP_OPT_X_TLS_NEVER 0 #define LDAP_OPT_X_TLS_HARD 1 diff --git a/libraries/libldap/tls2.c b/libraries/libldap/tls2.c index af279db7f1..f38db2755d 100644 --- a/libraries/libldap/tls2.c +++ b/libraries/libldap/tls2.c @@ -578,6 +578,11 @@ ldap_pvt_tls_get_option( LDAP *ld, int option, void *arg ) { struct ldapoptions *lo; + if( option == LDAP_OPT_X_TLS_PACKAGE ) { + *(char **)arg = LDAP_STRDUP( tls_imp->ti_name ); + return 0; + } + if( ld != NULL ) { assert( LDAP_VALID( ld ) ); -- 2.39.5