]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
Use gnutls_timewrapper for static (frozen time) instances
authorAndreas Metzler <ametzler@bebt.de>
Sun, 5 Mar 2023 10:29:17 +0000 (11:29 +0100)
committerAndreas Metzler <ametzler@bebt.de>
Tue, 4 Apr 2023 15:56:05 +0000 (17:56 +0200)
Also switch setsid/wrapper order

Signed-off-by: Andreas Metzler <ametzler@bebt.de>
32 files changed:
tests/cert-reencoding.sh
tests/cert-tests/alt-chain.sh
tests/cert-tests/cert-non-digits-time.sh
tests/cert-tests/certtool-verify-profiles.sh
tests/cert-tests/crl.sh
tests/cert-tests/crq.sh
tests/cert-tests/inhibit-anypolicy.sh
tests/cert-tests/invalid-sig.sh
tests/cert-tests/krb5-test.sh
tests/cert-tests/md5-test.sh
tests/cert-tests/name-constraints.sh
tests/cert-tests/othername-test.sh
tests/cert-tests/pkcs7-cat.sh
tests/cert-tests/pkcs7-constraints.sh
tests/cert-tests/pkcs7-constraints2.sh
tests/cert-tests/pkcs7.sh
tests/cert-tests/rsa-pss-pad.sh
tests/cert-tests/sha3-test.sh
tests/cert-tests/smime.sh
tests/cert-tests/template-exts-test.sh
tests/cert-tests/template-policy-test.sh
tests/cert-tests/template-test.sh
tests/cert-tests/tlsfeature-test.sh
tests/certtool-pkcs11.sh
tests/ocsp-tests/ocsp-load-chain.sh
tests/ocsp-tests/ocsp-must-staple-connection.sh
tests/ocsp-tests/ocsp-signer-verify.sh
tests/ocsp-tests/ocsp-test.sh
tests/ocsp-tests/ocsp-tls-connection.sh
tests/pkcs7-cat.sh
tests/rsa-md5-collision/rsa-md5-collision.sh
tests/testpkcs11.sh

index 50d62d3bcb615ba1561b0cf27a8e50fb9f916b7c..fd8bc42a5f21ad3df460fadff6db40c36496419e 100755 (executable)
@@ -249,7 +249,7 @@ launch_bare_server \
 SERVER_PID="${!}"
 wait_server "${SERVER_PID}"
 
-datefudge -s "${TESTDATE}" \
+gnutls_timewrapper_standalone static "${TESTDATE}" \
       "${CLI}" --x509certfile ${CLIENT_CERT_FILE} \
       --x509keyfile ${CLIENT_KEY_FILE} --x509cafile=${CA_FILE} \
       --port="${PORT}" localhost </dev/null
index 564e614604489b2c7252a76000217adc32c89519..177570e5814b16c1fd0c2f859a77b3e37a15bcff 100755 (executable)
@@ -41,7 +41,7 @@ OLD_CA_FILE="${srcdir}/data/alt-chain-old-ca.pem"
 NEW_CA_FILE="${srcdir}/data/alt-chain-new-ca.pem"
 
 echo ""
-datefudge -s "2017-05-10 00:00:00" \
+gnutls_timewrapper_standalone static "2017-05-10 00:00:00" \
 ${VALGRIND} "${CERTTOOL}" --load-ca-certificate ${OLD_CA_FILE} --verify-hostname www.google.com --verify --infile "${srcdir}/data/alt-chain.pem" >${OUTFILE}
 rc=$?
 
@@ -52,7 +52,7 @@ if test "${rc}" != "1"; then
 fi
 
 echo ""
-datefudge -s "2017-05-10 00:00:00" \
+gnutls_timewrapper_standalone static "2017-05-10 00:00:00" \
 ${VALGRIND} "${CERTTOOL}" --load-ca-certificate ${NEW_CA_FILE} --verify-hostname www.google.com --verify --infile "${srcdir}/data/alt-chain.pem" >${OUTFILE}
 rc=$?
 
index e21e63863722c51daae3887cf945bab782898f3e..930cedd09a75cb1ddfc7d64ee9944c7cdfe3de8b 100755 (executable)
@@ -34,7 +34,7 @@ fi
 skip_if_no_datefudge
 
 # Check whether certificates with non-digits time fields are accepted
-datefudge -s "2019-12-19 00:00:00" \
+gnutls_timewrapper_standalone static "2019-12-19 00:00:00" \
 ${VALGRIND}"${CERTTOOL}" --verify --load-ca-certificate "${srcdir}/data/cert-with-non-digits-time-ca.pem" --infile "${srcdir}/data/cert-with-non-digits-time.pem"
 rc=$?
 
index 91ef81c91e5bd1886ada2a81c3d71a2fa45fe007..862b4459c40721ffba7a2ac4f72873e727f75232 100755 (executable)
@@ -38,7 +38,7 @@ OUTFILE=out-pkcs7.$$.tmp
 skip_if_no_datefudge
 
 echo "Checking chain with insecure leaf"
-datefudge -s "2019-12-19 00:00:00" \
+gnutls_timewrapper_standalone static "2019-12-19 00:00:00" \
 ${VALGRIND} "${CERTTOOL}" --verify-chain --verify-profile=medium --infile "${srcdir}/data/chain-512-leaf.pem" >${OUTFILE}
 rc=$?
 
@@ -49,7 +49,7 @@ if test "${rc}" != "1"; then
 fi
 
 echo "Checking chain with insecure subca"
-datefudge -s "2019-12-19 00:00:00" \
+gnutls_timewrapper_standalone static "2019-12-19 00:00:00" \
 ${VALGRIND} "${CERTTOOL}" --verify-chain --verify-profile=medium --infile "${srcdir}/data/chain-512-subca.pem" >${OUTFILE}
 rc=$?
 
@@ -61,7 +61,7 @@ fi
 
 
 echo "Checking chain with insecure ca"
-datefudge -s "2019-12-19 00:00:00" \
+gnutls_timewrapper_standalone static "2019-12-19 00:00:00" \
 ${VALGRIND} "${CERTTOOL}" --verify-chain --verify-profile=medium --infile "${srcdir}/data/chain-512-ca.pem" >${OUTFILE}
 rc=$?
 
index 6a02a429d1d023caa8d3dee33094af9a1d2e600f..d097017473059fb145b92cbdcce052cc90461ff6 100755 (executable)
@@ -172,7 +172,7 @@ export TZ="UTC"
 
 skip_if_no_datefudge
 
-datefudge -s "2020-01-20 10:00:00" ${VALGRIND} \
+gnutls_timewrapper_standalone static "2020-01-20 10:00:00" ${VALGRIND} \
        "${CERTTOOL}" --generate-crl --load-ca-privkey "${srcdir}/data/template-test.key" \
        --load-ca-certificate "${srcdir}/data/template-test.pem" \
        --load-certificate "${srcdir}/data/ca-certs.pem" --template \
@@ -194,7 +194,7 @@ fi
 
 if test "${ac_cv_sizeof_time_t}" = 8;then
        # we should test that on systems which have 64-bit time_t
-       datefudge -s "2138-01-20 10:00:00" ${VALGRIND} \
+       gnutls_timewrapper_standalone static "2138-01-20 10:00:00" ${VALGRIND} \
                "${CERTTOOL}" --generate-crl --load-ca-privkey "${srcdir}/data/template-test.key" \
                --load-ca-certificate "${srcdir}/data/template-test.pem" \
                --load-certificate "${srcdir}/data/ca-certs.pem" --template \
index 7533168908c30e5f38ef7562012412f6d60a8066..d555fdb28927be9c0937c46013ecbbdaeefa0d28 100755 (executable)
@@ -59,7 +59,7 @@ fi
 rm -f "${OUTFILE}"
 
 # check whether the honor_crq_extension option works
-datefudge -s "2007-04-22 00:00:00" \
+gnutls_timewrapper_standalone static "2007-04-22 00:00:00" \
        "${CERTTOOL}" --generate-request \
                --load-privkey "${srcdir}/data/template-test.key" \
                --template "${srcdir}/templates/template-tlsfeature.tmpl" \
@@ -78,7 +78,7 @@ if grep -v '^-----BEGIN [A-Z0-9 ]\+-----$' ${TMPFILE} | grep -v '^[A-Za-z0-9/+=]
        exit 1
 fi
 
-datefudge -s "2007-04-22 00:00:00" \
+gnutls_timewrapper_standalone static "2007-04-22 00:00:00" \
        "${CERTTOOL}" --generate-certificate \
                --load-ca-privkey "${srcdir}/data/template-test.key" \
                --load-ca-certificate "${srcdir}/data/template-tlsfeature.pem" \
@@ -130,8 +130,8 @@ N
 N
 __EOF__
 
+gnutls_timewrapper_standalone static "2007-04-22 00:00:00" \
 setsid \
-datefudge -s "2007-04-22 00:00:00" \
        "${CERTTOOL}" -q \
                --load-privkey "${srcdir}/data/template-test.key" \
                --outfile "${OUTFILE}" <$TMPFILE 2>/dev/null
@@ -147,7 +147,7 @@ if test "${rc}" != "0"; then
 fi
 
 # check whether the generation with extension works
-datefudge -s "2007-04-22 00:00:00" \
+gnutls_timewrapper_standalone static "2007-04-22 00:00:00" \
        "${CERTTOOL}" --generate-request \
                --load-privkey "${srcdir}/data/template-test.key" \
                --template "${srcdir}/templates/arb-extensions.tmpl" \
@@ -168,7 +168,7 @@ if test "${rc}" != "0"; then
 fi
 
 # Generate certificate from CRQ with no explicit extensions
-datefudge -s "2007-04-22 00:00:00" \
+gnutls_timewrapper_standalone static "2007-04-22 00:00:00" \
        "${CERTTOOL}" --generate-certificate \
                --load-ca-privkey "${srcdir}/../../doc/credentials/x509/ca-key.pem" \
                --load-ca-certificate "${srcdir}/../../doc/credentials/x509/ca.pem" \
@@ -191,7 +191,7 @@ if test "${rc}" != "0"; then
 fi
 
 # Generate certificate from CRQ with CRQ extensions
-datefudge -s "2007-04-22 00:00:00" \
+gnutls_timewrapper_standalone static "2007-04-22 00:00:00" \
        "${CERTTOOL}" --generate-certificate \
                --load-ca-privkey "${srcdir}/../../doc/credentials/x509/ca-key.pem" \
                --load-ca-certificate "${srcdir}/../../doc/credentials/x509/ca.pem" \
@@ -214,7 +214,7 @@ if test "${rc}" != "0"; then
 fi
 
 # Generate certificate from CRQ with explicit extensions
-datefudge -s "2007-04-22 00:00:00" \
+gnutls_timewrapper_standalone static "2007-04-22 00:00:00" \
        "${CERTTOOL}" --generate-certificate \
                --load-ca-privkey "${srcdir}/../../doc/credentials/x509/ca-key.pem" \
                --load-ca-certificate "${srcdir}/../../doc/credentials/x509/ca.pem" \
index 1df91c00e9b419ba40ac2ae02285152f8faf5c0a..398350da037208d632d4f708133a7d6d9c22362e 100755 (executable)
@@ -37,7 +37,7 @@ SUBCAFILE=inhibit-subca.$$.tmp
 
 skip_if_no_datefudge
 
-datefudge -s "2017-04-22 00:00:00" \
+gnutls_timewrapper_standalone static "2017-04-22 00:00:00" \
        "${CERTTOOL}" --generate-self-signed \
                --load-privkey "${srcdir}/data/key-ca.pem" \
                --template "${srcdir}/templates/inhibit-anypolicy.tmpl" \
@@ -56,7 +56,7 @@ fi
 echo ca > $TEMPLFILE
 echo "cn = sub-CA" >> $TEMPLFILE
 
-datefudge -s "2017-04-23 00:00:00" \
+gnutls_timewrapper_standalone static "2017-04-23 00:00:00" \
 "${CERTTOOL}" -d 2 --generate-certificate --template $TEMPLFILE \
        --load-ca-privkey "${srcdir}/data/key-ca.pem" \
        --load-ca-certificate $CAFILE \
@@ -71,7 +71,7 @@ fi
 cat $SUBCAFILE $CAFILE > ${TMPFILE}
 
 # we do not support the inhibit any policy extension for verification
-datefudge -s "2017-04-25 00:00:00" "${CERTTOOL}" --verify-chain --infile ${TMPFILE}
+gnutls_timewrapper_standalone static "2017-04-25 00:00:00" "${CERTTOOL}" --verify-chain --infile ${TMPFILE}
 rc=$?
 if test "$rc" != "0"; then
        echo "Verification failed unexpectedly ($rc)"
index 1aae3fd40edfd232a5d5965a1b88a6d610ffabc9..663cf5b737dbbda08882ba41c74c20eed71899b9 100755 (executable)
@@ -84,19 +84,16 @@ if test $rc = 0; then
        exit 1
 fi
 
-if check_for_datefudge; then
-       #this was causing a double free; verify that we receive the expected error code
-       datefudge -s "2020-01-01 00:00:00" \
-       ${VALGRIND} "${CERTTOOL}" --verify-chain --infile "${srcdir}/data/cve-2019-3829.pem"
-       rc=$?
-
-       # We're done.
-       if test $rc != 1; then
-               echo "Verification of invalid signature (6) failed"
-               exit 1
-       fi
-else
-       echo "Verification of invalid signature (6) skipped"
+skip_if_no_datefudge
+#this was causing a double free; verify that we receive the expected error code
+gnutls_timewrapper_standalone static "2020-01-01 00:00:00" \
+${VALGRIND} "${CERTTOOL}" --verify-chain --infile "${srcdir}/data/cve-2019-3829.pem"
+rc=$?
+
+# We're done.
+if test $rc != 1; then
+       echo "Verification of invalid signature (6) failed"
+       exit 1
 fi
 
 exit 0
index ee1af0f2ed91424533d1ce5c80de30c2d6272a27..7e06fd6e6c6dd6ef9503d5c1b382bb663d633359 100755 (executable)
@@ -44,7 +44,7 @@ fi
 # time set using datefudge could have changed since the generation
 # (if example the system was busy)
 
-datefudge -s "2007-04-22 00:00:00" \
+gnutls_timewrapper_standalone static "2007-04-22 00:00:00" \
        "${CERTTOOL}" --generate-self-signed \
                --load-privkey "${srcdir}/data/template-test.key" \
                --template "${srcdir}/templates/template-krb5name.tmpl" \
@@ -70,7 +70,7 @@ fi
 cp "${srcdir}/templates/template-krb5name.tmpl" ${TMPLFILE}
 echo "krb5_principal = 'xxxxxxxxxxxxxx'" >>${TMPLFILE}
 
-datefudge -s "2007-04-22 00:00:00" \
+gnutls_timewrapper_standalone static "2007-04-22 00:00:00" \
 ${VALGRIND} "${CERTTOOL}" --generate-self-signed \
                --load-privkey "${srcdir}/data/template-test.key" \
                --template ${TMPLFILE} \
@@ -87,7 +87,7 @@ fi
 cp "${srcdir}/templates/template-krb5name.tmpl" ${TMPLFILE}
 echo "krb5_principal = 'comp1/comp2/comp3/comp4/comp5/comp6/comp7/comp8/comp9/comp10@REALM.COM'" >>${TMPLFILE}
 
-datefudge -s "2007-04-22 00:00:00" \
+gnutls_timewrapper_standalone static "2007-04-22 00:00:00" \
 ${VALGRIND} "${CERTTOOL}" --generate-self-signed \
                --load-privkey "${srcdir}/data/template-test.key" \
                --template ${TMPLFILE} \
index d8c830f65c9747eee5554e3056b2de0c3a954d23..c6f955a737917095fa6adf49f14a4e9f2b82fbb5 100755 (executable)
@@ -37,7 +37,7 @@ skip_if_no_datefudge
 
 # Test MD5 signatures
 
-datefudge -s "2016-04-15 00:00:00" \
+gnutls_timewrapper_standalone static "2016-04-15 00:00:00" \
        "${CERTTOOL}" --verify-chain --infile "${srcdir}/data/chain-md5.pem" >/dev/null 2>&1
 rc=$?
 if test "${rc}" != "1"; then
@@ -45,7 +45,7 @@ if test "${rc}" != "1"; then
        exit ${rc}
 fi
 
-datefudge -s "2016-04-15 00:00:00" \
+gnutls_timewrapper_standalone static "2016-04-15 00:00:00" \
        "${CERTTOOL}" --verify-allow-broken --verify-chain --infile "${srcdir}/data/chain-md5.pem" >/dev/null 2>&1
 rc=$?
 if test "${rc}" != "0"; then
index be7f9dfc767d4bb38ec7488a97d7e7a0b3bbb2ea..8cf002ecf438f8cd10f4e29a929a0433978533f8 100755 (executable)
@@ -37,7 +37,7 @@ TMPFILE=constraints.$$.pem.tmp
 
 skip_if_no_datefudge
 
-datefudge -s "2016-04-22 00:00:00" \
+gnutls_timewrapper_standalone static "2016-04-22 00:00:00" \
        ${VALGRIND} "${CERTTOOL}" --verify-allow-broken -e --infile "${srcdir}/data/name-constraints-ip.pem"
 rc=$?
 
index ce5be4c84bdfe540d45c3ff14e1c277a87009cd9..2c365361a6e439c67849b1b79a593774eaf0032e 100755 (executable)
@@ -38,7 +38,7 @@ skip_if_no_datefudge
 # time set using datefudge could have changed since the generation
 # (if example the system was busy)
 
-datefudge -s "2007-04-22 00:00:00" \
+gnutls_timewrapper_standalone static "2007-04-22 00:00:00" \
        "${CERTTOOL}" --generate-self-signed \
                --load-privkey "${srcdir}/data/template-test.key" \
                --template "${srcdir}/templates/template-othername.tmpl" \
@@ -53,7 +53,7 @@ if test "${rc}" != "0"; then
        exit ${rc}
 fi
 
-datefudge -s "2007-04-22 00:00:00" \
+gnutls_timewrapper_standalone static "2007-04-22 00:00:00" \
        "${CERTTOOL}" --generate-self-signed \
                --load-privkey "${srcdir}/data/template-test.key" \
                --template "${srcdir}/templates/template-othername-xmpp.tmpl" \
index 643b724dee11d41a5703ce5a565f7e75f135d040..50f3bc5e7343495200dff23ec8a487d53a3bbc8d 100755 (executable)
@@ -36,7 +36,7 @@ OUTFILE=out-pkcs7.$$.tmp
 . ${srcdir}/../scripts/common.sh
 
 skip_if_no_datefudge
-datefudge -s "2016-10-01 00:00:00" \
+gnutls_timewrapper_standalone static "2016-10-01 00:00:00" \
 ${VALGRIND} "${CERTTOOL}" --verify-allow-broken --p7-verify --inder --infile "${srcdir}/data/pkcs7-cat.p7" --load-ca-certificate "${srcdir}/data/pkcs7-cat-ca.pem" 
 rc=$?
 
index aef86b553dd28c6180f7a69fcdf4c4d9f5ea559f..7587c3a946cabe86c238fc07217bbc7717e3a728 100755 (executable)
@@ -51,7 +51,7 @@ fi
 FILE="signing-verify-no-purpose"
 echo ""
 echo "test: $FILE"
-datefudge -s "2015-01-10 00:00:00" \
+gnutls_timewrapper_standalone static "2015-01-10 00:00:00" \
 ${VALGRIND} "${CERTTOOL}" --p7-verify --load-ca-certificate "${srcdir}/data/code-signing-ca.pem" <"${OUTFILE}"
 rc=$?
 
@@ -63,7 +63,7 @@ fi
 FILE="signing-verify-valid-purpose"
 echo ""
 echo "test: $FILE"
-datefudge -s "2015-01-10 00:00:00" \
+gnutls_timewrapper_standalone static "2015-01-10 00:00:00" \
 ${VALGRIND} "${CERTTOOL}" --verify-purpose 1.3.6.1.5.5.7.3.3 --p7-verify --load-ca-certificate "${srcdir}/data/code-signing-ca.pem" <"${OUTFILE}"
 rc=$?
 
@@ -75,7 +75,7 @@ fi
 FILE="signing-verify-invalid-purpose"
 echo ""
 echo "test: $FILE"
-datefudge -s "2015-01-10 00:00:00" \
+gnutls_timewrapper_standalone static "2015-01-10 00:00:00" \
 ${VALGRIND} "${CERTTOOL}" --verify-purpose 1.3.6.1.5.5.7.3.1 --p7-verify --load-ca-certificate "${srcdir}/data/code-signing-ca.pem" <"${OUTFILE}"
 rc=$?
 
@@ -87,7 +87,7 @@ fi
 FILE="signing-verify-invalid-date-1"
 echo ""
 echo "test: $FILE"
-datefudge -s "2011-01-10 00:00:00" \
+gnutls_timewrapper_standalone static "2011-01-10 00:00:00" \
 ${VALGRIND} "${CERTTOOL}" --verify-purpose 1.3.6.1.5.5.7.3.3 --p7-verify --load-ca-certificate "${srcdir}/data/code-signing-ca.pem" <"${OUTFILE}"
 rc=$?
 
@@ -99,7 +99,7 @@ fi
 FILE="signing-verify-invalid-date-2"
 echo ""
 echo "test: $FILE"
-datefudge -s "2018-01-10 00:00:00" \
+gnutls_timewrapper_standalone static "2018-01-10 00:00:00" \
 ${VALGRIND} "${CERTTOOL}" --verify-purpose 1.3.6.1.5.5.7.3.3 --p7-verify --load-ca-certificate "${srcdir}/data/code-signing-ca.pem" <"${OUTFILE}"
 rc=$?
 
index 648e95a8458f745cd71c61b9a65c7af344558b32..609bcb7786b92bce0799f296ea0b452068841eec 100755 (executable)
@@ -51,7 +51,7 @@ fi
 FILE="signing-verify-no-purpose"
 echo ""
 echo "test: $FILE"
-datefudge -s "2015-01-10 00:00:00" \
+gnutls_timewrapper_standalone static "2015-01-10 00:00:00" \
 ${VALGRIND} "${CERTTOOL}" --p7-verify --load-certificate "${srcdir}/data/code-signing-cert.pem" <"${OUTFILE}"
 rc=$?
 
@@ -63,7 +63,7 @@ fi
 FILE="signing-verify-valid-purpose"
 echo ""
 echo "test: $FILE"
-datefudge -s "2015-01-10 00:00:00" \
+gnutls_timewrapper_standalone static "2015-01-10 00:00:00" \
 ${VALGRIND} "${CERTTOOL}" --verify-purpose 1.3.6.1.5.5.7.3.3 --p7-verify --load-certificate "${srcdir}/data/code-signing-cert.pem" <"${OUTFILE}"
 rc=$?
 
@@ -75,7 +75,7 @@ fi
 FILE="signing-verify-invalid-purpose"
 echo ""
 echo "test: $FILE"
-datefudge -s "2015-01-10 00:00:00" \
+gnutls_timewrapper_standalone static "2015-01-10 00:00:00" \
 ${VALGRIND} "${CERTTOOL}" --verify-purpose 1.3.6.1.5.5.7.3.1 --p7-verify --load-certificate "${srcdir}/data/code-signing-cert.pem" <"${OUTFILE}"
 rc=$?
 
@@ -87,7 +87,7 @@ fi
 FILE="signing-verify-invalid-date-1"
 echo ""
 echo "test: $FILE"
-datefudge -s "2011-01-10 00:00:00" \
+gnutls_timewrapper_standalone static "2011-01-10 00:00:00" \
 ${VALGRIND} "${CERTTOOL}" --verify-purpose 1.3.6.1.5.5.7.3.3 --p7-verify --load-certificate "${srcdir}/data/code-signing-cert.pem" <"${OUTFILE}"
 rc=$?
 
@@ -99,7 +99,7 @@ fi
 FILE="signing-verify-invalid-date-2"
 echo ""
 echo "test: $FILE"
-datefudge -s "2018-01-10 00:00:00" \
+gnutls_timewrapper_standalone static "2018-01-10 00:00:00" \
 ${VALGRIND} "${CERTTOOL}" --verify-purpose 1.3.6.1.5.5.7.3.3 --p7-verify --load-certificate "${srcdir}/data/code-signing-cert.pem" <"${OUTFILE}"
 rc=$?
 
index 65bb45cb8a3f237b2f142218cceb514b3c244770..e1bf8745525757500242268e96833a7110f28cde 100755 (executable)
@@ -80,7 +80,7 @@ fi
 
 for FILE in full.p7b openssl.p7b openssl-keyid.p7b; do
 # check validation with date prior to CA issuance
-datefudge -s "2011-01-10 00:00:00" \
+gnutls_timewrapper_standalone static "2011-01-10 00:00:00" \
 ${VALGRIND} "${CERTTOOL}" --inder --p7-verify --load-ca-certificate "${srcdir}/../../doc/credentials/x509/ca.pem" --infile "${srcdir}/data/${FILE}" >"${OUTFILE}"
 rc=$?
 
@@ -90,7 +90,7 @@ if test "${rc}" = "0"; then
 fi
 
 # check validation with date prior to intermediate cert issuance
-env TZ=UTC datefudge -s "2011-05-28 08:38:00" \
+env TZ=UTC gnutls_timewrapper_standalone static "2011-05-28 08:38:00" \
 ${VALGRIND} "${CERTTOOL}" --inder --p7-verify --load-ca-certificate "${srcdir}/../../doc/credentials/x509/ca.pem" --infile "${srcdir}/data/${FILE}" >"${OUTFILE}"
 rc=$?
 
@@ -100,7 +100,7 @@ if test "${rc}" = "0"; then
 fi
 
 # check validation with date after intermediate cert issuance
-datefudge -s "2038-10-13 00:00:00" \
+gnutls_timewrapper_standalone static "2038-10-13 00:00:00" \
 ${VALGRIND} "${CERTTOOL}" --inder --p7-verify --load-ca-certificate "${srcdir}/../../doc/credentials/x509/ca.pem" --infile "${srcdir}/data/${FILE}" >"${OUTFILE}"
 rc=$?
 
index aa2a9003459d9add338d7284e5abac6df6fa3211..06a1db54e6056a20a442fff5e5b9e42aadae4646 100755 (executable)
@@ -41,7 +41,7 @@ skip_if_no_datefudge
 # Test PSS signatures on certificate
 
 for i in sha256 sha384 sha512;do
-datefudge -s "2007-04-22 00:00:00" \
+gnutls_timewrapper_standalone static "2007-04-22 00:00:00" \
 "${CERTTOOL}" --generate-self-signed --key-type rsa-pss \
                --load-privkey "${srcdir}/data/privkey1.pem" \
                --template "${srcdir}/templates/template-test.tmpl" \
@@ -59,7 +59,7 @@ if test "${rc}" != "0"; then
        exit ${rc}
 fi
 
-datefudge -s "2007-04-25 00:00:00" \
+gnutls_timewrapper_standalone static "2007-04-25 00:00:00" \
        "${CERTTOOL}" --load-ca-certificate "${TMPFILE}" --verify --infile "${TMPFILE}" >/dev/null 2>&1
 rc=$?
 if test "${rc}" != "0"; then
index 5c2eb91d646f09fccf934b385edf2743b0b2707b..0e76d9ce169e3c862014bb4cf232c84811060286 100755 (executable)
@@ -41,7 +41,7 @@ skip_if_no_datefudge
 # Test SHA3 signatures
 
 for i in sha3-224 sha3-256 sha3-384 sha3-512;do
-datefudge -s "2007-04-22 00:00:00" \
+gnutls_timewrapper_standalone static "2007-04-22 00:00:00" \
 "${CERTTOOL}" --generate-self-signed \
                --load-privkey "${srcdir}/data/template-test.key" \
                --template "${srcdir}/templates/template-test.tmpl" \
@@ -59,7 +59,7 @@ if test "${rc}" != "0"; then
        exit ${rc}
 fi
 
-datefudge -s "2007-04-25 00:00:00" \
+gnutls_timewrapper_standalone static "2007-04-25 00:00:00" \
        "${CERTTOOL}" --load-ca-certificate "${TMPFILE}" --verify --infile "${TMPFILE}" >/dev/null 2>&1
 rc=$?
 if test "${rc}" != "0"; then
@@ -71,7 +71,7 @@ done
 # Test SHA3 signatures with ECDSA
 
 for i in sha3-224 sha3-256 sha3-384 sha3-512;do
-datefudge -s "2007-04-22 00:00:00" \
+gnutls_timewrapper_standalone static "2007-04-22 00:00:00" \
 "${CERTTOOL}" --generate-self-signed \
        --load-privkey "${srcdir}/data/template-test-ecc.key" \
        --template "${srcdir}/templates/template-test.tmpl" \
@@ -83,7 +83,7 @@ if test "${rc}" != "0"; then
        exit ${rc}
 fi
 
-datefudge -s "2007-04-25 00:00:00" \
+gnutls_timewrapper_standalone static "2007-04-25 00:00:00" \
        "${CERTTOOL}" --load-ca-certificate "${TMPFILE}" --verify --infile "${TMPFILE}" >/dev/null 2>&1
 rc=$?
 if test "${rc}" != "0"; then
index ded942bbd1d3b1e5c7dfe330b6c8336e49fb9a35..5e3ab17c50c2535e4b6ba67a27c7fa6a7f835441 100755 (executable)
@@ -46,7 +46,7 @@ if test "${rc}" != "0"; then
 fi
 
 
-datefudge -s "2017-04-06 00:00:00" \
+gnutls_timewrapper_standalone static "2017-04-06 00:00:00" \
 ${VALGRIND} "${CERTTOOL}" --p7-verify --load-certificate "${srcdir}/../../doc/credentials/x509/cert-rsa.pem" <"${OUTFILE}"
 rc=$?
 
index f4f346ac977e929b6627efdce40cfb6e0b6f8330..c3f99253a28da48da43b668549a4a4e7cf9bf147 100755 (executable)
@@ -34,7 +34,7 @@ export TZ="UTC"
 
 skip_if_no_datefudge
 
-datefudge -s "2007-04-22 00:00:00" \
+gnutls_timewrapper_standalone static "2007-04-22 00:00:00" \
        "${CERTTOOL}" --generate-self-signed \
                --load-privkey "${srcdir}/data/template-test.key" \
                --template "${srcdir}/templates/arb-extensions.tmpl" \
@@ -52,7 +52,7 @@ fi
 rm -f "$OUTFILE"
 
 # Test adding critical extensions only
-datefudge -s "2007-04-22 00:00:00" \
+gnutls_timewrapper_standalone static "2007-04-22 00:00:00" \
        "${CERTTOOL}" --generate-self-signed \
                --load-privkey "${srcdir}/data/template-test.key" \
                --template "${srcdir}/templates/crit-extensions.tmpl" \
@@ -69,7 +69,7 @@ fi
 
 rm -f "$OUTFILE"
 
-datefudge -s "2007-04-22 00:00:00" \
+gnutls_timewrapper_standalone static "2007-04-22 00:00:00" \
        "${CERTTOOL}" --generate-request \
                --load-privkey "${srcdir}/data/template-test.key" \
                --template "${srcdir}/templates/arb-extensions.tmpl" \
index d3231affb79e12d727d042ae0a0f24778fa9034a..e0eda056c7e951cd1b9063618a939195b7f61d3f 100755 (executable)
@@ -34,7 +34,7 @@ export TZ="UTC"
 
 skip_if_no_datefudge
 
-datefudge -s "2007-04-22 00:00:00" \
+gnutls_timewrapper_standalone static "2007-04-22 00:00:00" \
        "${CERTTOOL}" --generate-self-signed \
                --load-privkey "${srcdir}/data/template-test.key" \
                --template "${srcdir}/templates/simple-policy.tmpl" \
index b8649364f0e47e03627d7a1a22e2d986e3dcd510..26efce45716a8f84d916070b48d16af77255e6f1 100755 (executable)
@@ -41,7 +41,7 @@ echo "Running test for ${ac_cv_sizeof_time_t}-byte time_t"
 # time set using datefudge could have changed since the generation
 # (if example the system was busy)
 
-datefudge -s "2007-04-22 00:00:00" \
+gnutls_timewrapper_standalone static "2007-04-22 00:00:00" \
        "${CERTTOOL}" --generate-self-signed \
                --load-privkey "${srcdir}/data/template-test.key" \
                --template "${srcdir}/templates/template-test.tmpl" \
@@ -58,7 +58,7 @@ fi
 
 rm -f ${TMPFILE}
 
-datefudge -s "2007-04-22 00:00:00" \
+gnutls_timewrapper_standalone static "2007-04-22 00:00:00" \
        "${CERTTOOL}" --generate-self-signed \
                --load-privkey "${srcdir}/data/template-test.key" \
                --template "${srcdir}/templates/template-utf8.tmpl" \
@@ -75,7 +75,7 @@ fi
 
 rm -f ${TMPFILE}
 
-datefudge -s "2007-04-22 00:00:00" \
+gnutls_timewrapper_standalone static "2007-04-22 00:00:00" \
        "${CERTTOOL}" --generate-self-signed \
                --load-privkey "${srcdir}/data/template-test.key" \
                --template "${srcdir}/templates/template-dn.tmpl" \
@@ -94,7 +94,7 @@ rm -f ${TMPFILE}
 
 echo "Running test for certificate generation with --generate-self-signed"
 
-datefudge -s "2007-04-22 00:00:00" \
+gnutls_timewrapper_standalone static "2007-04-22 00:00:00" \
        "${CERTTOOL}" --generate-certificate \
                --load-privkey "${srcdir}/data/template-test.key" \
                --load-ca-privkey "${srcdir}/../../doc/credentials/x509/ca-key.pem" \
@@ -113,7 +113,7 @@ fi
 
 rm -f ${TMPFILE}
 
-datefudge -s "2007-04-22 00:00:00" \
+gnutls_timewrapper_standalone static "2007-04-22 00:00:00" \
        "${CERTTOOL}" --generate-self-signed \
                --load-privkey "${srcdir}/data/template-test.key" \
                --template "${srcdir}/templates/template-dn-err.tmpl" \
@@ -127,7 +127,7 @@ fi
 
 rm -f ${TMPFILE}
 
-datefudge -s "2007-04-22 00:00:00" \
+gnutls_timewrapper_standalone static "2007-04-22 00:00:00" \
        "${CERTTOOL}" --generate-self-signed \
                --load-privkey "${srcdir}/data/template-test.key" \
                --template "${srcdir}/templates/template-overflow.tmpl" \
@@ -146,7 +146,7 @@ rm -f ${TMPFILE}
 
 # The following test works in 64-bit systems
 
-datefudge -s "2007-04-22 00:00:00" \
+gnutls_timewrapper_standalone static "2007-04-22 00:00:00" \
        "${CERTTOOL}" --generate-self-signed \
                --load-privkey "${srcdir}/data/template-test.key" \
                --template "${srcdir}/templates/template-overflow2.tmpl" \
@@ -176,7 +176,7 @@ else
 fi
 rm -f ${TMPFILE}
 
-datefudge -s "2007-04-22 00:00:00" \
+gnutls_timewrapper_standalone static "2007-04-22 00:00:00" \
        "${CERTTOOL}" --generate-self-signed \
                --load-privkey "${srcdir}/data/template-test.key" \
                --template "${srcdir}/templates/template-date.tmpl" \
@@ -193,7 +193,7 @@ fi
 
 rm -f ${TMPFILE}
 
-datefudge -s "2007-04-22 00:00:00" \
+gnutls_timewrapper_standalone static "2007-04-22 00:00:00" \
        "${CERTTOOL}" --generate-self-signed \
                --load-privkey "${srcdir}/data/template-test.key" \
                --template "${srcdir}/templates/template-dates-after2038.tmpl" \
@@ -223,7 +223,7 @@ rm -f ${TMPFILE}
 
 # Test name constraints generation
 
-datefudge -s "2007-04-22 00:00:00" \
+gnutls_timewrapper_standalone static "2007-04-22 00:00:00" \
        "${CERTTOOL}" --generate-self-signed \
                --load-privkey "${srcdir}/data/template-test.key" \
                --template "${srcdir}/templates/template-nc.tmpl" \
@@ -244,7 +244,7 @@ rm -f ${TMPFILE}
 # Test the GeneralizedTime support
 if test "${ac_cv_sizeof_time_t}" = 8;then
        # we should test that on systems which have 64-bit time_t.
-       datefudge -s "2051-04-22 00:00:00" \
+       gnutls_timewrapper_standalone static "2051-04-22 00:00:00" \
                        "${CERTTOOL}" --generate-self-signed \
                                --load-privkey "${srcdir}/data/template-test.key" \
                                --template "${srcdir}/templates/template-generalized.tmpl" \
@@ -264,7 +264,7 @@ rm -f ${TMPFILE}
 
 # Test unique ID field generation
 
-datefudge -s "2007-04-22 00:00:00" \
+gnutls_timewrapper_standalone static "2007-04-22 00:00:00" \
        "${CERTTOOL}" --generate-self-signed \
                --load-privkey "${srcdir}/data/template-test.key" \
                --template "${srcdir}/templates/template-unique.tmpl" \
@@ -283,7 +283,7 @@ rm -f ${TMPFILE}
 
 # Test generation with very long dns names
 
-datefudge -s "2007-04-22 00:00:00" \
+gnutls_timewrapper_standalone static "2007-04-22 00:00:00" \
        "${CERTTOOL}" --generate-self-signed \
                --load-privkey "${srcdir}/data/template-test.key" \
                --template "${srcdir}/templates/template-long-dns.tmpl" \
@@ -302,7 +302,7 @@ rm -f ${TMPFILE}
 
 # Test generation with larger serial number
 
-datefudge -s "2007-04-22 00:00:00" \
+gnutls_timewrapper_standalone static "2007-04-22 00:00:00" \
        "${CERTTOOL}" --generate-self-signed \
                --load-privkey "${srcdir}/data/template-test.key" \
                --template "${srcdir}/templates/template-long-serial.tmpl" \
index 52fd92095c8eb9b11dc9fe92fdbb4d14e58d3691..109a9de462a60819da37b04785290b85d8cd3a28 100755 (executable)
@@ -38,7 +38,7 @@ skip_if_no_datefudge
 #
 # Test certificate generation
 #
-datefudge -s "2007-04-22 00:00:00" \
+gnutls_timewrapper_standalone static "2007-04-22 00:00:00" \
 "${CERTTOOL}" --generate-self-signed \
                --load-privkey "${srcdir}/data/template-test.key" \
                --template "${srcdir}/templates/template-tlsfeature.tmpl" \
@@ -97,7 +97,7 @@ fi
 # Test certificate request generation
 #
 
-datefudge -s "2007-04-22 00:00:00" \
+gnutls_timewrapper_standalone static "2007-04-22 00:00:00" \
 "${CERTTOOL}" --generate-request \
                --load-privkey "${srcdir}/data/template-test.key" \
                --template "${srcdir}/templates/template-tlsfeature.tmpl" \
@@ -158,7 +158,7 @@ fi
 #
 # Test certificate generation after a request
 #
-datefudge -s "2007-04-22 00:00:00" \
+gnutls_timewrapper_standalone static "2007-04-22 00:00:00" \
 "${CERTTOOL}" --generate-certificate \
                --load-privkey "${srcdir}/data/template-test.key" \
                --load-ca-privkey "${srcdir}/data/template-test.key" \
index 299083e90cb576d0710da9f4a80db0edc67338ba..ccb244666b4b9efc18a2d063b428d2dcfc084457 100755 (executable)
@@ -115,7 +115,7 @@ verify_certificate_test() {
        file=$2
 
        echo -n "* Verifying a certificate... "
-       datefudge -s "2015-10-10 00:00:00" \
+       gnutls_timewrapper_standalone static "2015-10-10 00:00:00" \
        $CERTTOOL ${ADDITIONAL_PARAM} --verify --load-ca-certificate "$url" --infile "$file" >>"${TMPFILE}" 2>&1
        if test $? = 0; then
                echo ok
index 35cd509f4d740bbb90d2848d108dbd034465bf95..96c26085a60902a7bc7d7e77dd5f595c23c80455 100755 (executable)
@@ -33,7 +33,7 @@ export TZ="UTC"
 
 skip_if_no_datefudge
 
-datefudge -s "2017-06-19 00:00:00" \
+gnutls_timewrapper_standalone static "2017-06-19 00:00:00" \
        "${OCSPTOOL}" -e --load-chain "${srcdir}/ocsp-tests/certs/chain-amazon.com.pem" --infile "${srcdir}/ocsp-tests/certs/ocsp-amazon.com.der" --verify-allow-broken
 rc=$?
 
@@ -43,7 +43,7 @@ if test "${rc}" != "0"; then
        exit ${rc}
 fi
 
-datefudge -s "2017-06-19 00:00:00" \
+gnutls_timewrapper_standalone static "2017-06-19 00:00:00" \
        "${OCSPTOOL}" -e --load-chain "${srcdir}/ocsp-tests/certs/chain-amazon.com-unsorted.pem" --infile "${srcdir}/ocsp-tests/certs/ocsp-amazon.com.der" --verify-allow-broken
 rc=$?
 
@@ -54,7 +54,7 @@ if test "${rc}" != "0"; then
 fi
 
 # verify an OCSP response using ECDSA
-datefudge -s "2017-06-29 00:00:00" \
+gnutls_timewrapper_standalone static "2017-06-29 00:00:00" \
        "${OCSPTOOL}" -d 6 -e --load-chain "${srcdir}/ocsp-tests/certs/chain-akamai.com.pem" --infile "${srcdir}/ocsp-tests/certs/ocsp-akamai.com.der"
 rc=$?
 
index f6fa6341d7b08a0e4e296733bbf0f2b7bb450594..0b6204084d5dac0addfb64e5a58c68fb14a8837c 100755 (executable)
@@ -100,7 +100,7 @@ chmod u+w "$TEMPLATE_FILE"
 echo "ocsp_uri=http://localhost:${OCSP_PORT}/ocsp/" >>"$TEMPLATE_FILE"
 
 # Generate certificates with the random port
-datefudge -s "${CERTDATE}" ${CERTTOOL} \
+gnutls_timewrapper_standalone static "${CERTDATE}" ${CERTTOOL} \
        --generate-certificate --load-ca-privkey "${srcdir}/ocsp-tests/certs/ca.key" \
        --load-ca-certificate "${srcdir}/ocsp-tests/certs/ca.pem" \
        --load-privkey "${srcdir}/ocsp-tests/certs/server_good.key" \
@@ -109,7 +109,7 @@ datefudge -s "${CERTDATE}" ${CERTTOOL} \
 # Generate certificates with the random port (with mandatory stapling extension)
 echo "tls_feature = 5" >>"$TEMPLATE_FILE"
 
-datefudge -s "${CERTDATE}" ${CERTTOOL} \
+gnutls_timewrapper_standalone static "${CERTDATE}" ${CERTTOOL} \
        --generate-certificate --load-ca-privkey "${srcdir}/ocsp-tests/certs/ca.key" \
        --load-ca-certificate "${srcdir}/ocsp-tests/certs/ca.pem" \
        --load-privkey "${srcdir}/ocsp-tests/certs/server_good.key" \
@@ -181,7 +181,7 @@ wait_server $TLS_SERVER_PID
 wait_for_port "${TLS_SERVER_PORT}"
 
 echo "test 123456" | \
-    datefudge -s "${TESTDATE}" \
+    gnutls_timewrapper_standalone static "${TESTDATE}" \
              "${CLI}" --ocsp --x509cafile="${srcdir}/ocsp-tests/certs/ca.pem" \
              --port="${TLS_SERVER_PORT}" localhost
 rc=$?
@@ -214,7 +214,7 @@ wait_server $TLS_SERVER_PID
 wait_for_port "${TLS_SERVER_PORT}"
 
 echo "test 123456" | \
-    datefudge -s "${TESTDATE}" \
+    gnutls_timewrapper_standalone static "${TESTDATE}" \
              "${CLI}" --ocsp --x509cafile="${srcdir}/ocsp-tests/certs/ca.pem" \
              --port="${TLS_SERVER_PORT}" localhost
 rc=$?
@@ -249,7 +249,7 @@ wait_server $TLS_SERVER_PID
 wait_for_port "${TLS_SERVER_PORT}"
 
 echo "test 123456" | \
-    datefudge -s "${TESTDATE}" \
+    gnutls_timewrapper_standalone static "${TESTDATE}" \
              "${CLI}" --ocsp --x509cafile="${srcdir}/ocsp-tests/certs/ca.pem" \
              --port="${TLS_SERVER_PORT}" localhost
 rc=$?
@@ -285,7 +285,7 @@ wait_server $TLS_SERVER_PID
 wait_for_port "${TLS_SERVER_PORT}"
 
 echo "test 123456" | \
-    datefudge -s "${TESTDATE}" \
+    gnutls_timewrapper_standalone static "${TESTDATE}" \
              "${CLI}" --ocsp --x509cafile="${srcdir}/ocsp-tests/certs/ca.pem" \
              --port="${TLS_SERVER_PORT}" localhost
 rc=$?
@@ -307,7 +307,7 @@ rm -f "${OCSP_RESPONSE_FILE}"
 # Generate an OCSP response which expires in 2 days and use it after
 # a month. gnutls server doesn't send such a staple to clients.
 ${VALGRIND} ${OCSPTOOL} --generate-request --load-issuer "${srcdir}/ocsp-tests/certs/ocsp-server.pem" --load-cert "${SERVER_CERT_FILE}" --outfile "${OCSP_REQ_FILE}"
-datefudge -s "${EXP_OCSP_DATE}" \
+gnutls_timewrapper_standalone static "${EXP_OCSP_DATE}" \
        ${OPENSSL} ocsp -index "${INDEXFILE}" -rsigner "${srcdir}/ocsp-tests/certs/ocsp-server.pem" -rkey "${srcdir}/ocsp-tests/certs/ocsp-server.key" -CA "${srcdir}/ocsp-tests/certs/ca.pem" -reqin "${OCSP_REQ_FILE}" -respout "${OCSP_RESPONSE_FILE}" -ndays 2
 
 eval "${GETPORT}"
@@ -344,7 +344,7 @@ wait_server $TLS_SERVER_PID
 wait_for_port "${TLS_SERVER_PORT}"
 
 echo "test 123456" | \
-    datefudge -s "${TESTDATE}" \
+    gnutls_timewrapper_standalone static "${TESTDATE}" \
              "${CLI}" --ocsp --x509cafile="${srcdir}/ocsp-tests/certs/ca.pem" \
              --port="${TLS_SERVER_PORT}" localhost
 rc=$?
@@ -367,7 +367,7 @@ echo "=== Test 6: Server with valid certificate - old staple ==="
 rm -f "${OCSP_RESPONSE_FILE}"
 
 ${VALGRIND} ${OCSPTOOL} --generate-request --load-issuer "${srcdir}/ocsp-tests/certs/ocsp-server.pem" --load-cert "${SERVER_CERT_FILE}" --outfile "${OCSP_REQ_FILE}"
-datefudge -s "${EXP_OCSP_DATE}" \
+gnutls_timewrapper_standalone static "${EXP_OCSP_DATE}" \
        ${OPENSSL} ocsp -index ${INDEXFILE} -rsigner "${srcdir}/ocsp-tests/certs/ocsp-server.pem" -rkey "${srcdir}/ocsp-tests/certs/ocsp-server.key" -CA "${srcdir}/ocsp-tests/certs/ca.pem" -reqin "${OCSP_REQ_FILE}" -respout "${OCSP_RESPONSE_FILE}"
 
 eval "${GETPORT}"
@@ -387,7 +387,7 @@ wait_server $TLS_SERVER_PID
 wait_for_port "${TLS_SERVER_PORT}"
 
 echo "test 123456" | \
-    datefudge -s "${TESTDATE}" \
+    gnutls_timewrapper_standalone static "${TESTDATE}" \
              "${CLI}" --ocsp --x509cafile="${srcdir}/ocsp-tests/certs/ca.pem" \
              --port="${TLS_SERVER_PORT}" localhost
 rc=$?
@@ -422,7 +422,7 @@ if test "${GNUTLS_FORCE_FIPS_MODE}" != 1; then
     wait_for_port "${TLS_SERVER_PORT}"
 
     echo "test 123456" | \
-       datefudge -s "${TESTDATE}" \
+       gnutls_timewrapper_standalone static "${TESTDATE}" \
                  "${CLI}" --priority "NORMAL:%NO_EXTENSIONS" --ocsp --x509cafile="${srcdir}/ocsp-tests/certs/ca.pem" \
                  --port="${TLS_SERVER_PORT}" localhost
     rc=$?
@@ -457,7 +457,7 @@ wait_server $TLS_SERVER_PID
 wait_for_port "${TLS_SERVER_PORT}"
 
 echo "test 123456" | \
-    datefudge -s "${TESTDATE}" \
+    gnutls_timewrapper_standalone static "${TESTDATE}" \
              "${CLI}" --ocsp --x509cafile="${srcdir}/ocsp-tests/certs/ca.pem" \
              --port="${TLS_SERVER_PORT}" localhost
 rc=$?
@@ -490,7 +490,7 @@ wait_server $TLS_SERVER_PID
 wait_for_port "${TLS_SERVER_PORT}"
 
 echo "test 123456" | \
-    datefudge -s "${TESTDATE}" \
+    gnutls_timewrapper_standalone static "${TESTDATE}" \
              "${CLI}" --ocsp --x509cafile="${srcdir}/ocsp-tests/certs/ca.pem" \
              --port="${TLS_SERVER_PORT}" localhost
 rc=$?
index 5c40b46e1aef2566c85e98b86d344d81a7826f18..4d58f87469adee2ee3c1dc3182bff6d0749d5e20 100755 (executable)
@@ -38,7 +38,7 @@ trusted="${sample_dir}/trust.pem"
 verify_response ()
 {
     echo "verifying ${sample_dir}/${1} using ${trusted}"
-    datefudge --static "${date}" \
+    gnutls_timewrapper_standalone static "${date}" \
               "${OCSPTOOL}" --infile="${sample_dir}/${1}" \
               --verify-response --load-trust="${trusted}"
     return $?
index 32ad12a6a031e39efb1697c4744d3b2241da727c..0da118bf25963e624424ff6e64a3776de52c55bd 100755 (executable)
@@ -37,7 +37,7 @@ skip_if_no_datefudge
 # time set using datefudge could have changed since the generation
 # (if example the system was busy)
 
-datefudge -s "2016-04-22 00:00:00" \
+gnutls_timewrapper_standalone static "2016-04-22 00:00:00" \
        "${OCSPTOOL}" -e --load-signer "${srcdir}/ocsp-tests/certs/ca.pem" --infile "${srcdir}/ocsp-tests/response1.der"
 rc=$?
 
@@ -47,7 +47,7 @@ if test "${rc}" != "0"; then
        exit ${rc}
 fi
 
-datefudge -s "2016-04-22 00:00:00" \
+gnutls_timewrapper_standalone static "2016-04-22 00:00:00" \
        "${OCSPTOOL}" -e --load-signer "${srcdir}/ocsp-tests/certs/ocsp-server.pem" --infile "${srcdir}/ocsp-tests/response2.der"
 rc=$?
 
@@ -57,7 +57,7 @@ if test "${rc}" != "0"; then
        exit ${rc}
 fi
 
-datefudge -s "2016-04-22 00:00:00" \
+gnutls_timewrapper_standalone static "2016-04-22 00:00:00" \
        "${OCSPTOOL}" -e --load-signer "${srcdir}/ocsp-tests/certs/ca.pem" --infile "${srcdir}/ocsp-tests/response2.der" -d 4
 rc=$?
 
index 6a0496480205ef94e1cb8b0a666c56128fe20ce5..3ff7620894889b2f22669ee08cd45a8cd6d6d091 100755 (executable)
@@ -96,7 +96,7 @@ chmod u+w "$TEMPLATE_FILE"
 echo "ocsp_uri=http://localhost:${OCSP_PORT}/ocsp/" >>"$TEMPLATE_FILE"
 
 # Generate certificates with the random port
-datefudge -s "${CERTDATE}" ${CERTTOOL} \
+gnutls_timewrapper_standalone static "${CERTDATE}" ${CERTTOOL} \
        --generate-certificate --load-ca-privkey "${srcdir}/ocsp-tests/certs/ca.key" \
        --load-ca-certificate "${srcdir}/ocsp-tests/certs/ca.pem" \
        --load-privkey "${srcdir}/ocsp-tests/certs/server_good.key" \
@@ -160,7 +160,7 @@ wait_server $TLS_SERVER_PID
 wait_for_port "${TLS_SERVER_PORT}"
 
 echo "test 123456" | \
-    datefudge -s "${TESTDATE}" \
+    gnutls_timewrapper_standalone static "${TESTDATE}" \
              "${CLI}" --ocsp --x509cafile="${srcdir}/ocsp-tests/certs/ca.pem" \
              --port="${TLS_SERVER_PORT}" localhost
 rc=$?
@@ -182,7 +182,7 @@ cp "${srcdir}/ocsp-tests/certs/server_bad.template" "$TEMPLATE_FILE"
 echo "ocsp_uri=http://localhost:${OCSP_PORT}/ocsp/" >>"$TEMPLATE_FILE"
 
 # Generate certificates with the random port
-datefudge -s "${CERTDATE}" ${CERTTOOL} \
+gnutls_timewrapper_standalone static "${CERTDATE}" ${CERTTOOL} \
        --generate-certificate --load-ca-privkey "${srcdir}/ocsp-tests/certs/ca.key" \
        --load-ca-certificate "${srcdir}/ocsp-tests/certs/ca.pem" \
        --load-privkey "${srcdir}/ocsp-tests/certs/server_bad.key" \
@@ -204,7 +204,7 @@ wait_server ${TLS_SERVER_PID}
 wait_for_port "${TLS_SERVER_PORT}"
 
 echo "test 123456" | \
-    datefudge -s "${TESTDATE}" \
+    gnutls_timewrapper_standalone static "${TESTDATE}" \
              "${CLI}" --ocsp --x509cafile="${srcdir}/ocsp-tests/certs/ca.pem" \
              --port="${TLS_SERVER_PORT}" localhost
 rc=$?
index 25ed8bd2557b0071d860e552bcc7c6468262de1b..12929868eaf071591b62579eecc05c905132bdac 100755 (executable)
@@ -36,7 +36,7 @@ fi
 skip_if_no_datefudge
 
 #try verification
-datefudge -s "2010-10-10 00:00:00" \
+gnutls_timewrapper_standalone static "2010-10-10 00:00:00" \
 ${VALGRIND} "${CERTTOOL}" --verify-allow-broken --inder --p7-verify --infile "${srcdir}/data/test1.cat" --load-certificate "${srcdir}/data/pkcs7-cat-ca.pem"
 rc=$?
 
@@ -45,7 +45,7 @@ if test "${rc}" = "0"; then
        exit 1
 fi
 
-datefudge -s "2016-10-10 00:00:00" \
+gnutls_timewrapper_standalone static "2016-10-10 00:00:00" \
 ${VALGRIND} "${CERTTOOL}" --verify-allow-broken --inder --p7-verify --infile "${srcdir}/data/test1.cat" --load-certificate "${srcdir}/data/pkcs7-cat-ca.pem"
 rc=$?
 
index 0e31107a9f99499bacc1390d3ac3c95a90f59700..cbd456560915d8f49cde2ed684cf67c221cf1a77 100755 (executable)
@@ -36,7 +36,7 @@ skip_if_no_datefudge
 ASAN_OPTIONS="detect_leaks=0"
 export ASAN_OPTIONS
 
-datefudge -s "2006-10-01 00:00:00" \
+gnutls_timewrapper_standalone static "2006-10-01 00:00:00" \
 "${CERTTOOL}" --verify-chain --outfile "$TMPFILE1" --infile "${srcdir}/rsa-md5-collision/colliding-chain-md5-1.pem"
 if test $? = 0;then
        echo "Verification on chain1 succeeded"
@@ -50,7 +50,7 @@ if test $? != 0;then
 fi
 
 
-datefudge -s "2006-10-01 00:00:00" \
+gnutls_timewrapper_standalone static "2006-10-01 00:00:00" \
 "${CERTTOOL}" --verify-chain --outfile "$TMPFILE2" --infile "${srcdir}/rsa-md5-collision/colliding-chain-md5-2.pem"
 if test $? = 0;then
        echo "Verification on chain2 succeeded"
index 5d671322d5b30e79848f7d0fbddb4b431f08cbff..fdc1bb3a26d6bd20f42ac6556d13f8cd8de96bbf 100755 (executable)
@@ -561,7 +561,7 @@ write_certificate_test () {
        pubkey="$5"
 
        echo -n "* Generating client certificate... "
-       datefudge -s "$TESTDATE" \
+       gnutls_timewrapper_standalone static "$TESTDATE" \
        "${CERTTOOL}" ${CERTTOOL_PARAM} ${ADDITIONAL_PARAM}  --generate-certificate --load-ca-privkey "${cakey}"  --load-ca-certificate "${cacert}"  \
        --template ${srcdir}/testpkcs11-certs/client-tmpl --load-privkey "${token};object=gnutls-client;object-type=private" \
        --load-pubkey "$pubkey" --outfile tmp-client.crt >>"${LOGFILE}" 2>&1
@@ -939,7 +939,7 @@ use_certificate_test () {
        echo -n "* Using PKCS #11 with gnutls-cli (${txt})... "
        # start server
        eval "${GETPORT}"
-       launch_bare_server datefudge -s "$TESTDATE" \
+       launch_bare_server gnutls_timewrapper_standalone static "$TESTDATE" \
                $VALGRIND $SERV $DEBUG -p "$PORT" \
                ${ADDITIONAL_PARAM} --debug 10 --echo --priority NORMAL --x509certfile="${certfile}" \
                --x509keyfile="$keyfile" --x509cafile="${cafile}" \
@@ -949,16 +949,16 @@ use_certificate_test () {
        wait_server ${PID}
 
        # connect to server using SC
-       datefudge -s "$TESTDATE" \
+       gnutls_timewrapper_standalone static "$TESTDATE" \
        ${VALGRIND} "${CLI}" ${ADDITIONAL_PARAM} -p "${PORT}" localhost --priority NORMAL --x509cafile="${cafile}" </dev/null >>"${LOGFILE}" 2>&1 && \
                fail ${PID} "Connection should have failed!"
 
-       datefudge -s "$TESTDATE" \
+       gnutls_timewrapper_standalone static "$TESTDATE" \
        ${VALGRIND} "${CLI}" ${ADDITIONAL_PARAM} -p "${PORT}" localhost --priority NORMAL --x509certfile="${certfile}" \
        --x509keyfile="$keyfile" --x509cafile="${cafile}" </dev/null >>"${LOGFILE}" 2>&1 || \
                fail ${PID} "Connection (with files) should have succeeded!"
 
-       datefudge -s "$TESTDATE" \
+       gnutls_timewrapper_standalone static "$TESTDATE" \
        ${VALGRIND} "${CLI}" ${ADDITIONAL_PARAM} -p "${PORT}" localhost --priority NORMAL --x509certfile="${token};object=gnutls-client;object-type=cert" \
                --x509keyfile="${token};object=gnutls-client;object-type=private" \
                --x509cafile="${cafile}" </dev/null >>"${LOGFILE}" 2>&1 || \