]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
fixed bashisms
authorNikos Mavrogiannopoulos <nmav@gnutls.org>
Fri, 4 Apr 2014 22:58:25 +0000 (00:58 +0200)
committerNikos Mavrogiannopoulos <nmav@gnutls.org>
Fri, 4 Apr 2014 23:07:04 +0000 (01:07 +0200)
tests/suite/testpkcs11 [changed mode: 0755->0644]

old mode 100755 (executable)
new mode 100644 (file)
index c73ce18..af7e862
@@ -38,7 +38,7 @@ echo "Testing PKCS11 support"
 # erase SC
 echo -n "* Erasing smart card... "
 pkcs15-init -E >/dev/null 2>&1
-if test $? == 0;then
+if test $? = 0;then
   echo ok
 else
   echo failed
@@ -47,7 +47,7 @@ fi
 
 echo -n "* Initializing smart card... "
 pkcs15-init --create-pkcs15 --profile pkcs15+onepin --use-default-transport-key --so-pin 1234 --pin 1234 --puk 111111 --label "GnuTLS-Test" >/dev/null 2>&1
-if test $? == 0;then
+if test $? = 0;then
   echo ok
 else
   echo failed
@@ -67,7 +67,7 @@ export GNUTLS_PIN=1234
 
 echo -n "* Writing a client private key... "
 $P11TOOL --login --write --label gnutls-client2 --load-privkey $srcdir/pkcs11-certs/client.key "$TOKEN" >/dev/null 2>&1
-if test $? == 0;then
+if test $? = 0;then
   echo ok
 else
   echo failed
@@ -76,7 +76,7 @@ fi
 
 echo -n "* Generating client private key... "
 $P11TOOL --login --label gnutls-client --generate-rsa --bits 1024 "$TOKEN" >tmp-client.pub 2>&1
-if test $? == 0;then
+if test $? = 0;then
   echo ok
 else
   echo failed
@@ -87,7 +87,7 @@ echo -n "* Generating client certificate... "
 $CERTTOOL --generate-certificate --load-ca-privkey $srcdir/pkcs11-certs/ca.key --load-ca-certificate $srcdir/pkcs11-certs/ca.crt \
        --template $srcdir/pkcs11-certs/client-tmpl --load-privkey "$TOKEN;object=gnutls-client;object-type=private" \
        --load-pubkey tmp-client.pub > tmp-client.crt 2>/dev/null
-if test $? == 0;then
+if test $? = 0;then
   echo ok
 else
   echo failed
@@ -96,7 +96,7 @@ fi
 
 echo -n "* Writing client certificate... "
 $P11TOOL --login --write --label gnutls-client --load-certificate tmp-client.crt "$TOKEN" >/dev/null 2>&1
-if test $? == 0;then
+if test $? = 0;then
   echo ok
 else
   echo failed
@@ -105,7 +105,7 @@ fi
 
 echo -n "* Writing certificate of client's CA... "
 $P11TOOL --login --write --label gnutls-ca --load-certificate $srcdir/pkcs11-certs/ca.crt "$TOKEN" >/dev/null 2>&1
-if test $? == 0;then
+if test $? = 0;then
   echo ok
 else
   echo failed
@@ -115,12 +115,12 @@ fi
 echo -n "* Trying to obtain back the cert... "
 $P11TOOL --export "$TOKEN;object=gnutls-ca;object-type=cert" >crt1.tmp 2>/dev/null
 $DIFF crt1.tmp $srcdir/pkcs11-certs/ca.crt
-if [ $? != 0 ];then
+if test $? != 0;then
        echo "failed. Exported certificate differs!"
        exit 1
 fi
 rm -f crt1.tmp
-if test $? == 0;then
+if test $? = 0;then
   echo ok
 else
   echo failed
@@ -132,12 +132,12 @@ $P11TOOL --export-chain "$TOKEN;object=gnutls-client;object-type=cert"|$CERTTOOL
 
 cat tmp-client.crt $srcdir/pkcs11-certs/ca.crt|$CERTTOOL -i >crt2.tmp
 $DIFF crt1.tmp crt2.tmp
-if [ $? != 0 ];then
+if test $? != 0;then
        echo "failed. Exported certificate chain differs!"
        exit 1
 fi
 rm -f crt1.tmp crt2.tmp
-if test $? == 0;then
+if test $? = 0;then
   echo ok
 else
   echo failed