From: Howard Chu Date: Fri, 10 Jun 2011 09:11:26 +0000 (-0700) Subject: Add LDAP_OPT_X_TLS_PACKAGE X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=9f7d119ce3785f2522c9c762dcf5375a787dfd6f;p=openldap Add LDAP_OPT_X_TLS_PACKAGE to return the name of the underlying TLS implementation --- 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 ) );