[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
ldap_start_tls_s() error NOT SUPPORTTED
- To: <openldap-software@OpenLDAP.org>
- Subject: ldap_start_tls_s() error NOT SUPPORTTED
- From: "Reguera Gilarranz, Teresa" <teresa.regueragilarranz@es.unisys.com>
- Date: Wed, 23 Mar 2005 18:44:20 +0100
- Content-class: urn:content-classes:message
- Thread-index: AcUvz+/J2egxB1CQSsO7E2RpJkzQgQ==
- Thread-topic: ldap_start_tls_s() error NOT SUPPORTTED
Hello,
I'm trying to modify a C++ program that currently does an ldap_search() to do this search using a secure connection. Looking at some examples I saw I had to add the ldap_start_tls_s() function after the ldap_init(). I also noticed I had to set protocol version what I did...so I don't know why I'm getting the NOT SUPPORTED error...
If I tried with the ldapsearch from command line with -ZZ options, it works fine. Can anyone please give me any suggestion???
This is the code:
pLDAP = ldap_init( hostname, 389 );
if ( pLDAP == NULL ) {
return (Error)LDAPSSL_INIT_FAILED;
}
static Uint32 version = LDAP_VERSION3;
rc = ldap_set_option (pLDAP, LDAP_OPT_PROTOCOL_VERSION, (void*)&version);
//that worked fine
rc = ldap_start_tls_s(pLDAP, NULL, NULL);
//that failed with NOT_SUPPORTED error
if (rc!= LDAP_SUCCESS) {
return LDAP_START_TLS_FAILED;
}
I have installed OpenLDAP 2.2.23 and OpenSSL 0.9.7e
Thanks a lot!!
Mayte