LDAP Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsDatabasesLDAP Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old July 31st, 2012, 02:38 PM
Rijndael Rijndael is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2012
Posts: 1 Rijndael User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 18 m 45 sec
Reputation Power: 0
LDAP bind results in sock_errno 54 connection reset by peer

Hi,

i`m new in this forum, my name is Max. I'm a freelancer developer from germany. I try to learn something about iOS development using LDAP Connection.
My first Project is a simple one: the app starts, checks the internet access and display a button "ping". When I press this button the program try to connect to a LDAP server. For this part, I use the iOSPorts github.com/bindle/iOSPorts which contains some Linux libraries, also the openLDAP using ssl. Those are c libraries not iOS specific. This library is was tested with different ldap server and works stable.

But here is what the ping function actually do:
//initialize returns success
result = ldap_initialize( &ld, host);
result = ldap_set_option(ld, LDAP_OPT_X_TLS_REQUIRE_CERT, LDAP_OPT_X_TLS_NEVER);
result = ldap_set_option( ld, LDAP_OPT_PROTOCOL_VERSION, LDAP_VERSION3);
//the synchronous bind function returns -1 server down
result = ldap_sasl_bind_s(ld, root_dn, LDAP_SASL_SIMPLE, &credential, NULL,NULL, &serverReturnedCredentials);

When I use the asynchronous ldap_sals_bind() function is returns 0 ldap_success. (I`m also able to create a simple socket to this particular server and port). The error -1 comes from the following ldap_result() function. The problem here is that the socket throws a sock_errno 54 (connection reset by peer).

Someone an idea why the connection always will be disturbed?

Thanks for any help

best regards,

Max

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesLDAP Programming > LDAP bind results in sock_errno 54 connection reset by peer

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap