summaryrefslogtreecommitdiff
path: root/crypto
diff options
context:
space:
mode:
Diffstat (limited to 'crypto')
-rw-r--r--crypto/rsa.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/crypto/rsa.c b/crypto/rsa.c
index 4e2d463b54..2eeb9984b1 100644
--- a/crypto/rsa.c
+++ b/crypto/rsa.c
@@ -446,6 +446,15 @@ void rsa_key_free(struct rsa_public_key *key)
static LIST_HEAD(rsa_keys);
+const struct rsa_public_key *rsa_key_next(const struct rsa_public_key *prev)
+{
+ prev = list_prepare_entry(prev, &rsa_keys, list);
+ list_for_each_entry_continue(prev, &rsa_keys, list)
+ return prev;
+
+ return NULL;
+}
+
const struct rsa_public_key *rsa_get_key(const char *name)
{
const struct rsa_public_key *key;