67 lines
1.9 KiB
Diff
67 lines
1.9 KiB
Diff
From 172ab332b9ada14fe333dd585dda3ceacd09dfc6 Mon Sep 17 00:00:00 2001
|
|
From: Zhangfei Gao <zhangfei.gao@linaro.org>
|
|
Date: Tue, 24 Oct 2023 09:07:06 +0000
|
|
Subject: [PATCH 54/63] uadk: add evp_test.sh
|
|
|
|
Enable uadk_provider via export OPENSSL_CONF
|
|
cd to /path/to/openssl/test and doing evp_test
|
|
|
|
For example:
|
|
./test/evp_test.sh ../openssl
|
|
|
|
Signed-off-by: Zhangfei Gao <zhangfei.gao@linaro.org>
|
|
Signed-off-by: Guodong Xu <guodong.xu@linaro.org>
|
|
---
|
|
test/evp_test.sh | 39 +++++++++++++++++++++++++++++++++++++++
|
|
1 file changed, 39 insertions(+)
|
|
create mode 100755 test/evp_test.sh
|
|
|
|
diff --git a/test/evp_test.sh b/test/evp_test.sh
|
|
new file mode 100755
|
|
index 0000000..5c1b022
|
|
--- /dev/null
|
|
+++ b/test/evp_test.sh
|
|
@@ -0,0 +1,39 @@
|
|
+#!/bin/bash
|
|
+
|
|
+set -x
|
|
+
|
|
+TEST_SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
+
|
|
+if [ $# -eq 0 ]; then
|
|
+ echo "No para: evp_test.sh /path/to/openssl"
|
|
+ exit
|
|
+fi
|
|
+
|
|
+export OPENSSL_CONF=$TEST_SCRIPT_DIR/../uadk_provider.cnf
|
|
+
|
|
+cd "$1"/test
|
|
+
|
|
+#Cipher test
|
|
+digest_algs=$(openssl list -digest-algorithms)
|
|
+if [[ $digest_algs =~ "uadk_provider" ]]; then
|
|
+ ./evp_test ./recipes/30-test_evp_data/evpmd_sm3.txt
|
|
+ ./evp_test ./recipes/30-test_evp_data/evpmd_sha.txt
|
|
+fi
|
|
+
|
|
+cipher_algs=$(openssl list -cipher-algorithms)
|
|
+if [[ $cipher_algs =~ "uadk_provider" ]]; then
|
|
+ ./evp_test ./recipes/30-test_evp_data/evpciph_sm4.txt
|
|
+ ./evp_test ./recipes/30-test_evp_data/evpciph_aes_common.txt
|
|
+ ./evp_test ./recipes/30-test_evp_data/evpciph_des3_common.txt
|
|
+fi
|
|
+
|
|
+signature_algs=$(openssl list -signature-algorithms)
|
|
+if [[ $signature_algs =~ "uadk_provider" ]]; then
|
|
+ ./evp_test ./recipes/30-test_evp_data/evppkey_rsa.txt
|
|
+ ./evp_test ./recipes/30-test_evp_data/evppkey_rsa_common.txt
|
|
+fi
|
|
+
|
|
+keyexch_algs=$(openssl list -key-exchange-algorithms)
|
|
+if [[ $keyexch_algs =~ "uadk_provider" ]]; then
|
|
+ ./evp_test ./recipes/30-test_evp_data/evppkey_dh.txt
|
|
+fi
|
|
--
|
|
2.25.1
|
|
|