From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alexandru Gagniuc Date: Fri, 14 May 2021 14:45:58 -0500 Subject: [PATCH RFC 06/10] image: image-sig.c: Remove crypto_algos array In-Reply-To: <20210514194602.598322-1-mr.nuke.me@gmail.com> References: <20210514194602.598322-1-mr.nuke.me@gmail.com> Message-ID: <20210514194602.598322-7-mr.nuke.me@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Crytographic algorithms (currently RSA), are stored in linker lists. The crypto_algos array is unused, so remove it, and any logic associated with it. Signed-off-by: Alexandru Gagniuc --- common/image-sig.c | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/common/image-sig.c b/common/image-sig.c index d3be30289c..6923f0a9e9 100644 --- a/common/image-sig.c +++ b/common/image-sig.c @@ -51,10 +51,6 @@ struct checksum_algo checksum_algos[] = { }; -struct crypto_algo crypto_algos[] = { - { -}; - struct padding_algo padding_algos[] = { { .name = "pkcs-1.5", @@ -107,10 +103,6 @@ struct crypto_algo *image_get_crypto_algo(const char *full_name) if (!done) { done = true; - for (i = 0; i < ARRAY_SIZE(crypto_algos); i++) { - crypto_algos[i].name += gd->reloc_off; - crypto_algos[i].verify += gd->reloc_off; - } crypto = ll_entry_start(struct crypto_algo, cryptos); end = ll_entry_end(struct crypto_algo, cryptos); @@ -127,11 +119,6 @@ struct crypto_algo *image_get_crypto_algo(const char *full_name) return NULL; name += 1; - for (i = 0; i < ARRAY_SIZE(crypto_algos); i++) { - if (!strcmp(crypto_algos[i].name, name)) - return &crypto_algos[i]; - } - crypto = ll_entry_start(struct crypto_algo, cryptos); end = ll_entry_end(struct crypto_algo, cryptos); for (; crypto < end; crypto++) { -- 2.31.1