From 47f25d9e08d4e102572804a2aed186b01db23c65 Mon Sep 17 00:00:00 2001 From: Nikos Mavrogiannopoulos Date: Wed, 29 Jun 2016 17:31:13 +0200 Subject: tests: use datefudge in name-constraints test This avoids the expiration of the used certificate to affect the test. --- tests/cert-tests/name-constraints | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) 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 -- cgit v1.2.1