[PATCH v2 3/4] image-fit-sig: Remove padding check
Chia-Wei Wang
chiawei_wang at aspeedtech.com
Fri Sep 27 05:07:25 CEST 2024
The padding algorithm is not mandatory for all signing algorithm.
For example, ECDSA does not require a padding method.
For RSA requiring PKCS padding, the belonging info->crypto(), assigned
with rsa_verify_key(), also has the check on the validity of info->padding().
Thus, remove the info->padding check from the upper, general layer.
Signed-off-by: Chia-Wei Wang <chiawei_wang at aspeedtech.com>
Reviewed-by: Simon Glass <sjg at chromium.org>
---
boot/image-fit-sig.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/boot/image-fit-sig.c b/boot/image-fit-sig.c
index fe328df4a85..d06e6cc8ed6 100644
--- a/boot/image-fit-sig.c
+++ b/boot/image-fit-sig.c
@@ -95,7 +95,7 @@ static int fit_image_setup_verify(struct image_sign_info *info,
info->required_keynode = required_keynode;
printf("%s:%s", algo_name, info->keyname);
- if (!info->checksum || !info->crypto || !info->padding) {
+ if (!info->checksum || !info->crypto) {
*err_msgp = "Unknown signature algorithm";
return -1;
}
--
2.25.1
More information about the U-Boot
mailing list