提交 24cee49f 编写于 作者: A Alexandru Gagniuc 提交者: Tom Rini

image: image-sig.c: Remove crypto_algos array

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: NAlexandru Gagniuc <mr.nuke.me@gmail.com>
Reviewed-by: NSimon Glass <sjg@chromium.org>
上级 6909edb4
......@@ -51,9 +51,6 @@ struct checksum_algo checksum_algos[] = {
};
struct crypto_algo crypto_algos[] = {
};
struct padding_algo padding_algos[] = {
{
.name = "pkcs-1.5",
......@@ -98,32 +95,14 @@ struct checksum_algo *image_get_checksum_algo(const char *full_name)
struct crypto_algo *image_get_crypto_algo(const char *full_name)
{
struct crypto_algo *crypto, *end;
int i;
const char *name;
#if defined(CONFIG_NEEDS_MANUAL_RELOC)
static bool done;
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;
}
}
#endif
/* Move name to after the comma */
name = strchr(full_name, ',');
if (!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++) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册