Skip to content

Commit

Permalink
IMA: Correct Kconfig dependencies for hash selection
Browse files Browse the repository at this point in the history
IMA uses the hash algorithm too early to be able to use a module.
Require the selected hash algorithm to be built-in.

Signed-off-by: Ben Hutchings <[email protected]>
Signed-off-by: Mimi Zohar <[email protected]>
  • Loading branch information
bwhacks authored and Mimi Zohar committed Jun 21, 2017
1 parent 6f6723e commit 38d1926
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions security/integrity/ima/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -96,19 +96,19 @@ choice

config IMA_DEFAULT_HASH_SHA1
bool "SHA1 (default)"
depends on CRYPTO_SHA1
depends on CRYPTO_SHA1=y

config IMA_DEFAULT_HASH_SHA256
bool "SHA256"
depends on CRYPTO_SHA256 && !IMA_TEMPLATE
depends on CRYPTO_SHA256=y && !IMA_TEMPLATE

config IMA_DEFAULT_HASH_SHA512
bool "SHA512"
depends on CRYPTO_SHA512 && !IMA_TEMPLATE
depends on CRYPTO_SHA512=y && !IMA_TEMPLATE

config IMA_DEFAULT_HASH_WP512
bool "WP512"
depends on CRYPTO_WP512 && !IMA_TEMPLATE
depends on CRYPTO_WP512=y && !IMA_TEMPLATE
endchoice

config IMA_DEFAULT_HASH
Expand Down

0 comments on commit 38d1926

Please sign in to comment.