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

am: cd6d8e3fb6

* commit 'cd6d8e3fb68d09122acf4272ad0f93b0f253523f':
  system/vold: check return value of PKCS5_PBKDF2_HMAC_SHA1.
This commit is contained in:
Kenny Root 2015-11-06 17:24:55 +00:00 committed by android-build-merger
commit 03b10c268b

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,