]> git.sur5r.net Git - openldap/commitdiff
Add LDAP_OPT_X_TLS_PACKAGE
authorHoward Chu <hyc@openldap.org>
Fri, 10 Jun 2011 09:11:26 +0000 (02:11 -0700)
committerHoward Chu <hyc@openldap.org>
Fri, 10 Jun 2011 09:11:26 +0000 (02:11 -0700)
to return the name of the underlying TLS implementation

include/ldap.h
libraries/libldap/tls2.c

index 9d7ae014ca8d1d97c5a58db774e7e2682a8d1666..3f0c1c4ce8cc3786748b40b3558f4209a69861b2 100644 (file)
@@ -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
index af279db7f1aea6919d4a6e3780e946521532ff1f..f38db2755d9c0320afc0533815d489ced806a469 100644 (file)
@@ -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 ) );