summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@redhat.com>2016-06-29 17:31:13 +0200
committerNikos Mavrogiannopoulos <nmav@redhat.com>2016-06-29 17:31:13 +0200
commit47f25d9e08d4e102572804a2aed186b01db23c65 (patch)
treea5b371d6609205d7ab0ebfa157ebceb9a3acd856
parent6c5452a4f6c938b23a0a5f63572ab55541035a7f (diff)
downloadgnutls-47f25d9e08d4e102572804a2aed186b01db23c65.tar.gz
tests: use datefudge in name-constraints test
This avoids the expiration of the used certificate to affect the test.
-rwxr-xr-xtests/cert-tests/name-constraints13
1 files changed, 12 insertions, 1 deletions
diff --git a/tests/cert-tests/name-constraints b/tests/cert-tests/name-constraints
index 05d6e9b3ab..59af00f3d2 100755
--- a/tests/cert-tests/name-constraints
+++ b/tests/cert-tests/name-constraints
@@ -28,7 +28,18 @@ if ! test -z "${VALGRIND}"; then
fi
TMPFILE=tmp.$$.pem
-${VALGRIND} "${CERTTOOL}" -e --infile "${srcdir}/name-constraints-ip.pem"
+export TZ="UTC"
+
+# Check for datefudge
+TSTAMP=`datefudge -s "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
+
+datefudge -s "2016-04-22" \
+ ${VALGRIND} "${CERTTOOL}" -e --infile "${srcdir}/name-constraints-ip.pem"
rc=$?
if test "${rc}" != "0"; then