Re: Using LDAP framework with SSL
Re: Using LDAP framework with SSL
- Subject: Re: Using LDAP framework with SSL
- From: Pascal Pochet <email@hidden>
- Date: Sat, 18 Mar 2006 12:55:41 +0100
Are you sure you try to connect to the right port ?
in general LDAP listens for SSL connection on port 636 and normal
connections on port 389…
(your [port intValue] should not be the same in both cases, log the
values to be sure !)
ldap 389/tcp Lightweight Directory Access Protocol
ldaps 636/tcp ldap protocol over TLS/SSL (was sldap)
but it may be changed by server admin…
Pascal Pochet
email@hidden
Le 18-mars-06 à 01:03, Alexander Hartner a écrit :
I am trying to connect to my LDAP directory using SSL. Without SSL
the following lines work, but with SSL they fail.
ldap = ldap_init([hostname cString], [port intValue]);
ldap_perror(ldap, "LDAP INITIALISED");
const int version = 3;
int e = ldap_set_option(ldap, LDAP_OPT_PROTOCOL_VERSION, &version);
ldap_perror(ldap, "LDAP VERSION 3 SET");
e = ldap_simple_bind_s(ldap, [username cString], [password cString]);
char * errorMessage = ldap_err2string(e);
ldap_perror(ldap, "LDAP BOUND");
The error reported is :
LDAP BOUND: Can't contact LDAP server (-1)
At first I thought it was because I didn't have the OpenSSL
libraries included. After some searching on the web I found out
that it is recommended to use the Securities framework, which i
already include.
Thanks
Alexander Hartner
email@hidden
Does a good farmer neglect a crop he has planted?
Does a good teacher overlook even the most humble student?
Does a good father allow a single child to starve?
Does a good programmer refuse to maintain his code?
- The Tao of Programming
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40mac.com
This email sent to email@hidden
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden