diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2015-08-27 16:17:11 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2015-08-28 08:00:30 +0200 |
commit | 2b5bdb47cf700a46abdf093c3a6df40f84b0d34a (patch) | |
tree | 222bbce8fd2c95c3b6ce0c9d14c98592b2df44fd /common/Kconfig | |
parent | 3e361f37643bfaea1b1bc06ab9767b2755deec21 (diff) | |
download | barebox-2b5bdb47cf700a46abdf093c3a6df40f84b0d34a.tar.gz barebox-2b5bdb47cf700a46abdf093c3a6df40f84b0d34a.tar.xz |
crypto: fix selecting of digests
SHA1 is meant as a boolean option which is true when sha1 support is available.
This works because the providers (DIGEST_SHA1_GENERIC and DIGEST_SHA1_ARM) have
a 'select SHA1'. However, consumers like the sha1sum command do a 'select SHA1'
to enable SHA1 support. This of course does not work; selecting SHA1 will not
select any of the SHA1 providers.
This is broken for all digest consumers. We have to explicitly select a digest
provider, that is DIGEST_*_GENERIC to enable the corresponding digest.
This means now we will always have the generic digest in the binary, even
when an optimized one is enabled. There is no sane way in Kconfig to
"select provider for feature xy", so let's live with the overhead in the binary.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'common/Kconfig')
-rw-r--r-- | common/Kconfig | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/common/Kconfig b/common/Kconfig index 8c6ba7fd42..03a0dc9f2c 100644 --- a/common/Kconfig +++ b/common/Kconfig @@ -460,19 +460,19 @@ choice config PASSWD_SUM_MD5 bool "MD5" - select MD5 + select DIGEST_MD5_GENERIC config PASSWD_SUM_SHA1 bool "SHA1" - select SHA1 + select DIGEST_SHA1_GENERIC config PASSWD_SUM_SHA256 bool "SHA256" - select SHA256 + select DIGEST_SHA256_GENERIC config PASSWD_SUM_SHA512 bool "SHA512" - select SHA512 + select DIGEST_SHA512_GENERIC config PASSWD_CRYPTO_PBKDF2 bool "PBKDF2" |