Fix hmac ready test check.
authorMilan Broz <gmazyland@gmail.com>
Sat, 5 Mar 2011 20:33:19 +0000 (20:33 +0000)
committerMilan Broz <gmazyland@gmail.com>
Sat, 5 Mar 2011 20:33:19 +0000 (20:33 +0000)
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@432 36d66b0a-2a48-0410-832c-cd162a569da5

lib/luks1/pbkdf.c

index c0deae5..5377dbd 100644 (file)
@@ -234,7 +234,7 @@ int PBKDF2_performance_check(const char *hash, uint64_t *iter)
        if (__PBKDF2_global_j)
                return -EBUSY;
 
-       if (!PBKDF2_HMAC_ready(hash))
+       if (PBKDF2_HMAC_ready(hash) < 0)
                return -EINVAL;
 
        /* If crypto backend is not implemented in userspace,