]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
testpkcs11: Try to write the trusted object both by so-pin and normal pin
authorNikos Mavrogiannopoulos <nmav@redhat.com>
Thu, 3 Jul 2014 09:45:39 +0000 (11:45 +0200)
committerNikos Mavrogiannopoulos <nmav@redhat.com>
Thu, 3 Jul 2014 09:55:54 +0000 (11:55 +0200)
tests/suite/testpkcs11

index c4a68d024ea2153b6c02c496f10cf66e7d59006d..f668240e4f024f7b977ee28a1d3aab8e53f59437 100755 (executable)
@@ -157,9 +157,14 @@ write_certificate_test () {
        fi
 
        echo -n "* Writing certificate of client's CA... "
-       $P11TOOL $ADDITIONAL_PARAM --so-login --ca --write --trusted --label gnutls-ca --load-certificate "$cacert" "$token" >>$TMPFILE 2>&1
+       $P11TOOL $ADDITIONAL_PARAM --login --ca --write --trusted --label gnutls-ca --load-certificate "$cacert" "$token" >>$TMPFILE 2>&1
+       ret=$?
+       if test $ret != 0;then
+               $P11TOOL $ADDITIONAL_PARAM --so-login --ca --write --trusted --label gnutls-ca --load-certificate "$cacert" "$token" >>$TMPFILE 2>&1
+               ret=$?
+       fi
 
-       if test $? = 0;then
+       if test $ret = 0;then
                echo ok
        else
                echo failed