summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Garrett <mjg@redhat.com>2012-10-23 15:43:29 -0400
committerMatthew Garrett <mjg@redhat.com>2012-10-23 15:43:29 -0400
commit254c04bcddd722fd839962b46e6207b743aa432b (patch)
treea0fd1498e20995864e350f14bb372e250ffcb092
parent79a5aa039dc185870b2159418b0eda30731c141d (diff)
downloadefi-boot-shim-254c04bcddd722fd839962b46e6207b743aa432b.tar.gz
efi-boot-shim-254c04bcddd722fd839962b46e6207b743aa432b.zip
Fix password hash calculation
This was hardcoded, rather than being based on the actual password length, resulting in incorrect hashes being generated.
-rw-r--r--MokManager.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/MokManager.c b/MokManager.c
index d764bf6e..f7504d0d 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");