[LTP] [PATCH v2] add several hash algorithms for crypto/crypto_user02.c

wenyehai wenyehai@huawei.com
Tue Jan 11 08:36:39 CET 2022


crypto/crypto_user02.c: In some cases, only a certain algorithm is
supported(e.g. only enable sha3 algorithm). In order to make crypto_user02 to run in more
cases, we compare with the latest linux kernel crypto/tcrypt.c, add
several hash algorithms which not list in crypto_user02(just list
possible algorithms, but not exhaustive).

Signed-off-by: Yehai Wen <wenyehai@huawei.com>
---
v1->v2: add commit message to introduce why to modify crypto_user02
 testcases/kernel/crypto/crypto_user02.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/testcases/kernel/crypto/crypto_user02.c b/testcases/kernel/crypto/crypto_user02.c
index 717b297..afaff5d 100644
--- a/testcases/kernel/crypto/crypto_user02.c
+++ b/testcases/kernel/crypto/crypto_user02.c
@@ -40,7 +40,15 @@ static const char * const ALGORITHM_CANDIDATES[] = {
 	"hmac(sha256-generic)",
 	"hmac(sha384-generic)",
 	"hmac(md5-generic)",
-	"hmac(sm3-generic)"
+	"hmac(sm3-generic)",
+	"hmac(sha512-generic)",
+	"hmac(rmd160-generic)",
+	"hmac(sha3-224-generic)",
+	"hmac(sha3-256-generic)",
+	"hmac(sha3-384-generic)",
+	"hmac(sha3-512-generic)",
+	"hmac(streebog256-generic)",
+	"hmac(streebog512-generic)"
 };

 static const char* algorithm = NULL;
--
2.7.4



More information about the ltp mailing list