summaryrefslogtreecommitdiff
path: root/include/rsa.h
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2019-10-01 23:40:24 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2019-10-15 14:55:11 +0200
commitb39100bcea12b29d64c536ea5f4c57380dfcf056 (patch)
treea0a33c844c9552e4e46aba3f01109332b63af1a8 /include/rsa.h
parentd091a81f3ece732826dd4dec0b241624159ae1d6 (diff)
downloadbarebox-b39100bcea12b29d64c536ea5f4c57380dfcf056.tar.gz
rsa: Allow to directly compile in rsa public keys
So far we relied on the U-Boot mkimage tool to generate us device tree snippets containing rsa public keys which we then compiled into barebox. Make this easier and allow to directly specify a filename or PKCS#11 URI in Kconfig. With this we no longer need the U-Boot mkimage tool here and no more external steps to prepare device tree snippets. With this rsa public keys can be directly compiled as C structs into barebox which is much more direct than putting it into the device tree. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include/rsa.h')
-rw-r--r--include/rsa.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/rsa.h b/include/rsa.h
index cf2e6c7e08..803660d19a 100644
--- a/include/rsa.h
+++ b/include/rsa.h
@@ -28,6 +28,7 @@ struct rsa_public_key {
uint32_t *modulus; /* modulus as little endian array */
uint32_t *rr; /* R^2 as little endian array */
uint64_t exponent; /* public exponent */
+ char *key_name_hint;
};
/**
@@ -51,5 +52,6 @@ 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);
#endif