From 1950b03d3560529ea994f075e6f789c422760ce7 Mon Sep 17 00:00:00 2001 From: Pol Henarejos Date: Wed, 11 Oct 2023 21:11:41 +0200 Subject: [PATCH] Add more pkcs11-tool tests. Signed-off-by: Pol Henarejos --- tests/scripts/pkcs11_test.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tests/scripts/pkcs11_test.sh b/tests/scripts/pkcs11_test.sh index 0550dc7..6cbd193 100755 --- a/tests/scripts/pkcs11_test.sh +++ b/tests/scripts/pkcs11_test.sh @@ -7,5 +7,11 @@ 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 $? +e=$(pkcs11-tool --test -l --pin 648219 2>&1) +test $? -eq 0 && echo -n "." || exit $? +grep -q "No errors" <<< $e && echo -n "." || exit $? +pkcs11-tool -l --pin 648219 --delete-object --type privkey --id 1 > /dev/null 2>&1 +test $? -eq 0 && echo -n "." || exit $? +e=$(pkcs11-tool --test-ec -l --pin 648219 --id 1 --key-type ec:secp256r1 2>&1) +test $? -eq 0 && echo -n "." || exit $? +grep -q "==> OK" <<< $e && echo -e ".\t${OK}" || exit $?