[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
ldap_sasl_bind_s() with DIGEST-MD5
- To: openldap-technical@openldap.org
- Subject: ldap_sasl_bind_s() with DIGEST-MD5
- From: Shankar Anand R <shankaranand@gmail.com>
- Date: Thu, 22 Jul 2010 18:10:08 +0530
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:content-type; bh=GO4FiDgwNMhTfHtvIqEFH8aaMLZ8IYuN6tx6zDULYOs=; b=TmXv9CeyigL/LY5XSLjdxRmzr9mtWkrsvMo8hV9f08JdtlrqLSiuKDIaZxrFt64rF0 0RHh3eEkrO8Jtw+EUPCokihEaC+zYKkfYiMy2bljtBjehrAgYNywb1aAJNOXZig+uC2c rn1To/zrQQzgN7G4z2olQ7Ogj19L7MPFzZ5II=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=RSIRY0r4IyTTD2vosHlAd0I7Oe3uTZZMyUzif48A9G4OZqb1GlSDcPARX+v3x4qe7B b/5yGtJ4GHmUzszUkfBBTMdeVc5jy7BorlcCKT0dsTg6X6al9QreiqxYjvsvGxt92InD J//MOcMOH/VoZW4kB8zqzC84SX72QUtMl1rbw=
Hi,
The problem explained below must be fairly straightforward or even look silly for folks on this mailing list. Sorry for the trouble but I hope one of you might be willing to help a newbie.
I am implementing an simple application that finds out a user's attributes using OpenLDAP.
This a snippet of my code.
...
BerValue cred;
cred.bv_len = 10;
cred.bv_val = strdup("mypassword");
ldap_sasl_bind_s(ld, "myuser", LDAP_SASL_SIMPLE /*NULL*/, &cred, NULL, NULL, NULL);
This succeeds and I am able to proceed with my ldap_search_st() call.
But since I don't want to send "mypassword" as plain text over the wire I opted for "DIGEST-MD5"
...
BerValue cred;
cred.bv_len = 10;
cred.bv_val = strdup("mypassword");
ldap_sasl_bind_s(ld, "myuser", "DIGEST-MD5", &cred, NULL, NULL, NULL);
This fails with the error 49
ldap_sasl_bind_s: Invalid credentials (49)
additional info: 80090326: LdapErr: DSID-0C0904D1, comment: AcceptSecurityContext error, data 57, v1772
Note: I am using Active Directory. And I believe that my cyrus-sasl installation is good.
I searched a lot but couldn't find the proper documentation for this. Do I have to fill up cred.bv_val differently while using DIGEST-MD5? Is there an OpenLDAP API to do that?
Can someone explain or point me to the right documentation?
Thanks and Regards,
Shankar