vboot: Allow for comparison of hash without zero-padding

Adjust asserts to allow to store and compare (at S3 resume) hashes
without padding to maximum hash length / slot size.

Signed-off-by: Jakub Czapiga <jacz@semihalf.com>
Change-Id: If6d46e0b58dbca86af56221b7ff2606ab2d1799a
Reviewed-on: https://review.coreboot.org/c/coreboot/+/69762
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
diff --git a/src/security/vboot/vboot_logic.c b/src/security/vboot/vboot_logic.c
index 98a044c..f7b4801 100644
--- a/src/security/vboot/vboot_logic.c
+++ b/src/security/vboot/vboot_logic.c
@@ -86,7 +86,7 @@
 		uint8_t saved_hash[VBOOT_MAX_HASH_SIZE];
 		const size_t saved_hash_sz = sizeof(saved_hash);
 
-		assert(slot_hash_sz == saved_hash_sz);
+		assert(slot_hash_sz <= saved_hash_sz);
 
 		printk(BIOS_DEBUG, "Platform is resuming.\n");