diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2014-07-04 10:15:08 -0400 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2014-07-04 10:15:08 -0400 |
commit | f2c89a10de4fd123a3d15223d26994f2fe1b95d8 (patch) | |
tree | 4d0152863efebece8da6ffa9796173fcb67e7702 /crypto/Kconfig | |
parent | 8c98716601bc05091ff49aa8ebf5299a0c6604a0 (diff) |
crypto: drbg - Use Kconfig to ensure at least one RNG option is set
This patch removes the build-time test that ensures at least one RNG
is set. Instead we will simply not build drbg if no options are set
through Kconfig.
This also fixes a typo in the name of the Kconfig option CRYTPO_DRBG
(should be CRYPTO_DRBG).
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/Kconfig')
-rw-r--r-- | crypto/Kconfig | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/crypto/Kconfig b/crypto/Kconfig index 1dca374bbd82..6345c470650d 100644 --- a/crypto/Kconfig +++ b/crypto/Kconfig | |||
@@ -23,7 +23,7 @@ comment "Crypto core or helper" | |||
23 | 23 | ||
24 | config CRYPTO_FIPS | 24 | config CRYPTO_FIPS |
25 | bool "FIPS 200 compliance" | 25 | bool "FIPS 200 compliance" |
26 | depends on (CRYPTO_ANSI_CPRNG || CRYTPO_DRBG) && !CRYPTO_MANAGER_DISABLE_TESTS | 26 | depends on (CRYPTO_ANSI_CPRNG || CRYPTO_DRBG) && !CRYPTO_MANAGER_DISABLE_TESTS |
27 | depends on MODULE_SIG | 27 | depends on MODULE_SIG |
28 | help | 28 | help |
29 | This options enables the fips boot option which is | 29 | This options enables the fips boot option which is |
@@ -1394,39 +1394,39 @@ config CRYPTO_ANSI_CPRNG | |||
1394 | ANSI X9.31 A.2.4. Note that this option must be enabled if | 1394 | ANSI X9.31 A.2.4. Note that this option must be enabled if |
1395 | CRYPTO_FIPS is selected | 1395 | CRYPTO_FIPS is selected |
1396 | 1396 | ||
1397 | menuconfig CRYTPO_DRBG | 1397 | menuconfig CRYPTO_DRBG_MENU |
1398 | tristate "NIST SP800-90A DRBG" | 1398 | tristate "NIST SP800-90A DRBG" |
1399 | depends on CRYPTO | ||
1400 | select CRYPTO_RNG | ||
1401 | help | 1399 | help |
1402 | NIST SP800-90A compliant DRBG. In the following submenu, one or | 1400 | NIST SP800-90A compliant DRBG. In the following submenu, one or |
1403 | more of the DRBG types must be selected. | 1401 | more of the DRBG types must be selected. |
1404 | 1402 | ||
1405 | if CRYTPO_DRBG | 1403 | if CRYPTO_DRBG_MENU |
1406 | 1404 | ||
1407 | config CRYPTO_DRBG_HMAC | 1405 | config CRYPTO_DRBG_HMAC |
1408 | bool "Enable HMAC DRBG" | 1406 | bool "Enable HMAC DRBG" |
1409 | default y | 1407 | default y |
1410 | depends on CRYTPO_DRBG | ||
1411 | select CRYPTO_HMAC | 1408 | select CRYPTO_HMAC |
1412 | help | 1409 | help |
1413 | Enable the HMAC DRBG variant as defined in NIST SP800-90A. | 1410 | Enable the HMAC DRBG variant as defined in NIST SP800-90A. |
1414 | 1411 | ||
1415 | config CRYPTO_DRBG_HASH | 1412 | config CRYPTO_DRBG_HASH |
1416 | bool "Enable Hash DRBG" | 1413 | bool "Enable Hash DRBG" |
1417 | depends on CRYTPO_DRBG | ||
1418 | select CRYPTO_HASH | 1414 | select CRYPTO_HASH |
1419 | help | 1415 | help |
1420 | Enable the Hash DRBG variant as defined in NIST SP800-90A. | 1416 | Enable the Hash DRBG variant as defined in NIST SP800-90A. |
1421 | 1417 | ||
1422 | config CRYPTO_DRBG_CTR | 1418 | config CRYPTO_DRBG_CTR |
1423 | bool "Enable CTR DRBG" | 1419 | bool "Enable CTR DRBG" |
1424 | depends on CRYTPO_DRBG | ||
1425 | select CRYPTO_AES | 1420 | select CRYPTO_AES |
1426 | help | 1421 | help |
1427 | Enable the CTR DRBG variant as defined in NIST SP800-90A. | 1422 | Enable the CTR DRBG variant as defined in NIST SP800-90A. |
1428 | 1423 | ||
1429 | endif #CRYTPO_DRBG | 1424 | config CRYPTO_DRBG |
1425 | tristate | ||
1426 | default CRYPTO_DRBG_MENU if (CRYPTO_DRBG_HMAC || CRYPTO_DRBG_HASH || CRYPTO_DRBG_CTR) | ||
1427 | select CRYPTO_RNG | ||
1428 | |||
1429 | endif # if CRYPTO_DRBG_MENU | ||
1430 | 1430 | ||
1431 | config CRYPTO_USER_API | 1431 | config CRYPTO_USER_API |
1432 | tristate | 1432 | tristate |