]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
image-fit-sig: Remove padding check
authorChia-Wei Wang <chiawei_wang@aspeedtech.com>
Mon, 14 Oct 2024 09:56:19 +0000 (17:56 +0800)
committerTom Rini <trini@konsulko.com>
Mon, 21 Oct 2024 23:52:52 +0000 (17:52 -0600)
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@aspeedtech.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
boot/image-fit-sig.c

index 35873b1fb0e8599f286279b7e4b61d17667b2772..a121de60ae28543d4341b694d64f388635b6a1c8 100644 (file)
@@ -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;
        }