• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Using LDAP framework with SSL
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Using LDAP framework with SSL


  • Subject: Using LDAP framework with SSL
  • From: Alexander Hartner <email@hidden>
  • Date: Sat, 18 Mar 2006 00:03:53 +0000

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: This email sent to email@hidden
  • Follow-Ups:
    • Re: Using LDAP framework with SSL
      • From: Pascal Pochet <email@hidden>
  • Prev by Date: One NSOutlineView, more than one identical items
  • Next by Date: Re: NSTextView - firstResponder notification?
  • Previous by thread: [SOLVED] Re: One NSOutlineView, more than one identical items
  • Next by thread: Re: Using LDAP framework with SSL
  • Index(es):
    • Date
    • Thread