]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
Also use gnutls_timewrapper non-frozen time
authorAndreas Metzler <ametzler@bebt.de>
Sun, 5 Mar 2023 13:17:31 +0000 (14:17 +0100)
committerAndreas Metzler <ametzler@bebt.de>
Tue, 4 Apr 2023 15:56:05 +0000 (17:56 +0200)
also switch timeout/wrapper order

Signed-off-by: Andreas Metzler <ametzler@bebt.de>
33 files changed:
tests/cert-reencoding.sh
tests/cert-tests/cert-critical.sh
tests/cert-tests/certtool-eddsa.sh
tests/cert-tests/certtool-rsa-pss.sh
tests/cert-tests/certtool.sh
tests/cert-tests/krb5-test.sh
tests/cert-tests/othername-test.sh
tests/cert-tests/pkcs1-pad.sh
tests/cert-tests/rsa-pss-pad.sh
tests/cert-tests/sha3-test.sh
tests/cert-tests/template-test.sh
tests/gnutls-cli-debug.sh
tests/gnutls-cli-invalid-crl.sh
tests/gnutls-cli-self-signed.sh
tests/ocsp-tests/ocsp-must-staple-connection.sh
tests/ocsp-tests/ocsp-test.sh
tests/ocsp-tests/ocsp-tls-connection.sh
tests/server-multi-keys.sh
tests/server-weak-keys.sh
tests/suite/testcompat-openssl-cli-compat.sh
tests/suite/testcompat-openssl-cli-no-etm.sh
tests/suite/testcompat-openssl-cli.sh
tests/suite/testcompat-openssl-serv-compat.sh
tests/suite/testcompat-openssl-serv-no-etm.sh
tests/suite/testcompat-openssl-serv-no-safe-renegotiation.sh
tests/suite/testcompat-openssl-serv-no-tickets.sh
tests/suite/testcompat-openssl-serv-safe-renegotiation.sh
tests/suite/testcompat-openssl-serv.sh
tests/suite/testcompat-polarssl-serv-compat.sh
tests/suite/testcompat-polarssl-serv-no-etm.sh
tests/suite/testcompat-polarssl-serv.sh
tests/system-override-profiles.sh
tests/system-override-tls.sh

index fd8bc42a5f21ad3df460fadff6db40c36496419e..804fe5652ac7ba537cb88bf92580187f9edad99b 100755 (executable)
@@ -243,7 +243,7 @@ TESTDATE="2018-03-01 00:00:00"
 # Start OpenSSL TLS server
 #
 launch_bare_server \
-         datefudge "${TESTDATE}" \
+         gnutls_timewrapper_standalone "${TESTDATE}" \
          "${OPENSSL}" s_server -cert ${SERVER_CERT_FILE} -key ${SERVER_KEY_FILE} \
          -CAfile ${CA_FILE} -port ${PORT} -Verify 1 -verify_return_error -www
 SERVER_PID="${!}"
index 5564146a2cd3b13c4f6e066aff06e671fe697e6a..d65a8e9ee2fbacda4f68e3a428f8c08e05d8ffd4 100755 (executable)
@@ -37,7 +37,7 @@ export TZ="UTC"
 
 skip_if_no_datefudge
 
-datefudge "2017-2-28" \
+gnutls_timewrapper_standalone "2017-2-28" \
 ${VALGRIND} "${CERTTOOL}" --verify-chain --infile ${srcdir}/data/chain-with-critical-on-root.pem
 rc=$?
 
@@ -46,7 +46,7 @@ if test "${rc}" != "1"; then
        exit 1
 fi
 
-datefudge "2017-2-28" \
+gnutls_timewrapper_standalone "2017-2-28" \
 ${VALGRIND} "${CERTTOOL}" --verify-chain --infile ${srcdir}/data/chain-with-critical-on-endcert.pem
 rc=$?
 
@@ -55,7 +55,7 @@ if test "${rc}" != "1"; then
        exit 1
 fi
 
-datefudge "2017-2-28" \
+gnutls_timewrapper_standalone "2017-2-28" \
 ${VALGRIND} "${CERTTOOL}" --verify-chain --infile ${srcdir}/data/chain-with-critical-on-intermediate.pem
 rc=$?
 
index ea5cc7f5dbe38755bb9be83e84c41146d615965a..be0c8e5d8d25cebe8ba1f9e8118a18d86d5de9f8 100755 (executable)
@@ -126,7 +126,7 @@ rm -f "${KEYFILE}"
 skip_if_no_datefudge
 
 # Test certificate chain using Ed25519
-datefudge "2017-7-6" \
+gnutls_timewrapper_standalone "2017-7-6" \
 ${VALGRIND} "${CERTTOOL}" --verify-chain --infile ${srcdir}/data/chain-eddsa.pem
 
 if test $? != 0; then
index 1a1aa4e65b5ffec8d968ad879bc7283872a9532e..8dccc4e257f348e2e79336da865176579b80434c 100755 (executable)
@@ -211,7 +211,7 @@ export TZ="UTC"
 
 skip_if_no_datefudge
 
-datefudge "2012-11-22" \
+gnutls_timewrapper_standalone "2012-11-22" \
 ${VALGRIND} "${CERTTOOL}" --verify --load-ca-certificate "${srcdir}/data/cert-rsa-pss.pem" --infile "${srcdir}/data/cert-rsa-pss.pem"
 rc=$?
 
index 11b8b8f6368344797972598a75785c756fc49668..3ec820fad7a28d3cc1bfd5d31e2b0da5fad21130 100755 (executable)
@@ -173,7 +173,7 @@ export TZ="UTC"
 
 skip_if_no_datefudge
 
-cat "${srcdir}/../certs/cert-ecc256.pem" "${srcdir}/../certs/ca-cert-ecc.pem"|datefudge "2012-11-22" \
+cat "${srcdir}/../certs/cert-ecc256.pem" "${srcdir}/../certs/ca-cert-ecc.pem"|gnutls_timewrapper_standalone "2012-11-22" \
 ${VALGRIND} "${CERTTOOL}" --verify-chain
 rc=$?
 
index 7e06fd6e6c6dd6ef9503d5c1b382bb663d633359..401b910d83c7c0839e60453b8f814d32d3d08d23 100755 (executable)
@@ -41,7 +41,7 @@ if ! test -z "${VALGRIND}"; then
 fi
 
 # Note that in rare cases this test may fail because the
-# time set using datefudge could have changed since the generation
+# time set using faketime/datefudge could have changed since the generation
 # (if example the system was busy)
 
 gnutls_timewrapper_standalone static "2007-04-22 00:00:00" \
index 2c365361a6e439c67849b1b79a593774eaf0032e..e8780e77efe743aad74a3ce5f137bc7c10aed086 100755 (executable)
@@ -35,7 +35,7 @@ export TZ="UTC"
 skip_if_no_datefudge
 
 # Note that in rare cases this test may fail because the
-# time set using datefudge could have changed since the generation
+# time set using faketime/datefudge could have changed since the generation
 # (if example the system was busy)
 
 gnutls_timewrapper_standalone static "2007-04-22 00:00:00" \
index 03db104b8d5266f95c610c679f4fd598db9dc73a..f7df8eaaef0c8f74341150fa8553704925b5786f 100755 (executable)
@@ -42,8 +42,8 @@ TMPFILE2=pkcs1-pad-2.$$.tmp
 
 EXPECT1=2002
 
-datefudge "2006-09-23" "${CERTTOOL}" --verify-allow-broken --verify-chain --infile "${srcdir}/data/pkcs1-pad-ok.pem" | tee $TMPFILE1 >/dev/null 2>&1
-datefudge "2006-09-23" "${CERTTOOL}" --verify-allow-broken --verify-chain --infile "${srcdir}/data/pkcs1-pad-broken.pem" | tee $TMPFILE2 >/dev/null 2>&1
+gnutls_timewrapper_standalone "2006-09-23" "${CERTTOOL}" --verify-allow-broken --verify-chain --infile "${srcdir}/data/pkcs1-pad-ok.pem" | tee $TMPFILE1 >/dev/null 2>&1
+gnutls_timewrapper_standalone "2006-09-23" "${CERTTOOL}" --verify-allow-broken --verify-chain --infile "${srcdir}/data/pkcs1-pad-broken.pem" | tee $TMPFILE2 >/dev/null 2>&1
 
 out1oks=`grep 'Verified.' $TMPFILE1 | wc -l | tr -d " "`
 out2oks=`grep 'Verified.' $TMPFILE2 | wc -l | tr -d " "`
@@ -65,8 +65,8 @@ echo "PKCS1-PAD1 OK"
 
 EXPECT2=2002
 
-datefudge "2006-09-23" "${CERTTOOL}" --verify-chain --infile "${srcdir}/data/pkcs1-pad-ok2.pem" | tee $TMPFILE1 >/dev/null 2>&1
-datefudge "2006-09-23" "${CERTTOOL}" --verify-chain --infile "${srcdir}/data/pkcs1-pad-broken2.pem" | tee $TMPFILE2 >/dev/null 2>&1
+gnutls_timewrapper_standalone "2006-09-23" "${CERTTOOL}" --verify-chain --infile "${srcdir}/data/pkcs1-pad-ok2.pem" | tee $TMPFILE1 >/dev/null 2>&1
+gnutls_timewrapper_standalone "2006-09-23" "${CERTTOOL}" --verify-chain --infile "${srcdir}/data/pkcs1-pad-broken2.pem" | tee $TMPFILE2 >/dev/null 2>&1
 
 out1oks=`grep 'Verified.' $TMPFILE1 | wc -l | tr -d " "`
 out2oks=`grep 'Verified.' $TMPFILE2 | wc -l | tr -d " "`
@@ -88,7 +88,7 @@ echo "PKCS1-PAD2 OK"
 # by Andrei Pyshkin, Erik Tews and Ralf-Philipp Weinmann.
 
 
-datefudge "2006-09-23" "${CERTTOOL}" --verify-chain --infile "${srcdir}/data/pkcs1-pad-broken3.pem" | tee $TMPFILE1 >/dev/null 2>&1
+gnutls_timewrapper_standalone "2006-09-23" "${CERTTOOL}" --verify-chain --infile "${srcdir}/data/pkcs1-pad-broken3.pem" | tee $TMPFILE1 >/dev/null 2>&1
 
 out1oks=`grep 'Verified.' $TMPFILE1 | wc -l | tr -d " "`
 out1fails=`grep 'Not verified.' $TMPFILE1 | wc -l | tr -d " "`
index 06a1db54e6056a20a442fff5e5b9e42aadae4646..298de392a3963f382f109d0444d301663cfb8873 100755 (executable)
@@ -35,7 +35,7 @@ export TZ="UTC"
 skip_if_no_datefudge
 
 # Note that in rare cases this test may fail because the
-# time set using datefudge could have changed since the generation
+# time set using faketime/datefudge could have changed since the generation
 # (if example the system was busy)
 
 # Test PSS signatures on certificate
index 0e76d9ce169e3c862014bb4cf232c84811060286..6fd4b0307cd217d73dba8e7a8fb9f1e6838f992b 100755 (executable)
@@ -35,7 +35,7 @@ export TZ="UTC"
 skip_if_no_datefudge
 
 # Note that in rare cases this test may fail because the
-# time set using datefudge could have changed since the generation
+# time set using faketime/datefudge could have changed since the generation
 # (if example the system was busy)
 
 # Test SHA3 signatures
index 26efce45716a8f84d916070b48d16af77255e6f1..1dda7aefd78bbb993f1b194383b49c1ed035d54f 100755 (executable)
@@ -38,7 +38,7 @@ skip_if_no_datefudge
 echo "Running test for ${ac_cv_sizeof_time_t}-byte time_t"
 
 # Note that in rare cases this test may fail because the
-# time set using datefudge could have changed since the generation
+# time set using faketime/datefudge could have changed since the generation
 # (if example the system was busy)
 
 gnutls_timewrapper_standalone static "2007-04-22 00:00:00" \
index 3c3e2214e56f88b06028b17df55f4f3df625c4b5..d4b7700857279cf3d955f585a9c706005a60705f 100755 (executable)
@@ -71,7 +71,7 @@ launch_server --echo --priority "NORMAL:-VERS-ALL:+VERS-TLS1.2:+VERS-TLS1.1" --x
 PID=$!
 wait_server ${PID}
 
-timeout 1800 datefudge "2017-08-9" \
+gnutls_timewrapper_standalone "2017-08-9" timeout 1800 \
 "${DCLI}" -p "${PORT}" localhost >$OUTFILE 2>&1 || fail ${PID} "gnutls-cli-debug run should have succeeded!"
 
 kill ${PID}
@@ -118,7 +118,7 @@ launch_server --echo --priority "NORMAL:-VERS-ALL:+VERS-TLS1.3:+VERS-TLS1.2" --x
 PID=$!
 wait_server ${PID}
 
-timeout 1800 datefudge "2017-08-9" \
+gnutls_timewrapper_standalone "2017-08-9" timeout 1800 \
 "${DCLI}" -p "${PORT}" localhost >$OUTFILE 2>&1 || fail ${PID} "gnutls-cli-debug run should have succeeded!"
 
 kill ${PID}
@@ -160,7 +160,7 @@ launch_server --echo --priority "NORMAL:-VERS-ALL:+VERS-TLS1.3:+VERS-TLS1.2:-RSA
 PID=$!
 wait_server ${PID}
 
-timeout 1800 datefudge "2017-08-9" \
+gnutls_timewrapper_standalone "2017-08-9" timeout 1800 \
 "${DCLI}" -p "${PORT}" localhost >$OUTFILE 2>&1 || fail ${PID} "gnutls-cli-debug run should have succeeded!"
 
 kill ${PID}
@@ -186,7 +186,7 @@ tls-disabled-cipher = CAMELLIA-256-CBC
 _EOF_
 
 GNUTLS_SYSTEM_PRIORITY_FILE="${TMPFILE}" \
-timeout 1800 datefudge "2017-08-9" \
+gnutls_timewrapper_standalone "2017-08-9" timeout 1800 \
 "${DCLI}" -p "${PORT}" localhost >$OUTFILE 2>&1 || fail ${PID} "gnutls-cli-debug run should have succeeded!"
 
 kill ${PID}
@@ -209,7 +209,7 @@ if test "${ENABLE_GOST}" = "1" && test "${GNUTLS_FORCE_FIPS_MODE}" != 1 ; then
        PID=$!
        wait_server ${PID}
 
-       timeout 1800 datefudge "2017-08-9" \
+       gnutls_timewrapper_standalone "2017-08-9" timeout 1800 \
        "${DCLI}" -p "${PORT}" localhost >$OUTFILE 2>&1 || fail ${PID} "gnutls-cli-debug run should have succeeded!"
 
        kill ${PID}
index 32e72630f734c4768ec3b66e5b4678cb1c83599f..5d421481394892194ded848070587e32623f32cf 100755 (executable)
@@ -168,7 +168,7 @@ launch_server --echo --x509keyfile ${TMPFILE} --x509certfile ${TMPFILE}
 PID=$!
 wait_server ${PID}
 
-datefudge "2018-9-19" \
+gnutls_timewrapper_standalone "2018-9-19" \
 ${VALGRIND} "${CLI}" -p "${PORT}" localhost --x509crlfile ${CRLFILE} --x509cafile ${CAFILE} >${TMPFILE} 2>&1 </dev/null && \
        fail ${PID} "1. handshake should have failed!"
 
index 8fd7ea9e47e0c2cb8e56b3cc6a89c9d0172d2b45..30ba64e25e5616899ac124dae762facff9932266 100755 (executable)
@@ -123,7 +123,7 @@ launch_server --echo --x509keyfile ${TMPFILE} --x509certfile ${TMPFILE}
 PID=$!
 wait_server ${PID}
 
-datefudge "2018-1-1" \
+gnutls_timewrapper_standalone "2018-1-1" \
 ${VALGRIND} "${CLI}" -p "${PORT}" localhost >${TMPFILE} 2>&1 </dev/null && \
        fail ${PID} "1. handshake should have failed!"
 
index 0b6204084d5dac0addfb64e5a58c68fb14a8837c..29c115878528c364f5530bb499da2fd899974b4e 100755 (executable)
@@ -129,7 +129,7 @@ cp "${srcdir}/ocsp-tests/certs/ocsp_index.txt.attr" ${ATTRFILE}
 # SO_REUSEADDR usage.
 PORT=${OCSP_PORT}
 launch_bare_server \
-         datefudge "${TESTDATE}" \
+         gnutls_timewrapper_standalone "${TESTDATE}" \
          "${OPENSSL}" ocsp -index "${INDEXFILE}" -text \
          -port "${OCSP_PORT}" \
          -rsigner "${srcdir}/ocsp-tests/certs/ocsp-server.pem" \
@@ -145,7 +145,7 @@ echo "=== Verifying OCSP server is up ==="
 t=0
 while test "${t}" -lt "${SERVER_START_TIMEOUT}"; do
     # Run a test request to make sure the server works
-    datefudge "${TESTDATE}" \
+    gnutls_timewrapper_standalone "${TESTDATE}" \
              ${VALGRIND} "${OCSPTOOL}" --ask \
              --load-cert "${SERVER_CERT_FILE}" \
              --load-issuer "${srcdir}/ocsp-tests/certs/ca.pem" \
@@ -170,7 +170,7 @@ echo "=== Test 1: Server with valid certificate - no staple ==="
 
 PORT=${TLS_SERVER_PORT}
 launch_bare_server \
-         datefudge "${TESTDATE}" \
+         gnutls_timewrapper_standalone "${TESTDATE}" \
          "${SERV}" --echo --disable-client-cert \
          --x509keyfile="${srcdir}/ocsp-tests/certs/server_good.key" \
          --x509certfile="${SERVER_CERT_FILE}" \
@@ -202,7 +202,7 @@ eval "${GETPORT}"
 TLS_SERVER_PORT=$PORT
 PORT=${TLS_SERVER_PORT}
 launch_bare_server \
-         datefudge "${TESTDATE}" \
+         gnutls_timewrapper_standalone "${TESTDATE}" \
          "${SERV}" --echo --disable-client-cert \
          --x509keyfile="${srcdir}/ocsp-tests/certs/server_good.key" \
          --x509certfile="${SERVER_CERT_FILE}" \
@@ -237,7 +237,7 @@ eval "${GETPORT}"
 TLS_SERVER_PORT=$PORT
 PORT=${TLS_SERVER_PORT}
 launch_bare_server \
-         datefudge "${TESTDATE}" \
+         gnutls_timewrapper_standalone "${TESTDATE}" \
          "${SERV}" --echo --disable-client-cert \
          --x509keyfile="${srcdir}/ocsp-tests/certs/server_good.key" \
          --x509certfile="${SERVER_CERT_FILE}" \
@@ -273,7 +273,7 @@ eval "${GETPORT}"
 TLS_SERVER_PORT=$PORT
 PORT=${TLS_SERVER_PORT}
 launch_bare_server \
-         datefudge "${TESTDATE}" \
+         gnutls_timewrapper_standalone "${TESTDATE}" \
          "${SERV}" --echo --disable-client-cert \
          --x509keyfile="${srcdir}/ocsp-tests/certs/server_good.key" \
          --x509certfile="${SERVER_CERT_FILE}" \
@@ -331,7 +331,7 @@ fi
 echo "=== Test 5.1: Server with valid certificate - expired staple (ignoring errors) ==="
 
 launch_bare_server \
-         datefudge "${TESTDATE}" \
+         gnutls_timewrapper_standalone "${TESTDATE}" \
          "${SERV}" --echo --disable-client-cert \
          --x509keyfile="${srcdir}/ocsp-tests/certs/server_good.key" \
          --x509certfile="${SERVER_CERT_FILE}" \
@@ -375,7 +375,7 @@ eval "${GETPORT}"
 TLS_SERVER_PORT=$PORT
 PORT=${TLS_SERVER_PORT}
 launch_bare_server \
-         datefudge "${TESTDATE}" \
+         gnutls_timewrapper_standalone "${TESTDATE}" \
          "${SERV}" --echo --disable-client-cert \
          --x509keyfile="${srcdir}/ocsp-tests/certs/server_good.key" \
          --x509certfile="${SERVER_CERT_FILE}" \
@@ -410,7 +410,7 @@ if test "${GNUTLS_FORCE_FIPS_MODE}" != 1; then
     TLS_SERVER_PORT=$PORT
     PORT=${TLS_SERVER_PORT}
     launch_bare_server \
-       datefudge "${TESTDATE}" \
+       gnutls_timewrapper_standalone "${TESTDATE}" \
        "${SERV}" --echo --disable-client-cert \
        --x509keyfile="${srcdir}/ocsp-tests/certs/server_good.key" \
        --x509certfile="${SERVER_CERT_FILE}" \
@@ -445,7 +445,7 @@ eval "${GETPORT}"
 TLS_SERVER_PORT=$PORT
 PORT=${TLS_SERVER_PORT}
 launch_bare_server \
-         datefudge "${TESTDATE}" \
+         gnutls_timewrapper_standalone "${TESTDATE}" \
          "${SERV}" --echo --disable-client-cert \
          --x509keyfile="${srcdir}/ocsp-tests/certs/server_good.key" \
          --x509certfile="${SERVER_CERT_NO_EXT_FILE}" \
@@ -478,7 +478,7 @@ eval "${GETPORT}"
 TLS_SERVER_PORT=$PORT
 PORT=${TLS_SERVER_PORT}
 launch_bare_server \
-         datefudge "${TESTDATE}" \
+         gnutls_timewrapper_standalone "${TESTDATE}" \
          "${SERV}" --echo --disable-client-cert \
          --x509keyfile="${srcdir}/ocsp-tests/certs/server_good.key" \
          --x509certfile="${SERVER_CERT_FILE}" \
index 0da118bf25963e624424ff6e64a3776de52c55bd..127bcb3afbe3a24ee3bb68fcc32e0b7fa303525e 100755 (executable)
@@ -34,7 +34,7 @@ export TZ="UTC"
 skip_if_no_datefudge
 
 # Note that in rare cases this test may fail because the
-# time set using datefudge could have changed since the generation
+# time set using faketime/datefudge could have changed since the generation
 # (if example the system was busy)
 
 gnutls_timewrapper_standalone static "2016-04-22 00:00:00" \
index 3ff7620894889b2f22669ee08cd45a8cd6d6d091..e59c25f60c0d0b3db52d650abe8db6816c2b83e1 100755 (executable)
@@ -111,7 +111,7 @@ echo "=== Bringing OCSP server up ==="
 # SO_REUSEADDR usage.
 PORT=${OCSP_PORT}
 launch_bare_server \
-         datefudge "${TESTDATE}" \
+         gnutls_timewrapper_standalone "${TESTDATE}" \
          "${OPENSSL}" ocsp -index "${srcdir}/ocsp-tests/certs/ocsp_index.txt" -text \
          -port "${OCSP_PORT}" \
          -rsigner "${srcdir}/ocsp-tests/certs/ocsp-server.pem" \
@@ -127,7 +127,7 @@ echo "=== Verifying OCSP server is up ==="
 t=0
 while test "${t}" -lt "${SERVER_START_TIMEOUT}"; do
     # Run a test request to make sure the server works
-    datefudge "${TESTDATE}" \
+    gnutls_timewrapper_standalone "${TESTDATE}" \
              ${VALGRIND} "${OCSPTOOL}" --ask \
              --load-cert "${SERVER_CERT_FILE}" \
              --load-issuer "${srcdir}/ocsp-tests/certs/ca.pem"
@@ -149,7 +149,7 @@ echo "=== Test 1: Server with valid certificate ==="
 
 PORT=${TLS_SERVER_PORT}
 launch_bare_server \
-         datefudge "${TESTDATE}" \
+         gnutls_timewrapper_standalone "${TESTDATE}" \
          "${SERV}" --echo --disable-client-cert \
          --x509keyfile="${srcdir}/ocsp-tests/certs/server_good.key" \
          --x509certfile="${SERVER_CERT_FILE}" \
@@ -194,7 +194,7 @@ eval "${GETPORT}"
 TLS_SERVER_PORT=$PORT
 
 launch_bare_server \
-         datefudge "${TESTDATE}" \
+         gnutls_timewrapper_standalone "${TESTDATE}" \
          "${SERV}" --echo --disable-client-cert \
          --x509keyfile="${srcdir}/ocsp-tests/certs/server_bad.key" \
          --x509certfile="${SERVER_CERT_FILE}" \
index e76aaa95c59a65746a7440023067d663b1a4962a..43b2cf360a47bf36307b31c5a79e12b57a657056 100755 (executable)
@@ -64,15 +64,15 @@ launch_server --echo --priority "NORMAL:+ECDHE-RSA:+ECDHE-ECDSA" --x509keyfile $
 PID=$!
 wait_server ${PID}
 
-timeout 1800 datefudge "2017-08-9" \
+gnutls_timewrapper_standalone "2017-08-9" timeout 1800 \
 "${CLI}" -p "${PORT}" localhost --x509cafile ${CAFILE} --priority "NORMAL:-KX-ALL:+ECDHE-RSA" </dev/null || \
        fail ${PID} "1. handshake with RSA should have succeeded!"
 
-timeout 1800 datefudge "2017-08-9" \
+gnutls_timewrapper_standalone "2017-08-9" timeout 1800 \
 "${CLI}" -p "${PORT}" localhost --x509cafile ${CAFILE} --priority "NORMAL:-KX-ALL:+ECDHE-ECDSA" </dev/null || \
        fail ${PID} "2. handshake with ECC should have succeeded!"
 
-timeout 1800 datefudge "2017-08-9" \
+gnutls_timewrapper_standalone "2017-08-9" timeout 1800 \
 "${CLI}" -p "${PORT}" localhost --x509cafile ${CAFILE} --priority "NORMAL:-VERS-ALL:+VERS-TLS1.2:-KX-ALL:+ECDHE-RSA:-SIGN-ALL:+SIGN-RSA-SHA256" --save-cert ${TMPFILE} </dev/null || \
        fail ${PID} "3. handshake with RSA should have succeeded!"
 
@@ -81,13 +81,13 @@ if test $? != 0;then
        fail ${PID} "3. the certificate used by server was not the expected"
 fi
 
-timeout 1800 datefudge "2017-08-9" \
+gnutls_timewrapper_standalone "2017-08-9" timeout 1800 \
 "${CLI}" -p "${PORT}" localhost --x509cafile ${CAFILE} --priority "NORMAL:-KX-ALL:+ECDHE-RSA:+SIGN-RSA-SHA256:+SIGN-RSA-PSS-RSAE-SHA256" --save-cert ${TMPFILE} </dev/null || \
        fail ${PID} "4. handshake with RSA should have succeeded!"
 
 
 # check whether the server used the RSA-PSS certificate when we asked for RSA-PSS signature
-timeout 1800 datefudge "2017-08-9" \
+gnutls_timewrapper_standalone "2017-08-9" timeout 1800 \
 "${CLI}" -p "${PORT}" localhost --x509cafile ${CAFILE} --priority "NORMAL:-KX-ALL:+ECDHE-RSA:-SIGN-ALL:+SIGN-RSA-PSS-SHA256" --save-cert ${TMPFILE} </dev/null || \
        fail ${PID} "4. handshake with RSA-PSS and SHA256 should have succeeded!"
 
index 7ae7890eec793d444a42f5c1977586b80988dc76..2eef393eb7b7092b5e7c49b8a1231375e33ae5a6 100755 (executable)
@@ -57,11 +57,11 @@ launch_server --echo --priority "NORMAL" --x509keyfile ${KEY1} --x509certfile ${
 PID=$!
 wait_server ${PID}
 
-timeout 1800 datefudge "2019-12-20" \
+gnutls_timewrapper_standalone "2019-12-20" timeout 1800 \
 "${CLI}" -d 4 -p "${PORT}" localhost --x509cafile ${CERT1} --priority NORMAL:-VERS-TLS-ALL:+VERS-TLS1.2 </dev/null && \
        fail ${PID} "1. handshake with RSA should have failed!"
 
-timeout 1800 datefudge "2019-12-20" \
+gnutls_timewrapper_standalone "2019-12-20" timeout 1800 \
 "${CLI}" -d 4 -p "${PORT}" localhost --x509cafile ${CERT1} --priority NORMAL </dev/null && \
        fail ${PID} "2. handshake with RSA should have failed!"
 
index f3513acb55d27575f79dff50122f6c23d7ca6d44..4c42a58110c5a73a94d6f1ecabd82de10610e5e4 100755 (executable)
@@ -51,12 +51,12 @@ fi
 
 export TZ="UTC"
 
-# Check for datefudge
+# Check for faketime/datefudge
 . "${srcdir}/../scripts/common.sh"
 
 skip_if_no_datefudge
 
-timeout 1800 datefudge "2012-09-02" \
+gnutls_timewrapper_standalone "2012-09-02" timeout 1800 \
 "${srcdir}/testcompat-openssl-cli-common.sh" ":%COMPAT"
 
 ret=$?
index aa941d709246ee7e9eaf53e309c0d9709392af63..78bb2b4eb1f72675a98589f3706909e2ba3962b6 100755 (executable)
@@ -51,12 +51,12 @@ fi
 
 export TZ="UTC"
 
-# Check for datefudge
+# Check for faketime/datefudge
 . "${srcdir}/../scripts/common.sh"
 
 skip_if_no_datefudge
 
-timeout 1800 datefudge "2012-09-02" \
+gnutls_timewrapper_standalone "2012-09-02" timeout 1800 \
 "${srcdir}/testcompat-openssl-cli-common.sh" ":%NO_ETM"
 
 ret=$?
index 3e1b67018eb3f9a7567725c6c0f5ed773f77ca57..d0c6324adacf5194d39c45938a49e77f6f87ee95 100755 (executable)
@@ -51,12 +51,12 @@ fi
 
 export TZ="UTC"
 
-# Check for datefudge
+# Check for faketime/datefudge
 . "${srcdir}/../scripts/common.sh"
 
 skip_if_no_datefudge
 
-timeout 1800 datefudge "2012-09-02" \
+gnutls_timewrapper_standalone "2012-09-02" timeout 1800 \
 "${srcdir}/testcompat-openssl-cli-common.sh"
 
 ret=$?
index 79a2b458e59fd22990e190122abc83d5c6024109..abeed2caed0771ddcaabb5cc86e70de59f425028 100755 (executable)
@@ -51,12 +51,12 @@ fi
 
 export TZ="UTC"
 
-# Check for datefudge
+# Check for faketime/datefudge
 . "${srcdir}/../scripts/common.sh"
 
 skip_if_no_datefudge
 
-timeout 1800 datefudge "2012-09-02" \
+gnutls_timewrapper_standalone "2012-09-02" timeout 1800 \
 "${srcdir}/testcompat-openssl-serv-common.sh" ":%COMPAT"
 
 ret=$?
index 68c540f67f542f1ee18662409138988682a6e2b0..9b79afcf6f21fa20ca0b6ae387b43532df9af029 100755 (executable)
@@ -51,12 +51,12 @@ fi
 
 export TZ="UTC"
 
-# Check for datefudge
+# Check for faketime/datefudge
 . "${srcdir}/../scripts/common.sh"
 
 skip_if_no_datefudge
 
-timeout 1800 datefudge "2012-09-02" \
+gnutls_timewrapper_standalone "2012-09-02" timeout 1800 \
 "${srcdir}/testcompat-openssl-serv-common.sh" ":%NO_ETM"
 
 ret=$?
index 4e71716c54c578aab0e14b59a730c879e44683e6..fee57369d29d0dfe4e8a8d7905083aafaa897253 100755 (executable)
@@ -51,12 +51,12 @@ fi
 
 export TZ="UTC"
 
-# Check for datefudge
+# Check for faketime/datefudge
 . "${srcdir}/../scripts/common.sh"
 
 skip_if_no_datefudge
 
-timeout 1800 datefudge "2012-09-02" \
+gnutls_timewrapper_standalone "2012-09-02" timeout 1800 \
 "${srcdir}/testcompat-openssl-serv-common.sh" ":%DISABLE_SAFE_RENEGOTIATION"
 
 ret=$?
index 137b697b20e22f70fdedecd850d395c853f3156e..eab663c7d88e5ddb723b325c516187c0ede5bbe1 100755 (executable)
@@ -51,12 +51,12 @@ fi
 
 export TZ="UTC"
 
-# Check for datefudge
+# Check for faketime/datefudge
 . "${srcdir}/../scripts/common.sh"
 
 skip_if_no_datefudge
 
-timeout 1800 datefudge "2012-09-02" \
+gnutls_timewrapper_standalone "2012-09-02" timeout 1800 \
 "${srcdir}/testcompat-openssl-serv-common.sh" ":%NO_TICKETS"
 
 ret=$?
index dd866af8883fbd459df6c5b30a78bced2e371e91..e58e20b49d056a815e3db81ef839e2e7e3fab0ff 100755 (executable)
@@ -51,12 +51,12 @@ fi
 
 export TZ="UTC"
 
-# Check for datefudge
+# Check for faketime/datefudge
 . "${srcdir}/../scripts/common.sh"
 
 skip_if_no_datefudge
 
-timeout 1800 datefudge "2012-09-02" \
+gnutls_timewrapper_standalone "2012-09-02" timeout 1800 \
 "${srcdir}/testcompat-openssl-serv-common.sh" ":%SAFE_RENEGOTIATION"
 
 ret=$?
index 788e2abea278500af688a214e39024449b451797..454a1b3f75e12cbae63b66870e63829e14330bb0 100755 (executable)
@@ -51,12 +51,12 @@ fi
 
 export TZ="UTC"
 
-# Check for datefudge
+# Check for faketime/datefudge
 . "${srcdir}/../scripts/common.sh"
 
 skip_if_no_datefudge
 
-timeout 1800 datefudge "2012-09-02" \
+gnutls_timewrapper_standalone "2012-09-02" timeout 1800 \
 "${srcdir}/testcompat-openssl-serv-common.sh"
 
 ret=$?
index 841c3c61ce4c997b75a9cd19d63585710cd5fb28..aee90db4ce0e45574a06e2ff99c07144cf9b769e 100755 (executable)
@@ -39,7 +39,7 @@ if test "${GNUTLS_FORCE_FIPS_MODE}" = 1;then
        exit 77
 fi
 
-# Check for datefudge
+# Check for faketime/datefudge
 . "${srcdir}/../scripts/common.sh"
 
 skip_if_no_datefudge
@@ -50,7 +50,7 @@ if test $? = 0; then
        exit 77
 fi
 
-timeout 1800 datefudge "2012-09-02" \
+gnutls_timewrapper_standalone "2012-09-02" timeout 1800 \
 "${srcdir}/testcompat-polarssl-serv-common.sh" ":%COMPAT"
 
 ret=$?
index d64dbaad284e6a34b17642d7730ef370c29810cc..8212a88a11074429d3cb26ef66d6ce3c25e5618a 100755 (executable)
@@ -39,7 +39,7 @@ if test "${GNUTLS_FORCE_FIPS_MODE}" = 1;then
        exit 77
 fi
 
-# Check for datefudge
+# Check for faketime/datefudge
 . "${srcdir}/../scripts/common.sh"
 
 skip_if_no_datefudge
@@ -50,7 +50,7 @@ if test $? = 0; then
        exit 77
 fi
 
-timeout 1800 datefudge "2012-09-02" \
+gnutls_timewrapper_standalone "2012-09-02" timeout 1800 \
 "${srcdir}/testcompat-polarssl-serv-common.sh" ":%NO_ETM"
 
 ret=$?
index f4ed2ba6d18e073bc7ab4182841c4f3d2a4a528e..f9af51c11a442cd70868176851f61c9053313e19 100755 (executable)
@@ -39,7 +39,7 @@ if test "${GNUTLS_FORCE_FIPS_MODE}" = 1;then
        exit 77
 fi
 
-# Check for datefudge
+# Check for faketime/datefudge
 . "${srcdir}/../scripts/common.sh"
 
 skip_if_no_datefudge
@@ -50,7 +50,7 @@ if test $? = 0; then
        exit 77
 fi
 
-timeout 1800 datefudge "2012-09-02" \
+gnutls_timewrapper_standalone "2012-09-02" timeout 1800 \
 "${srcdir}/testcompat-polarssl-serv-common.sh"
 
 ret=$?
index 1b03bdb59812b4255ccfa74020a24e082f99f92a..409057d97c8ebdc3bca376e1f40453ab30b0a3b3 100755 (executable)
@@ -62,17 +62,17 @@ _EOF_
 export GNUTLS_DEBUG_LEVEL=3
 unset GNUTLS_SYSTEM_PRIORITY_FILE
 
-datefudge "2017-11-22" \
+gnutls_timewrapper_standalone "2017-11-22" \
 "${CLI}" -p "${PORT}" 127.0.0.1 --priority NORMAL --verify-hostname localhost --x509cafile "${srcdir}/certs/ca-cert-ecc.pem" --logfile ${TMPFILE2} </dev/null >/dev/null ||
        fail "expected connection to succeed (1)"
 
 export GNUTLS_SYSTEM_PRIORITY_FILE="${TMPFILE}"
 
-datefudge "2017-11-22" \
+gnutls_timewrapper_standalone "2017-11-22" \
 "${CLI}" -p "${PORT}" 127.0.0.1 --priority NORMAL:%PROFILE_LOW --verify-hostname localhost --x509cafile "${srcdir}/certs/ca-cert-ecc.pem" --logfile ${TMPFILE2} </dev/null >/dev/null ||
        fail "expected connection to succeed (2)"
 
-datefudge "2017-11-22" \
+gnutls_timewrapper_standalone "2017-11-22" \
 "${CLI}" -p "${PORT}" 127.0.0.1 --priority NORMAL:%PROFILE_MEDIUM --verify-hostname localhost --x509cafile "${srcdir}/certs/ca-cert-ecc.pem" --logfile ${TMPFILE2} </dev/null >/dev/null ||
        fail "expected connection to succeed (3)"
 
@@ -85,17 +85,17 @@ _EOF_
 
 unset GNUTLS_SYSTEM_PRIORITY_FILE
 
-datefudge "2017-11-22" \
+gnutls_timewrapper_standalone "2017-11-22" \
 "${CLI}" -p "${PORT}" 127.0.0.1 --priority NORMAL --verify-hostname localhost --x509cafile "${srcdir}/certs/ca-cert-ecc.pem" --logfile ${TMPFILE2} </dev/null >/dev/null ||
        fail "expected connection to succeed (1)"
 
 export GNUTLS_SYSTEM_PRIORITY_FILE="${TMPFILE}"
 
-datefudge "2017-11-22" \
+gnutls_timewrapper_standalone "2017-11-22" \
 "${CLI}" -p "${PORT}" 127.0.0.1 --priority NORMAL:%PROFILE_LOW --verify-hostname localhost --x509cafile "${srcdir}/certs/ca-cert-ecc.pem" --logfile ${TMPFILE2} </dev/null >/dev/null &&
        fail "expected connection to fail (1)"
 
-datefudge "2017-11-22" \
+gnutls_timewrapper_standalone "2017-11-22" \
 "${CLI}" -p "${PORT}" 127.0.0.1 --priority NORMAL:%PROFILE_MEDIUM --verify-hostname localhost --x509cafile "${srcdir}/certs/ca-cert-ecc.pem" --logfile ${TMPFILE2} </dev/null >/dev/null &&
        fail "expected connection to fail (2)"
 
index a0ad3d0e4d8f26b37ec0cd917d8c227d3a715cee..b4623d992767291b8f852751e60e39c7b5edf515 100755 (executable)
@@ -53,11 +53,11 @@ wait_server ${PID}
 #successful case, test whether the ciphers we disable below work
 echo "Sanity testing"
 
-datefudge "2017-11-22" \
+gnutls_timewrapper_standalone "2017-11-22" \
 "${CLI}" -p "${PORT}" 127.0.0.1 --priority NORMAL:-CIPHER-ALL:+AES-128-GCM:-GROUP-ALL:+GROUP-FFDHE2048 --verify-hostname localhost --x509cafile "${srcdir}/certs/ca-cert-ecc.pem" </dev/null >/dev/null ||
        fail ${PID} "stage1: expected connection to succeed (1)"
 
-datefudge "2017-11-22" \
+gnutls_timewrapper_standalone "2017-11-22" \
 "${CLI}" -p "${PORT}" 127.0.0.1 --priority NORMAL:-VERS-ALL:+VERS-TLS1.2:-CIPHER-ALL:+AES-128-CBC:+AES-256-CBC:-MAC-ALL:+SHA1 --verify-hostname localhost --x509cafile "${srcdir}/certs/ca-cert-ecc.pem" </dev/null >/dev/null ||
        fail ${PID} "stage1: expected connection to succeed (2)"
 
@@ -76,43 +76,43 @@ export GNUTLS_SYSTEM_PRIORITY_FILE
 
 echo "Testing TLS1.3"
 echo " * sanity"
-datefudge "2017-11-22" \
+gnutls_timewrapper_standalone "2017-11-22" \
 "${CLI}" -p "${PORT}" 127.0.0.1 --priority NORMAL --verify-hostname localhost --x509cafile "${srcdir}/certs/ca-cert-ecc.pem" </dev/null >/dev/null ||
        fail ${PID} "stage2: expected connection to succeed (1)"
 
 echo " * fallback to good options"
-datefudge "2017-11-22" \
+gnutls_timewrapper_standalone "2017-11-22" \
 "${CLI}" -p "${PORT}" 127.0.0.1 --priority NORMAL:-CIPHER-ALL:+AES-128-GCM:+AES-256-GCM:-GROUP-ALL:+GROUP-FFDHE2048:+GROUP-FFDHE3072 --verify-hostname localhost --x509cafile "${srcdir}/certs/ca-cert-ecc.pem" </dev/null >/dev/null ||
        fail ${PID} "stage2: expected connection to succeed (2)"
 
 echo " * disabled cipher"
-datefudge "2017-11-22" \
+gnutls_timewrapper_standalone "2017-11-22" \
 "${CLI}" -p "${PORT}" 127.0.0.1 --priority NORMAL:-CIPHER-ALL:+AES-128-GCM --verify-hostname localhost --x509cafile "${srcdir}/certs/ca-cert-ecc.pem" </dev/null && #>/dev/null &&
        fail ${PID} "stage2: expected connection to fail (1)"
 
 echo " * disabled group"
-datefudge "2017-11-22" \
+gnutls_timewrapper_standalone "2017-11-22" \
 "${CLI}" -p "${PORT}" 127.0.0.1 --priority NORMAL:-GROUP-ALL:+GROUP-FFDHE2048 --verify-hostname localhost --x509cafile "${srcdir}/certs/ca-cert-ecc.pem" </dev/null >/dev/null &&
        fail ${PID} "stage2: expected connection to fail (2)"
 
 echo "Testing TLS1.2"
 echo " * sanity"
-datefudge "2017-11-22" \
+gnutls_timewrapper_standalone "2017-11-22" \
 "${CLI}" -p "${PORT}" 127.0.0.1 --priority NORMAL:-VERS-ALL:+VERS-TLS1.2 --verify-hostname localhost --x509cafile "${srcdir}/certs/ca-cert-ecc.pem" </dev/null >/dev/null ||
        fail ${PID} "stage3: expected connection to succeed (1)"
 
 echo " * fallback to good options"
-datefudge "2017-11-22" \
+gnutls_timewrapper_standalone "2017-11-22" \
 "${CLI}" -p "${PORT}" 127.0.0.1 --priority NORMAL:-VERS-ALL:+VERS-TLS1.2:-CIPHER-ALL:+AES-128-CBC:+AES-256-CBC:+AES-256-GCM:-MAC-ALL:+SHA1:+AEAD --verify-hostname localhost --x509cafile "${srcdir}/certs/ca-cert-ecc.pem" </dev/null >/dev/null ||
        fail ${PID} "stage3: expected connection to succeed (2)"
 
 echo " * disabled cipher"
-datefudge "2017-11-22" \
+gnutls_timewrapper_standalone "2017-11-22" \
 "${CLI}" -p "${PORT}" 127.0.0.1 --priority NORMAL:-VERS-ALL:+VERS-TLS1.2:-CIPHER-ALL:+AES-128-CBC --verify-hostname localhost --x509cafile "${srcdir}/certs/ca-cert-ecc.pem" </dev/null >/dev/null &&
        fail ${PID} "stage3: expected connection to fail (1)"
 
 echo " * disabled MAC"
-datefudge "2017-11-22" \
+gnutls_timewrapper_standalone "2017-11-22" \
 "${CLI}" -p "${PORT}" 127.0.0.1 --priority NORMAL:-VERS-ALL:+VERS-TLS1.2:-MAC-ALL:+SHA1 --verify-hostname localhost --x509cafile "${srcdir}/certs/ca-cert-ecc.pem" </dev/null >/dev/null &&
        fail ${PID} "stage3: expected connection to fail (2)"