diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2017-08-26 17:27:09 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2017-08-27 15:58:28 +0200 |
commit | e951ba67d64e42b40e1c66c3d5f40a5392764c30 (patch) | |
tree | 079904ef0c3b4c2ca052f513472ba2396cc02b56 /tests | |
parent | 7345481ba5962d16bccfaacb3432e8328e2ff816 (diff) | |
download | gnutls-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-x | tests/suite/testpkcs11.sh | 8 |
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 |