Fix password hash calculation

This was hardcoded, rather than being based on the actual password length,
resulting in incorrect hashes being generated.
This commit is contained in:
Matthew Garrett 2012-10-23 15:42:31 -04:00
parent eb4c59b0c8
commit 631773c28f

View File

@ -803,8 +803,7 @@ static INTN mok_pw_prompt (void *MokPW, void *data2, void *data3) {
continue;
}
efi_status = compute_pw_hash(NULL, 0, password,
SB_PASSWORD_LEN, hash);
efi_status = compute_pw_hash(NULL, 0, password, length, hash);
if (efi_status != EFI_SUCCESS) {
Print(L"Unable to generate password hash\n");