From c755aa8a1dc2f2b819ce36148248ebe93bbc7f86 Mon Sep 17 00:00:00 2001 From: SESA644425 Date: Wed, 9 Mar 2022 01:27:15 -0800 Subject: lib: rsa: Fix const-correctness of rsassa_pss functions Prior to introduction of modifications in rsassa_pss functions related to padding verification, doing a pass to update const-correctness in targeted functions to comply with coding-rules and avoid const-cast Signed-off-by: SESA644425 Reviewed-by: Simon Glass --- include/image.h | 2 +- include/u-boot/rsa.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/image.h b/include/image.h index 673b5f55eca..e4c6a50b885 100644 --- a/include/image.h +++ b/include/image.h @@ -1309,7 +1309,7 @@ ll_entry_declare(struct crypto_algo, __name, cryptos) struct padding_algo { const char *name; int (*verify)(struct image_sign_info *info, - uint8_t *pad, int pad_len, + const uint8_t *pad, int pad_len, const uint8_t *hash, int hash_len); }; diff --git a/include/u-boot/rsa.h b/include/u-boot/rsa.h index b9634e38d9a..085363eb1e5 100644 --- a/include/u-boot/rsa.h +++ b/include/u-boot/rsa.h @@ -101,11 +101,11 @@ int rsa_verify_with_pkey(struct image_sign_info *info, const void *hash, uint8_t *sig, uint sig_len); int padding_pkcs_15_verify(struct image_sign_info *info, - uint8_t *msg, int msg_len, + const uint8_t *msg, int msg_len, const uint8_t *hash, int hash_len); int padding_pss_verify(struct image_sign_info *info, - uint8_t *msg, int msg_len, + const uint8_t *msg, int msg_len, const uint8_t *hash, int hash_len); #define RSA_DEFAULT_PADDING_NAME "pkcs-1.5" -- cgit v1.2.3