From 631773c28f450df646d57a53026b1cb1485aa0d5 Mon Sep 17 00:00:00 2001 From: Matthew Garrett Date: Tue, 23 Oct 2012 15:42:31 -0400 Subject: [PATCH] Fix password hash calculation This was hardcoded, rather than being based on the actual password length, resulting in incorrect hashes being generated. --- MokManager.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/MokManager.c b/MokManager.c index d764bf6..f7504d0 100644 --- a/MokManager.c +++ b/MokManager.c @@ -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");