[gnutls-devel] [PATCH 3/4] tests: misc: shell cleanup

Alon Bar-Lev alon.barlev at gmail.com
Sun Jun 21 02:00:04 CEST 2015


leftovers minor sync.

Signed-off-by: Alon Bar-Lev <alon.barlev at gmail.com>
---
 tests/cert-tests/aki             |   6 +-
 tests/cert-tests/certtool        |  38 +++++------
 tests/cert-tests/crq             |   4 +-
 tests/cert-tests/dane            |   2 +-
 tests/cert-tests/email           |   4 +-
 tests/cert-tests/invalid-sig     |   4 +-
 tests/cert-tests/pathlen         |   8 +--
 tests/cert-tests/pem-decoding    |   4 +-
 tests/cert-tests/pkcs7           |   4 +-
 tests/cert-tests/template-test   | 134 +++++++++++++++++++--------------------
 tests/ecdsa/ecdsa                |  22 +++----
 tests/key-tests/key-id           |   8 +--
 tests/key-tests/pkcs8            |   2 +-
 tests/openpgp-certs/testselfsigs |   2 +-
 14 files changed, 120 insertions(+), 122 deletions(-)

diff --git a/tests/cert-tests/aki b/tests/cert-tests/aki
index e1f2b0f..5f130cc 100755
--- a/tests/cert-tests/aki
+++ b/tests/cert-tests/aki
@@ -23,14 +23,14 @@
 set -e
 
 srcdir="${srcdir:-.}"
-CERTTOOL="${CERTTOOL:-../../src/certtool$EXEEXT}"
+CERTTOOL="${CERTTOOL:-../../src/certtool${EXEEXT}}"
 DIFF="${DIFF:-diff}"
 if ! test -z "${VALGRIND}";then
-VALGRIND="${LIBTOOL:-libtool} --mode=execute ${VALGRIND}"
+  VALGRIND="${LIBTOOL:-libtool} --mode=execute ${VALGRIND}"
 fi
 
 ${VALGRIND} "${CERTTOOL}" --certificate-info --infile "${srcdir}/aki-cert.pem" \
-	  |grep -v "Algorithm Security Level" > tmp-aki.pem
+  |grep -v "Algorithm Security Level" > tmp-aki.pem
 rc=$?
 
 if test "${rc}" != "0"; then
diff --git a/tests/cert-tests/certtool b/tests/cert-tests/certtool
index 25a7e90..ce02ec8 100755
--- a/tests/cert-tests/certtool
+++ b/tests/cert-tests/certtool
@@ -21,10 +21,10 @@
 #set -e
 
 srcdir="${srcdir:-.}"
-CERTTOOL="${CERTTOOL:-../../src/certtool$EXEEXT}"
+CERTTOOL="${CERTTOOL:-../../src/certtool${EXEEXT}}"
 DIFF="${DIFF:-diff}"
 if ! test -z "${VALGRIND}";then
-VALGRIND="${LIBTOOL:-libtool} --mode=execute ${VALGRIND}"
+  VALGRIND="${LIBTOOL:-libtool} --mode=execute ${VALGRIND}"
 fi
 
 #check whether "funny" spaces can be interpreted
@@ -32,32 +32,32 @@ id=`${VALGRIND} "${CERTTOOL}" --key-id --infile "${srcdir}/funny-spacing.pem" --
 rc=$?
 
 if test "${id}" != "1e09d707d4e3651b84dcb6c68a828d2affef7ec3";then
-	echo "Key-ID1 doesn't match the expected: ${id}"
-	exit 1
+  echo "Key-ID1 doesn't match the expected: ${id}"
+  exit 1
 fi
 
-id=`$VALGRIND "${CERTTOOL}" --key-id --infile "${srcdir}/funny-spacing.pem"`
+id=`${VALGRIND} "${CERTTOOL}" --key-id --infile "${srcdir}/funny-spacing.pem"`
 rc=$?
 
 if test "${id}" != "1e09d707d4e3651b84dcb6c68a828d2affef7ec3";then
-	echo "Default key-ID1 doesn't match the expected; did the defaults change? ID: ${id}"
-	exit 1
+  echo "Default key-ID1 doesn't match the expected; did the defaults change? ID: ${id}"
+  exit 1
 fi
 
 id=`"${CERTTOOL}" --pubkey-info <"${srcdir}/funny-spacing.pem"|"${CERTTOOL}" --key-id --hash sha1`
 rc=$?
 
 if test "${id}" != "1e09d707d4e3651b84dcb6c68a828d2affef7ec3";then
-	echo "Key-ID2 doesn't match the expected: ${id}"
-	exit 1
+  echo "Key-ID2 doesn't match the expected: ${id}"
+  exit 1
 fi
 
 id=`"${CERTTOOL}" --pubkey-info <"${srcdir}/funny-spacing.pem"|"${CERTTOOL}" --key-id --hash sha256`
 rc=$?
 
 if test "${id}" != "118e72e3655150c895ecbd19b3634179fb4a87c7a25abefcb11f5d66661d5a4d";then
-	echo "Key-ID3 doesn't match the expected: ${id}"
-	exit 1
+  echo "Key-ID3 doesn't match the expected: ${id}"
+  exit 1
 fi
 
 #fingerprint
@@ -65,16 +65,16 @@ id=`${VALGRIND} "${CERTTOOL}" --fingerprint --infile "${srcdir}/funny-spacing.pe
 rc=$?
 
 if test "${id}" != "8f735c5ddefd723f59b6a3bb2ac0522470c0182f";then
-	echo "Fingerprint doesn't match the expected: 3"
-	exit 1
+  echo "Fingerprint doesn't match the expected: 3"
+  exit 1
 fi
 
 id=`${VALGRIND} "${CERTTOOL}" --fingerprint --hash sha256 --infile "${srcdir}/funny-spacing.pem"`
 rc=$?
 
 if test "${id}" != "fc5b45b20c489393a457f177572920ac40bacba9d25cea51200822271eaf7d1f";then
-	echo "Fingerprint doesn't match the expected: 4"
-	exit 1
+  echo "Fingerprint doesn't match the expected: 4"
+  exit 1
 fi
 
 export TZ="UTC"
@@ -83,8 +83,8 @@ export TZ="UTC"
 TSTAMP=`datefudge "2006-09-23" date -u +%s || true`
 if test "$TSTAMP" != "1158969600"; then
 echo $TSTAMP
-    echo "You need datefudge to run this test"
-    exit 77
+  echo "You need datefudge to run this test"
+  exit 77
 fi
 
 cat "${srcdir}/../certs/cert-ecc256.pem" "${srcdir}/../certs/ca-cert-ecc.pem"|datefudge "2012-11-22" \
@@ -92,8 +92,8 @@ ${VALGRIND} "${CERTTOOL}" --verify-chain
 rc=$?
 
 if test "${rc}" != "0";then
-	echo "There was an issue verifying the chain"
-	exit 1
+  echo "There was an issue verifying the chain"
+  exit 1
 fi
 
 
diff --git a/tests/cert-tests/crq b/tests/cert-tests/crq
index 4d87c45..cc2bbfe 100755
--- a/tests/cert-tests/crq
+++ b/tests/cert-tests/crq
@@ -23,10 +23,10 @@
 #set -e
 
 srcdir="${srcdir:-.}"
-CERTTOOL="${CERTTOOL:-../../src/certtool$EXEEXT}"
+CERTTOOL="${CERTTOOL:-../../src/certtool${EXEEXT}}"
 DIFF="${DIFF:-diff}"
 if ! test -z "${VALGRIND}";then
-VALGRIND="${LIBTOOL:-libtool} --mode=execute ${VALGRIND} --error-exitcode=15"
+  VALGRIND="${LIBTOOL:-libtool} --mode=execute ${VALGRIND} --error-exitcode=15"
 fi
 OUTFILE=out.tmp
 
diff --git a/tests/cert-tests/dane b/tests/cert-tests/dane
index 55688eb..e019ef7 100755
--- a/tests/cert-tests/dane
+++ b/tests/cert-tests/dane
@@ -23,7 +23,7 @@
 set -e
 
 srcdir="${srcdir:-.}"
-DANETOOL="${DANETOOL:-../../src/danetool$EXEEXT}"
+DANETOOL="${DANETOOL:-../../src/danetool${EXEEXT}}"
 DIFF="${DIFF:-diff}"
 
 test -e "${DANETOOL}" || exit 77
diff --git a/tests/cert-tests/email b/tests/cert-tests/email
index 3b093a4..e12ee6b 100755
--- a/tests/cert-tests/email
+++ b/tests/cert-tests/email
@@ -21,10 +21,10 @@
 # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 
 srcdir="${srcdir:-.}"
-CERTTOOL="${CERTTOOL:-../../src/certtool$EXEEXT}"
+CERTTOOL="${CERTTOOL:-../../src/certtool${EXEEXT}}"
 DIFF=$"{DIFF:-diff}"
 if ! test -z "${VALGRIND}";then
-VALGRIND="${LIBTOOL:-libtool} --mode=execute ${VALGRIND}"
+  VALGRIND="${LIBTOOL:-libtool} --mode=execute ${VALGRIND}"
 fi
 
 ${VALGRIND} "${CERTTOOL}" -e --infile "${srcdir}/email-certs/chain.exclude.test.example.com" --verify-email test at example.com
diff --git a/tests/cert-tests/invalid-sig b/tests/cert-tests/invalid-sig
index 3f8553a..72d72ec 100755
--- a/tests/cert-tests/invalid-sig
+++ b/tests/cert-tests/invalid-sig
@@ -23,10 +23,10 @@
 #set -e
 
 srcdir="${srcdir:-.}"
-CERTTOOL="${CERTTOOL:-../../src/certtool$EXEEXT}"
+CERTTOOL="${CERTTOOL:-../../src/certtool${EXEEXT}}"
 DIFF="${DIFF:-diff}"
 if ! test -z "${VALGRIND}";then
-VALGRIND="${LIBTOOL:-libtool} --mode=execute ${VALGRIND}"
+  VALGRIND="${LIBTOOL:-libtool} --mode=execute ${VALGRIND}"
 fi
 
 #check whether a different PKCS #1 signature than the advertized in certificate is tolerated
diff --git a/tests/cert-tests/pathlen b/tests/cert-tests/pathlen
index 18084f5..710282d 100755
--- a/tests/cert-tests/pathlen
+++ b/tests/cert-tests/pathlen
@@ -23,14 +23,14 @@
 set -e
 
 srcdir="${srcdir:-.}"
-CERTTOOL="${CERTTOOL:-../../src/certtool$EXEEXT}"
+CERTTOOL="${CERTTOOL:-../../src/certtool${EXEEXT}}"
 DIFF="${DIFF:-diff}"
 if ! test -z "${VALGRIND}";then
-VALGRIND="${LIBTOOL:-libtool} --mode=execute ${VALGRIND}"
+  VALGRIND="${LIBTOOL:-libtool} --mode=execute ${VALGRIND}"
 fi
 
 ${VALGRIND} "${CERTTOOL}" --certificate-info --infile "${srcdir}/ca-no-pathlen.pem" \
-	  |grep -v "Algorithm Security Level" > new-ca-no-pathlen.pem
+  |grep -v "Algorithm Security Level" > new-ca-no-pathlen.pem
 rc=$?
 
 if test "${rc}" != "0"; then
@@ -39,7 +39,7 @@ if test "${rc}" != "0"; then
 fi
 
 ${VALGRIND} "${CERTTOOL}" --certificate-info --infile "${srcdir}/no-ca-or-pathlen.pem" \
-	  |grep -v "Algorithm Security Level" > new-no-ca-or-pathlen.pem
+  |grep -v "Algorithm Security Level" > new-no-ca-or-pathlen.pem
 rc=$?
 
 if test "${rc}" != "0"; then
diff --git a/tests/cert-tests/pem-decoding b/tests/cert-tests/pem-decoding
index 6330373..8913acb 100755
--- a/tests/cert-tests/pem-decoding
+++ b/tests/cert-tests/pem-decoding
@@ -23,10 +23,10 @@
 #set -e
 
 srcdir="${srcdir:-.}"
-CERTTOOL="${CERTTOOL:-../../src/certtool$EXEEXT}"
+CERTTOOL="${CERTTOOL:-../../src/certtool${EXEEXT}}"
 DIFF="${DIFF:-diff}"
 if ! test -z "${VALGRIND}";then
-VALGRIND="${LIBTOOL:-libtool} --mode=execute ${VALGRIND}"
+  VALGRIND="${LIBTOOL:-libtool} --mode=execute ${VALGRIND}"
 fi
 
 #check whether "funny" spaces can be interpreted
diff --git a/tests/cert-tests/pkcs7 b/tests/cert-tests/pkcs7
index f2a6ff0..c3938cb 100755
--- a/tests/cert-tests/pkcs7
+++ b/tests/cert-tests/pkcs7
@@ -21,10 +21,10 @@
 #set -e
 
 srcdir="${srcdir:-.}"
-CERTTOOL="${CERTTOOL:-../../src/certtool$EXEEXT}"
+CERTTOOL="${CERTTOOL:-../../src/certtool${EXEEXT}}"
 DIFF="${DIFF:-diff}"
 if ! test -z "${VALGRIND}";then
-VALGRIND="${LIBTOOL:-libtool} --mode=execute ${VALGRIND} --error-exitcode=15"
+  VALGRIND="${LIBTOOL:-libtool} --mode=execute ${VALGRIND} --error-exitcode=15"
 fi
 OUTFILE=out-pkcs7.tmp
 OUTFILE2=out2-pkcs7.tmp
diff --git a/tests/cert-tests/template-test b/tests/cert-tests/template-test
index f1bc802..c92440e 100755
--- a/tests/cert-tests/template-test
+++ b/tests/cert-tests/template-test
@@ -21,7 +21,7 @@
 #set -e
 
 srcdir="${srcdir:-.}"
-CERTTOOL="${CERTTOOL:-../../src/certtool$EXEEXT}"
+CERTTOOL="${CERTTOOL:-../../src/certtool${EXEEXT}}"
 DIFF="${DIFF:-diff}"
 
 export TZ="UTC"
@@ -29,9 +29,9 @@ export TZ="UTC"
 # Check for datefudge
 TSTAMP=`datefudge "2006-09-23" date -u +%s || true`
 if test "$TSTAMP" != "1158969600"; then
-echo $TSTAMP
-    echo "You need datefudge to run this test"
-    exit 77
+  echo $TSTAMP
+  echo "You need datefudge to run this test"
+  exit 77
 fi
 
 # Note that in rare cases this test may fail because the
@@ -43,16 +43,16 @@ counter=1
 
 while [ "${rc}" != "0" -a $counter -le 3 ]
 do
-datefudge "2007-04-22" \
+  datefudge "2007-04-22" \
     "${CERTTOOL}" --generate-self-signed \
     --load-privkey "${srcdir}/template-test.key" \
     --template "${srcdir}/template-test.tmpl" \
     --outfile tmp-tt.pem 2>/dev/null
 
-${DIFF} "${srcdir}/template-test.pem" tmp-tt.pem >/dev/null 2>&1
-rc=$?
-test ${rc} != 0 && sleep 3
-counter=`expr $counter + 1`
+  ${DIFF} "${srcdir}/template-test.pem" tmp-tt.pem >/dev/null 2>&1
+  rc=$?
+  test ${rc} != 0 && sleep 3
+  counter=`expr $counter + 1`
 done
 
 # We're done.
@@ -68,16 +68,16 @@ counter=1
 
 while [ "${rc}" != "0" -a $counter -le 3 ]
 do
-datefudge "2007-04-22" \
+  datefudge "2007-04-22" \
     "${CERTTOOL}" --generate-self-signed \
     --load-privkey "${srcdir}/template-test.key" \
     --template "${srcdir}/template-utf8.tmpl" \
     --outfile tmp-tt.pem 2>/dev/null
 
-${DIFF} "${srcdir}/template-utf8.pem" tmp-tt.pem >/dev/null 2>&1
-rc=$?
-test ${rc} != 0 && sleep 3
-counter=`expr $counter + 1`
+  ${DIFF} "${srcdir}/template-utf8.pem" tmp-tt.pem >/dev/null 2>&1
+  rc=$?
+  test ${rc} != 0 && sleep 3
+  counter=`expr $counter + 1`
 done
 
 # We're done.
@@ -93,16 +93,16 @@ counter=1
 
 while [ "${rc}" != "0" -a $counter -le 3 ]
 do
-datefudge "2007-04-22" \
+  datefudge "2007-04-22" \
     "${CERTTOOL}" --generate-self-signed \
     --load-privkey "${srcdir}/template-test.key" \
     --template "${srcdir}/template-dn.tmpl" \
     --outfile tmp-tt.pem 2>/dev/null
 
-${DIFF} "${srcdir}/template-dn.pem" tmp-tt.pem >/dev/null 2>&1
-rc=$?
-test ${rc} != 0 && sleep 3
-counter=`expr $counter + 1`
+  ${DIFF} "${srcdir}/template-dn.pem" tmp-tt.pem >/dev/null 2>&1
+  rc=$?
+  test ${rc} != 0 && sleep 3
+  counter=`expr $counter + 1`
 done
 
 # We're done.
@@ -114,10 +114,10 @@ fi
 rm -f tmp-tt.pem
 
 datefudge "2007-04-22" \
-    "${CERTTOOL}" --generate-self-signed \
-    --load-privkey "${srcdir}/template-test.key" \
-    --template "${srcdir}/template-dn-err.tmpl" \
-    --outfile tmp-tt.pem 2>/dev/null
+  "${CERTTOOL}" --generate-self-signed \
+  --load-privkey "${srcdir}/template-test.key" \
+  --template "${srcdir}/template-dn-err.tmpl" \
+  --outfile tmp-tt.pem 2>/dev/null
 rc=$?
 
 if test "${rc}" = "0"; then
@@ -132,16 +132,16 @@ counter=1
 
 while [ "${rc}" != "0" -a $counter -le 3 ]
 do
-datefudge "2007-04-22" \
+  datefudge "2007-04-22" \
     "${CERTTOOL}" --generate-self-signed \
     --load-privkey "${srcdir}/template-test.key" \
     --template "${srcdir}/template-overflow.tmpl" \
     --outfile tmp-tt.pem 2>/dev/null
 
-${DIFF} "${srcdir}/template-overflow.pem" tmp-tt.pem >/dev/null 2>&1
-rc=$?
-test ${rc} != 0 && sleep 3
-counter=`expr $counter + 1`
+  ${DIFF} "${srcdir}/template-overflow.pem" tmp-tt.pem >/dev/null 2>&1
+  rc=$?
+  test ${rc} != 0 && sleep 3
+  counter=`expr $counter + 1`
 done
 
 # We're done.
@@ -160,16 +160,16 @@ counter=1
 
 while [ "${rc}" != "0" -a $counter -le 3 ]
 do
-datefudge "2007-04-22" \
+  datefudge "2007-04-22" \
     "${CERTTOOL}" --generate-self-signed \
     --load-privkey "${srcdir}/template-test.key" \
     --template "${srcdir}/template-overflow2.tmpl" \
     --outfile tmp-tt.pem 2>/dev/null
 
-${DIFF} "${srcdir}/template-overflow2.pem" tmp-tt.pem >/dev/null 2>&1
-rc=$?
-test ${rc} != 0 && sleep 3
-counter=`expr $counter + 1`
+  ${DIFF} "${srcdir}/template-overflow2.pem" tmp-tt.pem >/dev/null 2>&1
+  rc=$?
+  test ${rc} != 0 && sleep 3
+  counter=`expr $counter + 1`
 done
 
 # We're done.
@@ -186,16 +186,16 @@ counter=1
 
 while [ "${rc}" != "0" -a $counter -le 3 ]
 do
-datefudge "2007-04-22" \
+  datefudge "2007-04-22" \
     "${CERTTOOL}" --generate-self-signed \
     --load-privkey "${srcdir}/template-test.key" \
     --template "${srcdir}/template-date.tmpl" \
     --outfile tmp-tt.pem 2>/dev/null
 
-${DIFF} "${srcdir}/template-date.pem" tmp-tt.pem >/dev/null 2>&1
-rc=$?
-test ${rc} != 0 && sleep 3
-counter=`expr $counter + 1`
+  ${DIFF} "${srcdir}/template-date.pem" tmp-tt.pem >/dev/null 2>&1
+  rc=$?
+  test ${rc} != 0 && sleep 3
+  counter=`expr $counter + 1`
 done
 
 # We're done.
@@ -213,16 +213,16 @@ counter=1
 
 while [ "${rc}" != "0" -a $counter -le 3 ]
 do
-datefudge "2007-04-22" \
+  datefudge "2007-04-22" \
     "${CERTTOOL}" --generate-self-signed \
     --load-privkey "${srcdir}/template-test.key" \
     --template "${srcdir}/template-nc.tmpl" \
     --outfile tmp-tt.pem 2>/dev/null
 
-${DIFF} "${srcdir}/template-nc.pem" tmp-tt.pem >/dev/null 2>&1
-rc=$?
-test ${rc} != 0 && sleep 3
-counter=`expr $counter + 1`
+  ${DIFF} "${srcdir}/template-nc.pem" tmp-tt.pem >/dev/null 2>&1
+  rc=$?
+  test ${rc} != 0 && sleep 3
+  counter=`expr $counter + 1`
 done
 
 # We're done.
@@ -235,33 +235,31 @@ rm -f tmp-tt.pem
 
 # Test the GeneralizedTime support
 if test "$(getconf LONG_BIT)" = "64";then
-# we should test that on systems which have 64-bit time_t.
-rc=1
-counter=1
-
-while [ "${rc}" != "0" -a $counter -le 3 ]
-do
-datefudge "2051-04-22" \
-    "${CERTTOOL}" --generate-self-signed \
-    --load-privkey "${srcdir}/template-test.key" \
-    --template "${srcdir}/template-generalized.tmpl" \
-    --outfile tmp-tt.pem 2>/dev/null
-
-${DIFF} "${srcdir}/template-generalized.pem" tmp-tt.pem >/dev/null 2>&1
-rc=$?
-test ${rc} != 0 && sleep 3
-counter=`expr $counter + 1`
-done
-
-# We're done.
-if test "${rc}" != "0"; then
-  echo "Test 8 (generalizedTime) failed"
-  exit ${rc}
-fi
-
+  # we should test that on systems which have 64-bit time_t.
+  rc=1
+  counter=1
+
+  while [ "${rc}" != "0" -a $counter -le 3 ]
+  do
+    datefudge "2051-04-22" \
+      "${CERTTOOL}" --generate-self-signed \
+      --load-privkey "${srcdir}/template-test.key" \
+      --template "${srcdir}/template-generalized.tmpl" \
+      --outfile tmp-tt.pem 2>/dev/null
+
+    ${DIFF} "${srcdir}/template-generalized.pem" tmp-tt.pem >/dev/null 2>&1
+    rc=$?
+    test ${rc} != 0 && sleep 3
+    counter=`expr $counter + 1`
+  done
+
+  # We're done.
+  if test "${rc}" != "0"; then
+    echo "Test 8 (generalizedTime) failed"
+    exit ${rc}
+  fi
 fi
 
 rm -f tmp-tt.pem
 
-
 exit 0
diff --git a/tests/ecdsa/ecdsa b/tests/ecdsa/ecdsa
index 90eead0..507f622 100755
--- a/tests/ecdsa/ecdsa
+++ b/tests/ecdsa/ecdsa
@@ -23,7 +23,7 @@
 #set -e
 
 srcdir="${srcdir:-.}"
-CERTTOOL="${CERTTOOL:-../../src/certtool$EXEEXT}"
+CERTTOOL="${CERTTOOL:-../../src/certtool${EXEEXT}}"
 
 echo ca > template
 echo cn = "ECDSA SHA 256 CA" >> template
@@ -36,8 +36,8 @@ echo cn = "ECDSA SHA 256 CA" >> template
     --hash sha256 >out 2>&1
 
 if [ $? != 0 ];then
-	cat out
-	exit 1
+  cat out
+  exit 1
 fi
 
 echo ca > template
@@ -52,8 +52,8 @@ echo cn = "ECDSA SHA 224 Mid CA" >> template
     --hash sha224 >out 2>&1
 
 if [ $? != 0 ];then
-	cat out
-	exit 1
+  cat out
+  exit 1
 fi
 
 echo cn = "End-user" > template
@@ -67,16 +67,16 @@ echo cn = "End-user" > template
     --outfile new-user.pem >out 2>&1
 
 if [ $? != 0 ];then
-	cat out
-	exit 1
+  cat out
+  exit 1
 fi
 
 cat new-user.pem new-subca-ecdsa.pem new-ca-ecdsa.pem > out
 "${CERTTOOL}" --verify-chain <out > verify
 
 if [ $? != 0 ];then
-	cat verify
-	exit 1
+  cat verify
+  exit 1
 fi
 
 rm -f verify new-user.pem new-ca-ecdsa.pem new-subca-ecdsa.pem template out
@@ -84,8 +84,8 @@ rm -f key-subca-ecdsa.pem key-ca-ecdsa.pem key-ecdsa.pem
 
 "${CERTTOOL}" -k < "${srcdir}/bad-key.pem" | grep "validation failed" >/dev/null 2>&1
 if [ $? != 0 ];then
-	echo "certtool didn't detect a bad ECDSA key."
-	exit 1
+  echo "certtool didn't detect a bad ECDSA key."
+  exit 1
 fi
 
 exit 0
diff --git a/tests/key-tests/key-id b/tests/key-tests/key-id
index 7e09617..c671319 100755
--- a/tests/key-tests/key-id
+++ b/tests/key-tests/key-id
@@ -23,7 +23,7 @@
 set -e
 
 srcdir="${srcdir:-.}"
-CERTTOOL="${CERTTOOL:-../../src/certtool$EXEEXT}"
+CERTTOOL="${CERTTOOL:-../../src/certtool${EXEEXT}}"
 
 PARAMS="--generate-certificate --load-privkey '${srcdir}/key-user.pem' --load-ca-privkey '${srcdir}/key-ca.pem' --template tmpl"
 
@@ -40,10 +40,10 @@ eval "${CERTTOOL}" ${PARAMS} --load-ca-certificate "${srcdir}/ca-weird-keyid.pem
 
 if "${CERTTOOL}" -i < user-weird-keyid.pem \
     | grep '7a2c7a6097460603cbfb28e8e219df18deeb4e0d' > /dev/null; then
-    :
+:
 else
-    echo "Could not find CA SKI in user certificate."
-    exit 1;
+  echo "Could not find CA SKI in user certificate."
+  exit 1;
 fi
 
 rm -f tmpl user-gnutls-keyid.pem user-no-keyid.pem user-weird-keyid.pem
diff --git a/tests/key-tests/pkcs8 b/tests/key-tests/pkcs8
index 8ea8dc9..3173bfa 100755
--- a/tests/key-tests/pkcs8
+++ b/tests/key-tests/pkcs8
@@ -19,7 +19,7 @@
 # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 
 srcdir="${srcdir:-.}"
-CERTTOOL="${CERTTOOL:-../../src/certtool$EXEEXT}"
+CERTTOOL="${CERTTOOL:-../../src/certtool${EXEEXT}}"
 GREP="${GREP:-grep}"
 
 # check keys with password
diff --git a/tests/openpgp-certs/testselfsigs b/tests/openpgp-certs/testselfsigs
index c997f9a..2910b29 100755
--- a/tests/openpgp-certs/testselfsigs
+++ b/tests/openpgp-certs/testselfsigs
@@ -23,7 +23,7 @@
 set -e
 
 srcdir="${srcdir:-.}"
-CERTTOOL="${CERTTOOL:-../../src/certtool$EXEEXT}"
+CERTTOOL="${CERTTOOL:-../../src/certtool${EXEEXT}}"
 
 unset RETCODE || true
 
-- 
2.3.6




More information about the Gnutls-devel mailing list