summaryrefslogtreecommitdiff
path: root/tests/cert-tests
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@redhat.com>2015-11-25 11:56:49 +0100
committerNikos Mavrogiannopoulos <nmav@redhat.com>2015-11-25 11:56:49 +0100
commitd8a7207ab9654ee0391dabbf870265b1de53727f (patch)
treecbfd89f5692c7791ba1dbbb625f13a69991c8860 /tests/cert-tests
parentab627878a31d68cf8e733103fedeba2d98857739 (diff)
downloadgnutls-d8a7207ab9654ee0391dabbf870265b1de53727f.tar.gz
tests: changes for running tests under windows
Diffstat (limited to 'tests/cert-tests')
-rw-r--r--tests/cert-tests/Makefile.am4
-rwxr-xr-xtests/cert-tests/aki2
-rwxr-xr-xtests/cert-tests/certtool12
-rwxr-xr-xtests/cert-tests/certtool-long-cn2
-rwxr-xr-xtests/cert-tests/pathlen2
-rwxr-xr-xtests/cert-tests/pem-decoding5
-rwxr-xr-xtests/cert-tests/pkcs72
7 files changed, 14 insertions, 15 deletions
diff --git a/tests/cert-tests/Makefile.am b/tests/cert-tests/Makefile.am
index 20fa68e791..2edfc0a8c1 100644
--- a/tests/cert-tests/Makefile.am
+++ b/tests/cert-tests/Makefile.am
@@ -37,7 +37,7 @@ EXTRA_DIST = ca-no-pathlen.pem no-ca-or-pathlen.pem aki-cert.pem \
provable3072.pem provable2048.pem provable-dsa2048.pem provable-dsa2048-fips.pem \
template-unique.tmpl template-unique.pem
-dist_check_SCRIPTS = pathlen aki pem-decoding certtool invalid-sig email \
+dist_check_SCRIPTS = pathlen aki certtool invalid-sig email \
pkcs7 privkey-import name-constraints certtool-long-cn crl provable-privkey
if !HAVE_BUGGY_LIBIDN
@@ -49,7 +49,7 @@ dist_check_SCRIPTS += crq
endif
if !WINDOWS
-dist_check_SCRIPTS += template-test
+dist_check_SCRIPTS += template-test pem-decoding
endif
if ENABLE_DANE
diff --git a/tests/cert-tests/aki b/tests/cert-tests/aki
index 6d71a280a4..b66cba5743 100755
--- a/tests/cert-tests/aki
+++ b/tests/cert-tests/aki
@@ -24,7 +24,7 @@ set -e
srcdir="${srcdir:-.}"
CERTTOOL="${CERTTOOL:-../../src/certtool${EXEEXT}}"
-DIFF="${DIFF:-diff}"
+DIFF="${DIFF:-diff -b -B}"
if ! test -z "${VALGRIND}"; then
VALGRIND="${LIBTOOL:-libtool} --mode=execute ${VALGRIND}"
fi
diff --git a/tests/cert-tests/certtool b/tests/cert-tests/certtool
index 4df4a5d39e..46309b3aed 100755
--- a/tests/cert-tests/certtool
+++ b/tests/cert-tests/certtool
@@ -22,13 +22,13 @@
srcdir="${srcdir:-.}"
CERTTOOL="${CERTTOOL:-../../src/certtool${EXEEXT}}"
-DIFF="${DIFF:-diff}"
+DIFF="${DIFF:-diff -b -B}"
if ! test -z "${VALGRIND}"; then
VALGRIND="${LIBTOOL:-libtool} --mode=execute ${VALGRIND}"
fi
#check whether "funny" spaces can be interpreted
-id=`${VALGRIND} "${CERTTOOL}" --key-id --infile "${srcdir}/funny-spacing.pem" --hash sha1`
+id=`${VALGRIND} "${CERTTOOL}" --key-id --infile "${srcdir}/funny-spacing.pem" --hash sha1| tr -d '\r'`
rc=$?
if test "${id}" != "1e09d707d4e3651b84dcb6c68a828d2affef7ec3"; then
@@ -36,7 +36,7 @@ if test "${id}" != "1e09d707d4e3651b84dcb6c68a828d2affef7ec3"; then
exit 1
fi
-id=`${VALGRIND} "${CERTTOOL}" --key-id --infile "${srcdir}/funny-spacing.pem"`
+id=`${VALGRIND} "${CERTTOOL}" --key-id --infile "${srcdir}/funny-spacing.pem"| tr -d '\r'`
rc=$?
if test "${id}" != "1e09d707d4e3651b84dcb6c68a828d2affef7ec3"; then
@@ -44,7 +44,7 @@ if test "${id}" != "1e09d707d4e3651b84dcb6c68a828d2affef7ec3"; then
exit 1
fi
-id=`"${CERTTOOL}" --pubkey-info <"${srcdir}/funny-spacing.pem"|"${CERTTOOL}" --key-id --hash sha1`
+id=`"${CERTTOOL}" --pubkey-info <"${srcdir}/funny-spacing.pem"|"${CERTTOOL}" --key-id --hash sha1| tr -d '\r'`
rc=$?
if test "${id}" != "1e09d707d4e3651b84dcb6c68a828d2affef7ec3"; then
@@ -61,7 +61,7 @@ if test "${id}" != "118e72e3655150c895ecbd19b3634179fb4a87c7a25abefcb11f5d66661d
fi
#fingerprint
-id=`${VALGRIND} "${CERTTOOL}" --fingerprint --infile "${srcdir}/funny-spacing.pem"`
+id=`${VALGRIND} "${CERTTOOL}" --fingerprint --infile "${srcdir}/funny-spacing.pem"| tr -d '\r'`
rc=$?
if test "${id}" != "8f735c5ddefd723f59b6a3bb2ac0522470c0182f"; then
@@ -69,7 +69,7 @@ if test "${id}" != "8f735c5ddefd723f59b6a3bb2ac0522470c0182f"; then
exit 1
fi
-id=`${VALGRIND} "${CERTTOOL}" --fingerprint --hash sha256 --infile "${srcdir}/funny-spacing.pem"`
+id=`${VALGRIND} "${CERTTOOL}" --fingerprint --hash sha256 --infile "${srcdir}/funny-spacing.pem"| tr -d '\r'`
rc=$?
if test "${id}" != "fc5b45b20c489393a457f177572920ac40bacba9d25cea51200822271eaf7d1f"; then
diff --git a/tests/cert-tests/certtool-long-cn b/tests/cert-tests/certtool-long-cn
index 3e2b585673..dc79b50789 100755
--- a/tests/cert-tests/certtool-long-cn
+++ b/tests/cert-tests/certtool-long-cn
@@ -24,7 +24,7 @@
srcdir="${srcdir:-.}"
CERTTOOL="${CERTTOOL:-../../src/certtool${EXEEXT}}"
-DIFF="${DIFF:-diff}"
+DIFF="${DIFF:-diff -b -B}"
outfile=out.$$.pem
if ! test -z "${VALGRIND}"; then
diff --git a/tests/cert-tests/pathlen b/tests/cert-tests/pathlen
index d940fe8c14..074b0b91eb 100755
--- a/tests/cert-tests/pathlen
+++ b/tests/cert-tests/pathlen
@@ -24,7 +24,7 @@ set -e
srcdir="${srcdir:-.}"
CERTTOOL="${CERTTOOL:-../../src/certtool${EXEEXT}}"
-DIFF="${DIFF:-diff}"
+DIFF="${DIFF:-diff -b -B}"
if ! test -z "${VALGRIND}"; then
VALGRIND="${LIBTOOL:-libtool} --mode=execute ${VALGRIND}"
fi
diff --git a/tests/cert-tests/pem-decoding b/tests/cert-tests/pem-decoding
index a5f612cc77..e85a60c026 100755
--- a/tests/cert-tests/pem-decoding
+++ b/tests/cert-tests/pem-decoding
@@ -24,7 +24,7 @@
srcdir="${srcdir:-.}"
CERTTOOL="${CERTTOOL:-../../src/certtool${EXEEXT}}"
-DIFF="${DIFF:-diff}"
+DIFF="${DIFF:-diff -b -B}"
if ! test -z "${VALGRIND}"; then
VALGRIND="${LIBTOOL:-libtool} --mode=execute ${VALGRIND}"
fi
@@ -48,8 +48,7 @@ if test "${rc}" != "0"; then
exit ${rc}
fi
-#Note that --strip-trailing-cr is used for the test
-#to run on windows platform.
+#FIXME: the output string differs in windows and linux on the last char.
${DIFF} "${srcdir}/bmpstring.pem" tmp-pem.pem || ${DIFF} --strip-trailing-cr "${srcdir}/bmpstring.pem" tmp-pem.pem
rc=$?
diff --git a/tests/cert-tests/pkcs7 b/tests/cert-tests/pkcs7
index d4b754b5c3..3275dbe2a3 100755
--- a/tests/cert-tests/pkcs7
+++ b/tests/cert-tests/pkcs7
@@ -22,7 +22,7 @@
srcdir="${srcdir:-.}"
CERTTOOL="${CERTTOOL:-../../src/certtool${EXEEXT}}"
-DIFF="${DIFF:-diff}"
+DIFF="${DIFF:-diff -b -B}"
if ! test -z "${VALGRIND}"; then
VALGRIND="${LIBTOOL:-libtool} --mode=execute ${VALGRIND} --error-exitcode=15"
fi