From ba30a9ee62fb83dd90649e68d5768f39bf519e6d Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Mon, 7 Feb 2011 00:46:06 +0000 Subject: [PATCH] Export pw_string64 as lutil_passwd_string64 --- include/lutil.h | 7 +++++++ libraries/liblutil/passwd.c | 10 +++++----- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/include/lutil.h b/include/lutil.h index c7f33a06d1..d244e77a76 100644 --- a/include/lutil.h +++ b/include/lutil.h @@ -143,6 +143,13 @@ LDAP_LUTIL_F( int ) lutil_salt_format LDAP_P(( const char *format )); +LDAP_LUTIL_F( int ) +lutil_passwd_string64 LDAP_P(( + const struct berval *sc, + const struct berval *hash, + struct berval *b64, + const struct berval *salt )); + /* utils.c */ LDAP_LUTIL_F( char* ) lutil_progname LDAP_P(( diff --git a/libraries/liblutil/passwd.c b/libraries/liblutil/passwd.c index 2755cc492c..a4bc1830a8 100644 --- a/libraries/liblutil/passwd.c +++ b/libraries/liblutil/passwd.c @@ -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 ); ; } -- 2.39.5