[dovecot-cvs] dovecot/src/auth password-scheme.c,1.21,1.22
cras at dovecot.org
cras at dovecot.org
Fri Jun 16 13:28:57 EEST 2006
- Previous message: [dovecot-cvs] dovecot/src/auth password-scheme.c,1.21,1.21.2.1
- Next message: [dovecot-cvs] dovecot/src/auth mech-apop.c, 1.20,
1.20.2.1 mech-gssapi.c, 1.5, 1.5.2.1 mech-login.c, 1.15.2.1,
1.15.2.2 mech-ntlm.c, 1.24, 1.24.2.1 mech-rpa.c, 1.24, 1.24.2.1
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /var/lib/cvs/dovecot/src/auth
In directory talvi:/tmp/cvs-serv2216/auth
Modified Files:
password-scheme.c
Log Message:
Added PLAIN-MD4 password scheme. Patch by Andrey Panin.
Index: password-scheme.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/auth/password-scheme.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- password-scheme.c 26 Feb 2006 12:15:34 -0000 1.21
+++ password-scheme.c 16 Jun 2006 10:28:53 -0000 1.22
@@ -344,6 +344,26 @@
return binary_to_hex(digest, sizeof(digest));
}
+static bool plain_md4_verify(const char *plaintext, const char *password,
+ const char *user __attr_unused__)
+{
+ unsigned char digest[16];
+ const char *str;
+
+ md4_get_digest(plaintext, strlen(plaintext), digest);
+ str = binary_to_hex(digest, sizeof(digest));
+ return strcasecmp(str, password) == 0;
+}
+
+static const char *plain_md4_generate(const char *plaintext,
+ const char *user __attr_unused__)
+{
+ unsigned char digest[16];
+
+ md4_get_digest(plaintext, strlen(plaintext), digest);
+ return binary_to_hex(digest, sizeof(digest));
+}
+
static bool plain_md5_verify(const char *plaintext, const char *password,
const char *user __attr_unused__)
{
@@ -452,6 +472,7 @@
{ "CLEARTEXT", plain_verify, plain_generate },
{ "HMAC-MD5", hmac_md5_verify, hmac_md5_generate },
{ "DIGEST-MD5", digest_md5_verify, digest_md5_generate },
+ { "PLAIN-MD4", plain_md4_verify, plain_md4_generate },
{ "PLAIN-MD5", plain_md5_verify, plain_md5_generate },
{ "LDAP-MD5", ldap_md5_verify, ldap_md5_generate },
{ "LANMAN", lm_verify, lm_generate },
- Previous message: [dovecot-cvs] dovecot/src/auth password-scheme.c,1.21,1.21.2.1
- Next message: [dovecot-cvs] dovecot/src/auth mech-apop.c, 1.20,
1.20.2.1 mech-gssapi.c, 1.5, 1.5.2.1 mech-login.c, 1.15.2.1,
1.15.2.2 mech-ntlm.c, 1.24, 1.24.2.1 mech-rpa.c, 1.24, 1.24.2.1
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the dovecot-cvs
mailing list