summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtests/cert-tests/aki8
-rwxr-xr-xtests/cert-tests/pathlen13
2 files changed, 11 insertions, 10 deletions
diff --git a/tests/cert-tests/aki b/tests/cert-tests/aki
index 5b2b2bf565..3933161bb9 100755
--- a/tests/cert-tests/aki
+++ b/tests/cert-tests/aki
@@ -24,13 +24,14 @@ set -e
srcdir="${srcdir:-.}"
CERTTOOL="${CERTTOOL:-../../src/certtool${EXEEXT}}"
+TMPFILE=aki-$$.tmp
DIFF="${DIFF:-diff -b -B}"
if ! test -z "${VALGRIND}"; then
VALGRIND="${LIBTOOL:-libtool} --mode=execute ${VALGRIND}"
fi
${VALGRIND} "${CERTTOOL}" --certificate-info --infile "${srcdir}/data/aki-cert.pem" \
- |grep -v "Algorithm Security Level" > tmp-aki.pem
+ |grep -v "Algorithm Security Level" > $TMPFILE
rc=$?
if test "${rc}" != "0"; then
@@ -38,8 +39,7 @@ if test "${rc}" != "0"; then
exit ${rc}
fi
-
-${DIFF} "${srcdir}/data/aki-cert.pem" tmp-aki.pem
+${DIFF} "${srcdir}/data/aki-cert.pem" $TMPFILE
rc=$?
# We're done.
@@ -47,6 +47,6 @@ if test "${rc}" != "0"; then
exit ${rc}
fi
-rm -f tmp-aki.pem
+rm -f $TMPFILE
exit 0
diff --git a/tests/cert-tests/pathlen b/tests/cert-tests/pathlen
index cdac5d726d..687ebc244c 100755
--- a/tests/cert-tests/pathlen
+++ b/tests/cert-tests/pathlen
@@ -28,9 +28,10 @@ DIFF="${DIFF:-diff -b -B}"
if ! test -z "${VALGRIND}"; then
VALGRIND="${LIBTOOL:-libtool} --mode=execute ${VALGRIND}"
fi
-
+TMPFILE1=ca-no-pathlen-$$.tmp
+TMPFILE2=no-ca-or-pathlen-$$.tmp
${VALGRIND} "${CERTTOOL}" --certificate-info --infile "${srcdir}/data/ca-no-pathlen.pem" \
- |grep -v "Algorithm Security Level" > new-ca-no-pathlen.pem
+ |grep -v "Algorithm Security Level" > $TMPFILE1
rc=$?
if test "${rc}" != "0"; then
@@ -39,7 +40,7 @@ if test "${rc}" != "0"; then
fi
${VALGRIND} "${CERTTOOL}" --certificate-info --infile "${srcdir}/data/no-ca-or-pathlen.pem" \
- |grep -v "Algorithm Security Level" > new-no-ca-or-pathlen.pem
+ |grep -v "Algorithm Security Level" > $TMPFILE2
rc=$?
if test "${rc}" != "0"; then
@@ -47,9 +48,9 @@ if test "${rc}" != "0"; then
exit ${rc}
fi
-${DIFF} "${srcdir}/data/ca-no-pathlen.pem" new-ca-no-pathlen.pem
+${DIFF} "${srcdir}/data/ca-no-pathlen.pem" $TMPFILE1
rc1=$?
-${DIFF} "${srcdir}/data/no-ca-or-pathlen.pem" new-no-ca-or-pathlen.pem
+${DIFF} "${srcdir}/data/no-ca-or-pathlen.pem" $TMPFILE2
rc2=$?
@@ -58,6 +59,6 @@ if test "${rc1}" != "0"; then
exit ${rc1}
fi
-rm -f new-ca-no-pathlen.pem new-no-ca-or-pathlen.pem
+rm -f $TMPFILE1 $TMPFILE2
exit ${rc2}