]> git.sur5r.net Git - openldap/blobdiff - libraries/liblutil/passwd.c
Merge branch 'mdb.master' of ssh://git-master.openldap.org/~git/git/openldap
[openldap] / libraries / liblutil / passwd.c
index 425f682779c15a2522c15cd4cb43d96f2c3c73d8..a4bc1830a8a391f3e07e47501c7173cde10932ea 100644 (file)
@@ -1,7 +1,7 @@
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 1998-2009 The OpenLDAP Foundation.
+ * Copyright 1998-2011 The OpenLDAP Foundation.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -52,7 +52,7 @@ typedef des_key_schedule des_context;
   one in lutil_sha1.h to blow up
 */
 #define PROTYPES_H 1
-#      include <pk11pub.h>
+#      include <nss/pk11pub.h>
 typedef PK11SymKey *des_key;
 typedef unsigned char des_data_block[8];
 typedef PK11Context *des_context[1];
@@ -424,7 +424,7 @@ static int pw_string(
 }
 #endif /* SLAPD_LMHASH || SLAPD_CRYPT */
 
-static int pw_string64(
+int lutil_passwd_string64(
        const struct berval *sc,
        const struct berval *hash,
        struct berval *b64,
@@ -1051,7 +1051,7 @@ static int hash_ssha1(
                (const unsigned char *)salt.bv_val, salt.bv_len );
        lutil_SHA1Final( SHA1digest, &SHA1context );
 
-       return pw_string64( scheme, &digest, hash, &salt);
+       return lutil_passwd_string64( scheme, &digest, hash, &salt);
 }
 
 static int hash_sha1(
@@ -1071,7 +1071,7 @@ static int hash_sha1(
                (const unsigned char *)passwd->bv_val, passwd->bv_len );
        lutil_SHA1Final( SHA1digest, &SHA1context );
             
-       return pw_string64( scheme, &digest, hash, NULL);
+       return lutil_passwd_string64( scheme, &digest, hash, NULL);
 }
 #endif
 
@@ -1103,7 +1103,7 @@ static int hash_smd5(
                (const unsigned char *) salt.bv_val, salt.bv_len );
        lutil_MD5Final( MD5digest, &MD5context );
 
-       return pw_string64( scheme, &digest, hash, &salt );
+       return lutil_passwd_string64( scheme, &digest, hash, &salt );
 }
 
 static int hash_md5(
@@ -1125,7 +1125,7 @@ static int hash_md5(
                (const unsigned char *) passwd->bv_val, passwd->bv_len );
        lutil_MD5Final( MD5digest, &MD5context );
 
-       return pw_string64( scheme, &digest, hash, NULL );
+       return lutil_passwd_string64( scheme, &digest, hash, NULL );
 ;
 }