summaryrefslogtreecommitdiff
path: root/tests/cert-tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests/cert-tests')
-rwxr-xr-xtests/cert-tests/alt-chain.sh4
-rwxr-xr-xtests/cert-tests/cert-critical.sh6
-rwxr-xr-xtests/cert-tests/cert-non-digits-time.sh2
-rwxr-xr-xtests/cert-tests/certtool-eddsa.sh2
-rwxr-xr-xtests/cert-tests/certtool-rsa-pss.sh2
-rwxr-xr-xtests/cert-tests/certtool-verify-profiles.sh6
-rwxr-xr-xtests/cert-tests/certtool.sh2
-rwxr-xr-xtests/cert-tests/crl.sh4
-rwxr-xr-xtests/cert-tests/crq.sh14
-rwxr-xr-xtests/cert-tests/inhibit-anypolicy.sh6
-rwxr-xr-xtests/cert-tests/invalid-sig.sh23
-rwxr-xr-xtests/cert-tests/krb5-test.sh8
-rwxr-xr-xtests/cert-tests/md5-test.sh4
-rwxr-xr-xtests/cert-tests/name-constraints.sh2
-rwxr-xr-xtests/cert-tests/othername-test.sh6
-rwxr-xr-xtests/cert-tests/pkcs1-pad.sh10
-rwxr-xr-xtests/cert-tests/pkcs7-cat.sh2
-rwxr-xr-xtests/cert-tests/pkcs7-constraints.sh10
-rwxr-xr-xtests/cert-tests/pkcs7-constraints2.sh10
-rwxr-xr-xtests/cert-tests/pkcs7.sh6
-rwxr-xr-xtests/cert-tests/rsa-pss-pad.sh6
-rwxr-xr-xtests/cert-tests/sha3-test.sh10
-rwxr-xr-xtests/cert-tests/smime.sh2
-rwxr-xr-xtests/cert-tests/template-exts-test.sh6
-rwxr-xr-xtests/cert-tests/template-policy-test.sh2
-rwxr-xr-xtests/cert-tests/template-test.sh30
-rwxr-xr-xtests/cert-tests/tlsfeature-test.sh6
27 files changed, 94 insertions, 97 deletions
diff --git a/tests/cert-tests/alt-chain.sh b/tests/cert-tests/alt-chain.sh
index b7490b8f63..177570e581 100755
--- a/tests/cert-tests/alt-chain.sh
+++ b/tests/cert-tests/alt-chain.sh
@@ -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-5-10" \
+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-5-10" \
+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=$?
diff --git a/tests/cert-tests/cert-critical.sh b/tests/cert-tests/cert-critical.sh
index 5564146a2c..d65a8e9ee2 100755
--- a/tests/cert-tests/cert-critical.sh
+++ b/tests/cert-tests/cert-critical.sh
@@ -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=$?
diff --git a/tests/cert-tests/cert-non-digits-time.sh b/tests/cert-tests/cert-non-digits-time.sh
index 16d5448972..930cedd09a 100755
--- a/tests/cert-tests/cert-non-digits-time.sh
+++ b/tests/cert-tests/cert-non-digits-time.sh
@@ -34,7 +34,7 @@ fi
skip_if_no_datefudge
# Check whether certificates with non-digits time fields are accepted
-datefudge -s "2019-12-19" \
+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=$?
diff --git a/tests/cert-tests/certtool-eddsa.sh b/tests/cert-tests/certtool-eddsa.sh
index ea5cc7f5db..be0c8e5d8d 100755
--- a/tests/cert-tests/certtool-eddsa.sh
+++ b/tests/cert-tests/certtool-eddsa.sh
@@ -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
diff --git a/tests/cert-tests/certtool-rsa-pss.sh b/tests/cert-tests/certtool-rsa-pss.sh
index 1a1aa4e65b..8dccc4e257 100755
--- a/tests/cert-tests/certtool-rsa-pss.sh
+++ b/tests/cert-tests/certtool-rsa-pss.sh
@@ -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=$?
diff --git a/tests/cert-tests/certtool-verify-profiles.sh b/tests/cert-tests/certtool-verify-profiles.sh
index f4c23e6431..862b4459c4 100755
--- a/tests/cert-tests/certtool-verify-profiles.sh
+++ b/tests/cert-tests/certtool-verify-profiles.sh
@@ -38,7 +38,7 @@ OUTFILE=out-pkcs7.$$.tmp
skip_if_no_datefudge
echo "Checking chain with insecure leaf"
-datefudge -s "2019-12-19" \
+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" \
+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" \
+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=$?
diff --git a/tests/cert-tests/certtool.sh b/tests/cert-tests/certtool.sh
index 11b8b8f636..3ec820fad7 100755
--- a/tests/cert-tests/certtool.sh
+++ b/tests/cert-tests/certtool.sh
@@ -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=$?
diff --git a/tests/cert-tests/crl.sh b/tests/cert-tests/crl.sh
index 6a02a429d1..d097017473 100755
--- a/tests/cert-tests/crl.sh
+++ b/tests/cert-tests/crl.sh
@@ -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 \
diff --git a/tests/cert-tests/crq.sh b/tests/cert-tests/crq.sh
index 21044cfa3f..d555fdb289 100755
--- a/tests/cert-tests/crq.sh
+++ b/tests/cert-tests/crq.sh
@@ -59,7 +59,7 @@ fi
rm -f "${OUTFILE}"
# check whether the honor_crq_extension option works
-datefudge -s "2007-04-22" \
+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" \
+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" \
"${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" \
+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" \
+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" \
+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" \
+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" \
diff --git a/tests/cert-tests/inhibit-anypolicy.sh b/tests/cert-tests/inhibit-anypolicy.sh
index 7623f7c0ac..398350da03 100755
--- a/tests/cert-tests/inhibit-anypolicy.sh
+++ b/tests/cert-tests/inhibit-anypolicy.sh
@@ -37,7 +37,7 @@ SUBCAFILE=inhibit-subca.$$.tmp
skip_if_no_datefudge
-datefudge -s "2017-04-22" \
+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" \
+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" "${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)"
diff --git a/tests/cert-tests/invalid-sig.sh b/tests/cert-tests/invalid-sig.sh
index f621614062..663cf5b737 100755
--- a/tests/cert-tests/invalid-sig.sh
+++ b/tests/cert-tests/invalid-sig.sh
@@ -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 \
- ${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
diff --git a/tests/cert-tests/krb5-test.sh b/tests/cert-tests/krb5-test.sh
index a4787f6695..401b910d83 100755
--- a/tests/cert-tests/krb5-test.sh
+++ b/tests/cert-tests/krb5-test.sh
@@ -41,10 +41,10 @@ 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)
-datefudge -s "2007-04-22" \
+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" \
+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" \
+gnutls_timewrapper_standalone static "2007-04-22 00:00:00" \
${VALGRIND} "${CERTTOOL}" --generate-self-signed \
--load-privkey "${srcdir}/data/template-test.key" \
--template ${TMPLFILE} \
diff --git a/tests/cert-tests/md5-test.sh b/tests/cert-tests/md5-test.sh
index 4cea9e8e4c..c6f955a737 100755
--- a/tests/cert-tests/md5-test.sh
+++ b/tests/cert-tests/md5-test.sh
@@ -37,7 +37,7 @@ skip_if_no_datefudge
# Test MD5 signatures
-datefudge -s "2016-04-15" \
+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" \
+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
diff --git a/tests/cert-tests/name-constraints.sh b/tests/cert-tests/name-constraints.sh
index aa411d7f6d..8cf002ecf4 100755
--- a/tests/cert-tests/name-constraints.sh
+++ b/tests/cert-tests/name-constraints.sh
@@ -37,7 +37,7 @@ TMPFILE=constraints.$$.pem.tmp
skip_if_no_datefudge
-datefudge -s "2016-04-22" \
+gnutls_timewrapper_standalone static "2016-04-22 00:00:00" \
${VALGRIND} "${CERTTOOL}" --verify-allow-broken -e --infile "${srcdir}/data/name-constraints-ip.pem"
rc=$?
diff --git a/tests/cert-tests/othername-test.sh b/tests/cert-tests/othername-test.sh
index 6d1b697dc3..e8780e77ef 100755
--- a/tests/cert-tests/othername-test.sh
+++ b/tests/cert-tests/othername-test.sh
@@ -35,10 +35,10 @@ 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)
-datefudge -s "2007-04-22" \
+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" \
+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" \
diff --git a/tests/cert-tests/pkcs1-pad.sh b/tests/cert-tests/pkcs1-pad.sh
index 03db104b8d..f7df8eaaef 100755
--- a/tests/cert-tests/pkcs1-pad.sh
+++ b/tests/cert-tests/pkcs1-pad.sh
@@ -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 " "`
diff --git a/tests/cert-tests/pkcs7-cat.sh b/tests/cert-tests/pkcs7-cat.sh
index 8a8681d09f..50f3bc5e73 100755
--- a/tests/cert-tests/pkcs7-cat.sh
+++ b/tests/cert-tests/pkcs7-cat.sh
@@ -36,7 +36,7 @@ OUTFILE=out-pkcs7.$$.tmp
. ${srcdir}/../scripts/common.sh
skip_if_no_datefudge
-datefudge -s "2016-10-1" \
+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=$?
diff --git a/tests/cert-tests/pkcs7-constraints.sh b/tests/cert-tests/pkcs7-constraints.sh
index e0606d7082..7587c3a946 100755
--- a/tests/cert-tests/pkcs7-constraints.sh
+++ b/tests/cert-tests/pkcs7-constraints.sh
@@ -51,7 +51,7 @@ fi
FILE="signing-verify-no-purpose"
echo ""
echo "test: $FILE"
-datefudge -s "2015-1-10" \
+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-1-10" \
+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-1-10" \
+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-1-10" \
+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-1-10" \
+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=$?
diff --git a/tests/cert-tests/pkcs7-constraints2.sh b/tests/cert-tests/pkcs7-constraints2.sh
index 7fa333a153..609bcb7786 100755
--- a/tests/cert-tests/pkcs7-constraints2.sh
+++ b/tests/cert-tests/pkcs7-constraints2.sh
@@ -51,7 +51,7 @@ fi
FILE="signing-verify-no-purpose"
echo ""
echo "test: $FILE"
-datefudge -s "2015-1-10" \
+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-1-10" \
+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-1-10" \
+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-1-10" \
+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-1-10" \
+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=$?
diff --git a/tests/cert-tests/pkcs7.sh b/tests/cert-tests/pkcs7.sh
index 6122a31859..e1bf874552 100755
--- a/tests/cert-tests/pkcs7.sh
+++ b/tests/cert-tests/pkcs7.sh
@@ -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-1-10" \
+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
-datefudge -s "2011-5-28 08:38:00 UTC" \
+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" \
+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=$?
diff --git a/tests/cert-tests/rsa-pss-pad.sh b/tests/cert-tests/rsa-pss-pad.sh
index 4a1928c664..298de392a3 100755
--- a/tests/cert-tests/rsa-pss-pad.sh
+++ b/tests/cert-tests/rsa-pss-pad.sh
@@ -35,13 +35,13 @@ 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
for i in sha256 sha384 sha512;do
-datefudge -s "2007-04-22" \
+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" \
+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
diff --git a/tests/cert-tests/sha3-test.sh b/tests/cert-tests/sha3-test.sh
index a3c015555d..6fd4b0307c 100755
--- a/tests/cert-tests/sha3-test.sh
+++ b/tests/cert-tests/sha3-test.sh
@@ -35,13 +35,13 @@ 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
for i in sha3-224 sha3-256 sha3-384 sha3-512;do
-datefudge -s "2007-04-22" \
+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" \
+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" \
+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" \
+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
diff --git a/tests/cert-tests/smime.sh b/tests/cert-tests/smime.sh
index b4fde1351a..5e3ab17c50 100755
--- a/tests/cert-tests/smime.sh
+++ b/tests/cert-tests/smime.sh
@@ -46,7 +46,7 @@ if test "${rc}" != "0"; then
fi
-datefudge -s "2017-4-6" \
+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=$?
diff --git a/tests/cert-tests/template-exts-test.sh b/tests/cert-tests/template-exts-test.sh
index da4ccb0622..c3f99253a2 100755
--- a/tests/cert-tests/template-exts-test.sh
+++ b/tests/cert-tests/template-exts-test.sh
@@ -34,7 +34,7 @@ export TZ="UTC"
skip_if_no_datefudge
-datefudge -s "2007-04-22" \
+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" \
+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" \
+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" \
diff --git a/tests/cert-tests/template-policy-test.sh b/tests/cert-tests/template-policy-test.sh
index c82be96957..e0eda056c7 100755
--- a/tests/cert-tests/template-policy-test.sh
+++ b/tests/cert-tests/template-policy-test.sh
@@ -34,7 +34,7 @@ export TZ="UTC"
skip_if_no_datefudge
-datefudge -s "2007-04-22" \
+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" \
diff --git a/tests/cert-tests/template-test.sh b/tests/cert-tests/template-test.sh
index 0233211287..1dda7aefd7 100755
--- a/tests/cert-tests/template-test.sh
+++ b/tests/cert-tests/template-test.sh
@@ -38,10 +38,10 @@ 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)
-datefudge -s "2007-04-22" \
+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" \
+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" \
+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" \
+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" \
+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" \
+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" \
+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" \
+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" \
+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" \
+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" \
+ 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" \
+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" \
+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" \
+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" \
diff --git a/tests/cert-tests/tlsfeature-test.sh b/tests/cert-tests/tlsfeature-test.sh
index 203563f819..109a9de462 100755
--- a/tests/cert-tests/tlsfeature-test.sh
+++ b/tests/cert-tests/tlsfeature-test.sh
@@ -38,7 +38,7 @@ skip_if_no_datefudge
#
# Test certificate generation
#
-datefudge -s "2007-04-22" \
+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" \
+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" \
+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" \