Imported Upstream version 0.63.0
[hcoop/debian/courier-authlib.git] / checkpassword.c
index b2d8afa..f403188 100644 (file)
@@ -16,7 +16,7 @@
 #include       "auth.h"
 #include       "courierauthdebug.h"
 
-static const char rcsid[]="$Id: checkpassword.c,v 1.17 2008/07/10 02:43:55 mrsam Exp $";
+static const char rcsid[]="$Id: checkpassword.c,v 1.19 2008/12/18 12:08:25 mrsam Exp $";
 
 #if HAVE_CRYPT
 #if NEED_CRYPT_PROTOTYPE
@@ -36,10 +36,12 @@ static int do_authcheckpassword(const char *password, const char *encrypted_pass
                return (authcheckpasswordmd5(password, encrypted_password));
 
        if (strncasecmp(encrypted_password, "{SHA}", 5) == 0 ||
-           strncasecmp(encrypted_password, "{SHA256}", 8) == 0
-               )
+           strncasecmp(encrypted_password, "{SHA256}", 8) == 0 ||
+           strncasecmp(encrypted_password, "{SHA512}", 8) == 0 ||
+           strncasecmp(encrypted_password, "{SSHA}", 6) == 0)
                return (authcheckpasswordsha1(password, encrypted_password));
 
+
 #if    HAVE_CRYPT
        if (strncasecmp(encrypted_password, "{CRYPT}", 7) == 0)
                encrypted_password += 7;