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

gugelfrei
Kenny Root 9 years ago committed by Gerrit Code Review
commit 0a7e668ebf

@ -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,

Loading…
Cancel
Save