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:
commit
03b10c268b
1 changed files with 3 additions and 5 deletions
|
@ -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…
Reference in a new issue