diff mbox series

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

Message ID 1641886599-246423-1-git-send-email-wenyehai@huawei.com
State Accepted
Headers show
Series [v2] add several hash algorithms for crypto/crypto_user02.c | expand

Commit Message

wenyehai Jan. 11, 2022, 7:36 a.m. UTC
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(-)

--
2.7.4

Comments

Eric Biggers Jan. 11, 2022, 6:40 p.m. UTC | #1
On Tue, Jan 11, 2022 at 03:36:39PM +0800, wenyehai via ltp wrote:
> 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(-)

Reviewed-by: Eric Biggers <ebiggers@google.com>

- Eric
Cyril Hrubis Jan. 12, 2022, 9:57 a.m. UTC | #2
Hi!
Applied, thanks.
wenyehai Jan. 13, 2022, 2:02 a.m. UTC | #3
Hi, Cyril Hrubis:

Thanks.


Best Regards
Yehai Wen

-----邮件原件-----
发件人: Cyril Hrubis [mailto:chrubis@suse.cz] 
发送时间: 2022年1月12日 17:58
收件人: wenyehai <wenyehai@huawei.com>
抄送: ltp@lists.linux.it
主题: Re: [LTP] [PATCH v2] add several hash algorithms for crypto/crypto_user02.c

Hi!
Applied, thanks.
diff mbox series

Patch

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;