]> git.sur5r.net Git - openldap/blobdiff - include/lutil.h
subtreeSpecification syntax change : -binary +validator
[openldap] / include / lutil.h
index ae629eb1a62b5d4987623ded6dbb09b384f09a3f..72a722509857544292e59b5cd906e1cb4c9917b9 100644 (file)
@@ -57,7 +57,7 @@ lutil_entropy LDAP_P((
        ber_len_t nbytes ));
 
 /* passfile.c */
-struct berval; /* avoid pulling in lber.h */
+struct berval; /* avoid pulling in lber.h */
 
 LDAP_LUTIL_F( int )
 lutil_get_filed_password LDAP_P((
@@ -65,6 +65,29 @@ lutil_get_filed_password LDAP_P((
        struct berval * ));
 
 /* passwd.c */
+struct lutil_pw_scheme;
+
+typedef int (LUTIL_PASSWD_CHK_FUNC)(
+       const struct berval *scheme,
+       const struct berval *passwd,
+       const struct berval *cred );
+
+typedef struct berval * (LUTIL_PASSWD_HASH_FUNC) (
+       const struct berval *scheme,
+       const struct berval *passwd );
+
+LDAP_LUTIL_F( int )
+lutil_passwd_add LDAP_P((
+       struct berval *scheme,
+       LUTIL_PASSWD_CHK_FUNC *chk_fn,
+       LUTIL_PASSWD_HASH_FUNC *hash_fn ));
+
+LDAP_LUTIL_F( void )
+lutil_passwd_init LDAP_P(( void ));
+
+LDAP_LUTIL_F( void )
+lutil_passwd_destroy LDAP_P(( void ));
+
 LDAP_LUTIL_F( int )
 lutil_authpasswd LDAP_P((
        const struct berval *passwd,    /* stored password */