Copyright 2001, Adrian Thurston, All rights reserved.

This software is not subject to any license of
Xandros Corporation.

This is free software; you can redistribute and use it under the same
terms as OpenLDAP itself.

 -------------------------------------------------------------------
This patch adds an option to ldap_get_option which can be called after
ldap_start_tls in order to obtain the pointer to the SSL object used
This commit is contained in:
Kurt Zeilenga 2002-03-11 03:39:08 +00:00
parent b56f7c7222
commit fcf9f451a5
2 changed files with 13 additions and 0 deletions

View file

@ -122,6 +122,7 @@ LDAP_BEGIN_DECL
/* #define LDAP_OPT_X_TLS_PROTOCOL 0x6007 */
#define LDAP_OPT_X_TLS_CIPHER_SUITE 0x6008
#define LDAP_OPT_X_TLS_RANDOM_FILE 0x6009
#define LDAP_OPT_X_TLS_SSL_CTX 0x600a
#define LDAP_OPT_X_TLS_NEVER 0
#define LDAP_OPT_X_TLS_HARD 1

View file

@ -1024,6 +1024,18 @@ ldap_pvt_tls_get_option( LDAP *ld, int option, void *arg )
*(char **)arg = tls_opt_randfile ?
LDAP_STRDUP( tls_opt_randfile ) : NULL;
break;
case LDAP_OPT_X_TLS_SSL_CTX: {
void *retval = 0;
if ( ld != NULL ) {
LDAPConn *conn = ld->ld_defconn;
if ( conn != NULL ) {
Sockbuf *sb = conn->lconn_sb;
retval = ldap_pvt_tls_sb_ctx( sb );
}
}
*(void **)arg = retval;
break;
}
default:
return -1;
}