diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2019-10-01 23:40:24 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2019-10-15 14:55:11 +0200 |
commit | b39100bcea12b29d64c536ea5f4c57380dfcf056 (patch) | |
tree | a0a33c844c9552e4e46aba3f01109332b63af1a8 /crypto/Makefile | |
parent | d091a81f3ece732826dd4dec0b241624159ae1d6 (diff) | |
download | barebox-b39100bcea12b29d64c536ea5f4c57380dfcf056.tar.gz barebox-b39100bcea12b29d64c536ea5f4c57380dfcf056.tar.xz |
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 'crypto/Makefile')
-rw-r--r-- | crypto/Makefile | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/crypto/Makefile b/crypto/Makefile index d6fb74aad9..3f59de08f0 100644 --- a/crypto/Makefile +++ b/crypto/Makefile @@ -16,3 +16,13 @@ obj-$(CONFIG_DIGEST_SHA512_GENERIC) += sha4.o obj-$(CONFIG_CRYPTO_PBKDF2) += pbkdf2.o obj-$(CONFIG_CRYPTO_RSA) += rsa.o obj-$(CONFIG_CRYPTO_KEYSTORE) += keystore.o + +extra-$(CONFIG_CRYPTO_RSA_BUILTIN_KEYS) += rsa-keys.h + +ifdef CONFIG_CRYPTO_RSA_BUILTIN_KEYS + +$(obj)/rsa.o: $(obj)/rsa-keys.h +$(eval $(call config_filename,CRYPTO_RSA_KEY)) +$(obj)/rsa-keys.h: FORCE + $(call cmd,rsa_keys,$(CONFIG_CRYPTO_RSA_KEY_NAME_HINT):$(CRYPTO_RSA_KEY_SRCPREFIX)$(CRYPTO_RSA_KEY_FILENAME)) +endif |