export TZ="UTC"
-# Check for datefudge
-TSTAMP=`datefudge "2006-09-23" date -u +%s || true`
-if test "$TSTAMP" != "1158969600" || test "$WINDOWS" = 1; then
-echo $TSTAMP
- echo "You need datefudge to run this test"
- exit 77
-fi
+. ${srcdir}/../scripts/common.sh
+
+check_for_datefudge
cat "${srcdir}/../certs/cert-ecc256.pem" "${srcdir}/../certs/ca-cert-ecc.pem"|datefudge "2012-11-22" \
${VALGRIND} "${CERTTOOL}" --verify-chain
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
+. ${srcdir}/../scripts/common.sh
+
+check_for_datefudge
if ! test -z "${VALGRIND}"; then
VALGRIND="${LIBTOOL:-libtool} --mode=execute ${VALGRIND} --error-exitcode=3"
TMPFILE=md5.$$.tmp
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
+. ${srcdir}/../scripts/common.sh
+
+check_for_datefudge
# Test MD5 signatures
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
+. ${srcdir}/../scripts/common.sh
+
+check_for_datefudge
# Note that in rare cases this test may fail because the
# time set using datefudge could have changed since the generation
TMPFILE=sha3.$$.tmp
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
+. ${srcdir}/../scripts/common.sh
+
+check_for_datefudge
# Note that in rare cases this test may fail because the
# time set using datefudge could have changed since the generation
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
+. ${srcdir}/../scripts/common.sh
+
+check_for_datefudge
# Note that in rare cases this test may fail because the
# time set using datefudge could have changed since the generation
TMPFILE2=tlsfeature-2.$$.tmp
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
+. ${srcdir}/../scripts/common.sh
+
+check_for_datefudge
#
# Test certificate generation
netstat -anl|grep "[\:\.]$PORT" >/dev/null 2>&1;
rc=$?;done;'
+check_for_datefudge() {
+ TSTAMP=`datefudge -s "2006-09-23" date -u +%s || true`
+ if test "$TSTAMP" != "1158969600" || test "$WINDOWS" = 1; then
+ echo $TSTAMP
+ echo "You need datefudge to run this test"
+ exit 77
+ fi
+}
+
fail() {
PID="$1"
shift