summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2015-06-19 22:55:04 +0200
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2015-06-19 22:55:04 +0200
commit01124a3a696940e0d1b1799ca037568873988fe5 (patch)
tree3f5603bd5779a3eea7c0ac645cf63fd41ed1e486
parent77a1a7b3fc0223091c2b81d159778cca3e9f7cd4 (diff)
downloadgnutls-01124a3a696940e0d1b1799ca037568873988fe5.tar.gz
tests: added a verify-chain test case
-rwxr-xr-xtests/cert-tests/certtool19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/cert-tests/certtool b/tests/cert-tests/certtool
index 47a1f95265..25a7e90d5a 100755
--- a/tests/cert-tests/certtool
+++ b/tests/cert-tests/certtool
@@ -77,5 +77,24 @@ if test "${id}" != "fc5b45b20c489393a457f177572920ac40bacba9d25cea51200822271eaf
exit 1
fi
+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
+fi
+
+cat "${srcdir}/../certs/cert-ecc256.pem" "${srcdir}/../certs/ca-cert-ecc.pem"|datefudge "2012-11-22" \
+${VALGRIND} "${CERTTOOL}" --verify-chain
+rc=$?
+
+if test "${rc}" != "0";then
+ echo "There was an issue verifying the chain"
+ exit 1
+fi
+
exit 0