Merge "system/vold: check return value of PKCS5_PBKDF2_HMAC_SHA1."

This commit is contained in:
Kenny Root 2015-11-06 17:20:30 +00:00 committed by Gerrit Code Review
commit 0a7e668ebf

View file

@ -1253,11 +1253,9 @@ static int pbkdf2(const char *passwd, const unsigned char *salt,
SLOGI("Using pbkdf2 for cryptfs KDF");
/* Turn the password into a key and IV that can decrypt the master key */
PKCS5_PBKDF2_HMAC_SHA1(passwd, strlen(passwd),
salt, SALT_LEN,
HASH_COUNT, KEY_LEN_BYTES+IV_LEN_BYTES, ikey);
return 0;
return PKCS5_PBKDF2_HMAC_SHA1(passwd, strlen(passwd), salt, SALT_LEN,
HASH_COUNT, KEY_LEN_BYTES + IV_LEN_BYTES,
ikey) != 1;
}
static int scrypt(const char *passwd, const unsigned char *salt,