X-Git-Url: http://git.hcoop.net/hcoop/debian/courier-authlib.git/blobdiff_plain/d9898ee81388d1eff40cf71e85d9ce9b5c1401fe..refs/tags/upstream/0.60.1:/cryptpassword.c diff --git a/cryptpassword.c b/cryptpassword.c index a7e88d2..1ad4a50 100644 --- a/cryptpassword.c +++ b/cryptpassword.c @@ -17,7 +17,7 @@ #include "auth.h" #include -static const char rcsid[]="$Id: cryptpassword.c,v 1.8 2005/07/13 00:34:59 mrsam Exp $"; +static const char rcsid[]="$Id: cryptpassword.c,v 1.9 2007/10/07 18:33:22 mrsam Exp $"; #if HAVE_CRYPT #if NEED_CRYPT_PROTOTYPE @@ -101,6 +101,13 @@ char *authcryptpasswd(const char *password, const char *encryption_hint) hash_func= &md5_hash_courier; pfix="{MD5}"; } + + if (!encryption_hint || strncasecmp(encryption_hint, "{MD5RAW}", 5) + == 0) + { + hash_func= &md5_hash_raw; + pfix="{MD5RAW}"; + } #endif #if HAVE_SHA1LIB