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 <gioja.hermann@non.se.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
SESA644425
2022-03-09 01:27:15 -08:00
committed by Tom Rini
parent 7262ff7e56
commit c755aa8a1d
3 changed files with 10 additions and 10 deletions

View File

@@ -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);
};

View File

@@ -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"