summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2017-08-26 17:27:09 +0200
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2017-08-27 15:58:28 +0200
commite951ba67d64e42b40e1c66c3d5f40a5392764c30 (patch)
tree079904ef0c3b4c2ca052f513472ba2396cc02b56 /tests
parent7345481ba5962d16bccfaacb3432e8328e2ff816 (diff)
downloadgnutls-e951ba67d64e42b40e1c66c3d5f40a5392764c30.tar.gz
tests: check whether generated private keys are marked privatetmp-p11tool-sign-with-rsa-pss
Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
Diffstat (limited to 'tests')
-rwxr-xr-xtests/suite/testpkcs11.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/suite/testpkcs11.sh b/tests/suite/testpkcs11.sh
index 199e2cb5c1..b5306cd973 100755
--- a/tests/suite/testpkcs11.sh
+++ b/tests/suite/testpkcs11.sh
@@ -189,6 +189,14 @@ generate_rsa_privkey () {
exit 1
fi
+ echo -n "* Checking whether generated private key was marked private... "
+ ${P11TOOL} ${ADDITIONAL_PARAM} --list-privkeys "${token};object=gnutls-client" 2>/dev/null | grep 'Label\:' >>"${TMPFILE}" 2>&1
+ if test $? = 0; then
+ echo "private object was public"
+ exit_error
+ fi
+ echo ok
+
echo -n "* Checking whether private key was marked sensitive... "
${P11TOOL} ${ADDITIONAL_PARAM} --login --list-privkeys "${token};object=gnutls-client" | grep "CKA_SENSITIVE" >/dev/null 2>&1
if test $? != 0; then