]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
tests: check whether p11tool signing with RSA-PSS works
authorNikos Mavrogiannopoulos <nmav@redhat.com>
Fri, 25 Aug 2017 09:41:47 +0000 (11:41 +0200)
committerNikos Mavrogiannopoulos <nmav@gnutls.org>
Sun, 27 Aug 2017 13:58:28 +0000 (15:58 +0200)
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
tests/suite/testpkcs11.sh

index d2276d4d83517bb3796c79f7a1e1d702a05b0309..1f38f3acc031470c2e42a032919469becce71f51 100755 (executable)
@@ -696,6 +696,20 @@ test_sign () {
        fi
        echo ok
 
+       echo -n "* Testing RSA-PSS signatures using the private key... "
+       ${P11TOOL} ${ADDITIONAL_PARAM} --login --sign-params rsa-pss --test-sign "${token};object=serv-key" >>"${TMPFILE}" 2>&1
+       rc=$?
+       if test $rc != 0; then
+               if test $rc = 2; then
+                       echo "failed. RSA-PSS not supported."
+               else
+                       echo "failed. Cannot test signatures."
+                       exit_error
+               fi
+       else
+               echo ok
+       fi
+
        echo -n "* Testing signatures using the private key (with ID)... "
        ${P11TOOL} ${ADDITIONAL_PARAM} --login --test-sign "${token};id=%ac%1d%7a%39%cb%72%17%94%66%6c%74%44%73%40%91%44%c0%a0%43%7d" >>"${TMPFILE}" 2>&1
        ${P11TOOL} ${ADDITIONAL_PARAM} --login --test-sign "${token};id=%ac%1d%7a%39%cb%72%17%94%66%6c%74%44%73%40%91%44%c0%a0%43%7d" 2>&1|grep "Verifying against public key in the token..."|grep ok >>"${TMPFILE}" 2>&1