summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2022-05-19 13:55:44 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2022-05-19 13:55:44 +0200
commitac082938497f82c4cf1aa015436a4b8261741348 (patch)
tree60339c61f3bbfbdb4cc038b8d2a559793754a605 /include
parentacef9438e94f5960064d650080270549eae27ab7 (diff)
parent66faea1edf07acd85dadbd67e208bef651ede2a0 (diff)
downloadbarebox-ac082938497f82c4cf1aa015436a4b8261741348.tar.gz
barebox-ac082938497f82c4cf1aa015436a4b8261741348.tar.xz
Merge branch 'for-next/rsa'
Diffstat (limited to 'include')
-rw-r--r--include/rsa.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/rsa.h b/include/rsa.h
index 803660d19a..650fb234f2 100644
--- a/include/rsa.h
+++ b/include/rsa.h
@@ -29,6 +29,7 @@ struct rsa_public_key {
uint32_t *rr; /* R^2 as little endian array */
uint64_t exponent; /* public exponent */
char *key_name_hint;
+ struct list_head list;
};
/**
@@ -52,6 +53,10 @@ int rsa_verify(const struct rsa_public_key *key, const uint8_t *sig,
struct rsa_public_key *rsa_of_read_key(struct device_node *node);
void rsa_key_free(struct rsa_public_key *key);
-struct rsa_public_key *rsa_get_key(const char *name);
+const struct rsa_public_key *rsa_get_key(const char *name);
+const struct rsa_public_key *rsa_key_next(const struct rsa_public_key *prev);
+
+#define for_each_rsa_key(key) \
+ for (key = rsa_key_next(NULL); key; key = rsa_key_next(key))
#endif