Blame SOURCES/0238-grub-core-commands-verify.c-Fix-hash-algorithms-valu.patch

f96e0b
From 11df2f23b04ed345abae66b4d428c401eac7acd3 Mon Sep 17 00:00:00 2001
f96e0b
From: Andrey Borzenkov <arvidjaar@gmail.com>
f96e0b
Date: Mon, 1 Apr 2013 01:43:04 +0200
f96e0b
Subject: [PATCH 238/482] 	* grub-core/commands/verify.c: Fix hash
f96e0b
 algorithms values for 	the first three hashes - they start with 1, not with
f96e0b
 0.
f96e0b
f96e0b
---
f96e0b
 ChangeLog                   | 5 +++++
f96e0b
 grub-core/commands/verify.c | 4 +++-
f96e0b
 2 files changed, 8 insertions(+), 1 deletion(-)
f96e0b
f96e0b
diff --git a/ChangeLog b/ChangeLog
f96e0b
index 58c2242..672aa74 100644
f96e0b
--- a/ChangeLog
f96e0b
+++ b/ChangeLog
f96e0b
@@ -1,3 +1,8 @@
f96e0b
+2013-03-31  Andrey Borzenkov <arvidjaar@gmail.com>
f96e0b
+
f96e0b
+	* grub-core/commands/verify.c: Fix hash algorithms values for
f96e0b
+	the first three hashes - they start with 1, not with 0.
f96e0b
+
f96e0b
 2013-03-26  Vladimir Serbinenko  <phcoder@gmail.com>
f96e0b
 
f96e0b
 	* grub-core/kern/efi/mm.c (grub_efi_finish_boot_services):
f96e0b
diff --git a/grub-core/commands/verify.c b/grub-core/commands/verify.c
f96e0b
index 6c0b580..b4d5e7b 100644
f96e0b
--- a/grub-core/commands/verify.c
f96e0b
+++ b/grub-core/commands/verify.c
f96e0b
@@ -123,7 +123,9 @@ struct signature_v4_header
f96e0b
 } __attribute__ ((packed));
f96e0b
 
f96e0b
 const char *hashes[] = {
f96e0b
-  "md5", "sha1", "ripemd160",
f96e0b
+  [0x01] = "md5",
f96e0b
+  [0x02] = "sha1",
f96e0b
+  [0x03] = "ripemd160",
f96e0b
   [0x08] = "sha256",
f96e0b
   [0x09] = "sha384",
f96e0b
   [0x0a] = "sha512",
f96e0b
-- 
f96e0b
1.8.2.1
f96e0b