]> 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)
committerQuanah Gibson-Mount <quanah@openldap.org>
Mon, 13 Jun 2011 19:53:18 +0000 (12:53 -0700)
to return the name of the underlying TLS implementation

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

index 143ee0a5ce8bce1886059b42dbc5c450285173dc..a2f8ea812732c75385f233c881d512efc84007d1 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 58ccf970ceb866d161e4927eae68aa3d357435f4..170649bd2f25cf811fc0a8da816043ce9e1fc70c 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 ) );