53 lines
1.7 KiB
Diff
53 lines
1.7 KiB
Diff
From 92eed6318fc0951e71c2dfc3b72826bd7e1eb4c8 Mon Sep 17 00:00:00 2001
|
|
From: Rongqi Sun <sunrongqi@huawei.com>
|
|
Date: Thu, 13 Jun 2024 07:07:02 +0000
|
|
Subject: [PATCH 01/16] uadk_tool/benchmark: skip sm4 benchmark if openssl with
|
|
'no-sm4'
|
|
|
|
When openssl is with 'no-sm4', which cause macro 'OPENSSL_NO_SM4' is defined. So sm4 benchmark should check the macro too, otherwise build would be failed.
|
|
|
|
Signed-off-by: Rongqi Sun <sunrongqi@huawei.com>
|
|
---
|
|
uadk_tool/benchmark/sec_soft_benchmark.c | 4 ++++
|
|
1 file changed, 4 insertions(+)
|
|
|
|
diff --git a/uadk_tool/benchmark/sec_soft_benchmark.c b/uadk_tool/benchmark/sec_soft_benchmark.c
|
|
index 3a38cbd..84dab63 100644
|
|
--- a/uadk_tool/benchmark/sec_soft_benchmark.c
|
|
+++ b/uadk_tool/benchmark/sec_soft_benchmark.c
|
|
@@ -280,6 +280,7 @@ static int sec_soft_param_parse(soft_thread *tddata, struct acc_option *options)
|
|
mode = WD_CIPHER_CBC;
|
|
tddata->evp_cipher = EVP_des_ede3_cbc();
|
|
break;
|
|
+#ifndef OPENSSL_NO_SM4
|
|
case SM4_128_ECB:
|
|
keysize = 16;
|
|
mode = WD_CIPHER_ECB;
|
|
@@ -309,6 +310,7 @@ static int sec_soft_param_parse(soft_thread *tddata, struct acc_option *options)
|
|
keysize = 16;
|
|
mode = WD_CIPHER_XTS;
|
|
break;
|
|
+#endif
|
|
case AES_128_CCM:
|
|
keysize = 16;
|
|
mode = WD_CIPHER_CCM;
|
|
@@ -354,6 +356,7 @@ static int sec_soft_param_parse(soft_thread *tddata, struct acc_option *options)
|
|
mode = WD_CIPHER_CBC;
|
|
tddata->evp_cipher = EVP_aes_256_cbc();
|
|
break;
|
|
+#ifndef OPENSSL_NO_SM4
|
|
case SM4_128_CCM:
|
|
keysize = 16;
|
|
mode = WD_CIPHER_CCM;
|
|
@@ -362,6 +365,7 @@ static int sec_soft_param_parse(soft_thread *tddata, struct acc_option *options)
|
|
keysize = 16;
|
|
mode = WD_CIPHER_GCM;
|
|
break;
|
|
+#endif
|
|
case SM3_ALG: // digest mode is optype
|
|
keysize = 4;
|
|
mode = optype;
|
|
--
|
|
2.25.1
|
|
|