Skip to content

Commit

Permalink
ima: add sm3 algorithm to hash algorithm configuration list
Browse files Browse the repository at this point in the history
sm3 has been supported by the ima hash algorithm, but it is not
yet in the Kconfig configuration list. After adding, both ima and tpm2
can support sm3 well.

Signed-off-by: Tianjia Zhang <[email protected]>
Signed-off-by: Mimi Zohar <[email protected]>
  • Loading branch information
uudiin authored and mimizohar committed Feb 18, 2020
1 parent 6a30e1b commit 5780b9a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions security/integrity/ima/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,10 @@ choice
config IMA_DEFAULT_HASH_WP512
bool "WP512"
depends on CRYPTO_WP512=y && !IMA_TEMPLATE

config IMA_DEFAULT_HASH_SM3
bool "SM3"
depends on CRYPTO_SM3=y && !IMA_TEMPLATE
endchoice

config IMA_DEFAULT_HASH
Expand All @@ -121,6 +125,7 @@ config IMA_DEFAULT_HASH
default "sha256" if IMA_DEFAULT_HASH_SHA256
default "sha512" if IMA_DEFAULT_HASH_SHA512
default "wp512" if IMA_DEFAULT_HASH_WP512
default "sm3" if IMA_DEFAULT_HASH_SM3

config IMA_WRITE_POLICY
bool "Enable multiple writes to the IMA policy"
Expand Down

0 comments on commit 5780b9a

Please sign in to comment.