summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2014-04-05 00:58:25 +0200
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2014-04-05 01:07:04 +0200
commit157e01be5fb5d024c498a02683aae213dd98b521 (patch)
tree22a511b9b288601d17a92cb1a87bab37b52d9daa
parent4c5f57b2539e165aba5dfb7761a0ed454f3cb9bf (diff)
downloadgnutls-157e01be5fb5d024c498a02683aae213dd98b521.tar.gz
fixed bashisms
-rw-r--r--[-rwxr-xr-x]tests/suite/testpkcs1122
1 files changed, 11 insertions, 11 deletions
diff --git a/tests/suite/testpkcs11 b/tests/suite/testpkcs11
index c73ce18b25..af7e862a6f 100755..100644
--- a/tests/suite/testpkcs11
+++ b/tests/suite/testpkcs11
@@ -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