From ceecb28d3b5267c7d32c6e9401923c94f5786cfb Mon Sep 17 00:00:00 2001 From: Tianjia Zhang Date: Thu, 9 Jul 2020 11:34:16 +0800 Subject: [PATCH] ima-evm-utils: add SM3 to pkey_hash_algo algorithm list SM3 was published by State Encryption Management Bureau, China. It has been well supported in the kernel and openssl. This patch allows SM3 to be used smoothly by specifying the parameter `-a sm3` or `--hashalgo sm3`. Signed-off-by: Tianjia Zhang Signed-off-by: Mimi Zohar --- src/libimaevm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libimaevm.c b/src/libimaevm.c index b485171..b8d5769 100644 --- a/src/libimaevm.c +++ b/src/libimaevm.c @@ -71,6 +71,7 @@ static const char *const pkey_hash_algo[PKEY_HASH__LAST] = { [PKEY_HASH_SHA384] = "sha384", [PKEY_HASH_SHA512] = "sha512", [PKEY_HASH_SHA224] = "sha224", + [PKEY_HASH_SM3_256] = "sm3", [PKEY_HASH_STREEBOG_256] = "md_gost12_256", [PKEY_HASH_STREEBOG_512] = "md_gost12_512", };