From 2853b38b088cb6db3360d34a87e2247f25adaf6e Mon Sep 17 00:00:00 2001 From: Pol Henarejos Date: Wed, 11 Oct 2023 13:00:24 +0200 Subject: [PATCH] Add PKCS11 tool test Signed-off-by: Pol Henarejos --- tests/scripts/pkcs11.sh | 7 +++++++ tests/scripts/pkcs11_test.sh | 11 +++++++++++ 2 files changed, 18 insertions(+) create mode 100755 tests/scripts/pkcs11_test.sh diff --git a/tests/scripts/pkcs11.sh b/tests/scripts/pkcs11.sh index e0f6fda..46ed776 100755 --- a/tests/scripts/pkcs11.sh +++ b/tests/scripts/pkcs11.sh @@ -42,3 +42,10 @@ test $? -eq 0 || { echo -e "\t${FAIL}" exit 1 } + +echo "==== Test PKCS11-tool ====" +./tests/scripts/pkcs11_test.sh +test $? -eq 0 || { + echo -e "\t${FAIL}" + exit 1 +} \ No newline at end of file diff --git a/tests/scripts/pkcs11_test.sh b/tests/scripts/pkcs11_test.sh new file mode 100755 index 0000000..0550dc7 --- /dev/null +++ b/tests/scripts/pkcs11_test.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +source ./tests/scripts/func.sh +reset +test $? -eq 0 || exit $? + +echo -n " Test PKCS11 tool..." +gen_and_check rsa:2048 +test $? -eq 0 && echo -n "." || exit $? +pkcs11-tool --test -l --pin 648219 > /dev/null 2>&1 +test $? -eq 0 && echo -e ".\t${OK}" || exit $?