[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Patch to allow build in MD5 support
When compiling slapd with MD5 support, I could not finish the link
since some MD5 function symbols were undefined. I tracked it down to
bind.c in slapd/back-ldbm using the function calls MD5Init, MD5Update,
and MD5Final, rather than the ldap_MD5Init, ldap_MD5Update, and
ldap_MD5Final defined in md5.c in libraries/liblutil.
Here is the patch:
Index: bind.c
===================================================================
RCS file: /repo/OpenLDAP/pkg/ldap/servers/slapd/back-ldbm/bind.c,v
retrieving revision 1.5
diff -u -4 -r1.5 bind.c
--- bind.c 1998/09/08 00:26:56 1.5
+++ bind.c 1998/09/16 12:30:03
@@ -71,11 +71,11 @@
char base64digest[29]; /* ceiling(sizeof(input)/3) * 4 + 1 */
char *userpassword = vals[i]->bv_val + sizeof("{MD5}") - 1;
- MD5Init(&MD5context);
- MD5Update(&MD5context, cred->bv_val, strlen(cred->bv_val));
- MD5Final(MD5digest, &MD5context);
+ ldap_MD5Init(&MD5context);
+ ldap_MD5Update(&MD5context, cred->bv_val, strlen(cred->bv_val));
+ ldap_MD5Final(MD5digest, &MD5context);
if (b64_ntop(MD5digest, sizeof(MD5digest),
base64digest, sizeof(base64digest)) < 0)
{