# time set using datefudge could have changed since the generation
# (if example the system was busy)
-rc=1
-counter=1
-
-while [ "${rc}" != "0" -a $counter -le 5 ]; do
- datefudge "2007-04-22" \
+datefudge -s "2007-04-22" \
"${CERTTOOL}" --generate-self-signed \
--load-privkey "${srcdir}/template-test.key" \
--template "${srcdir}/template-krb5name.tmpl" \
--outfile ${OUTFILE} 2>/dev/null
- ${DIFF} "${srcdir}/template-krb5name.pem" ${OUTFILE} >/dev/null 2>&1
- rc=$?
- test ${rc} != 0 && sleep 3
- counter=`expr $counter + 1`
-done
+${DIFF} "${srcdir}/template-krb5name.pem" ${OUTFILE} >/dev/null 2>&1
+rc=$?
# We're done.
if test "${rc}" != "0"; then
cp template-krb5name.tmpl ${TMPLFILE}
echo "krb5_principal = 'xxxxxxxxxxxxxx'" >>${TMPLFILE}
-datefudge "2007-04-22" \
+datefudge -s "2007-04-22" \
${VALGRIND} "${CERTTOOL}" --generate-self-signed \
--load-privkey "${srcdir}/template-test.key" \
--template ${TMPLFILE} \
cp template-krb5name.tmpl ${TMPLFILE}
echo "krb5_principal = 'comp1/comp2/comp3/comp4/comp5/comp6/comp7/comp8/comp9/comp10@REALM.COM'" >>${TMPLFILE}
-datefudge "2007-04-22" \
+datefudge -s "2007-04-22" \
${VALGRIND} "${CERTTOOL}" --generate-self-signed \
--load-privkey "${srcdir}/template-test.key" \
--template ${TMPLFILE} \
# time set using datefudge could have changed since the generation
# (if example the system was busy)
-rc=1
-counter=1
-
-while [ "${rc}" != "0" -a $counter -le 3 ]; do
- datefudge "2007-04-22" \
+datefudge -s "2007-04-22" \
"${CERTTOOL}" --generate-self-signed \
--load-privkey "${srcdir}/template-test.key" \
--template "${srcdir}/template-othername.tmpl" \
--outfile ${OUTFILE} 2>/dev/null
- ${DIFF} "${srcdir}/template-othername.pem" ${OUTFILE} >/dev/null 2>&1
- rc=$?
- test ${rc} != 0 && sleep 3
- counter=`expr $counter + 1`
-done
+${DIFF} "${srcdir}/template-othername.pem" ${OUTFILE} >/dev/null 2>&1
+rc=$?
# We're done.
if test "${rc}" != "0"; then
exit ${rc}
fi
-rc=1
-counter=1
-
-while [ "${rc}" != "0" -a $counter -le 3 ]; do
- datefudge "2007-04-22" \
+datefudge -s "2007-04-22" \
"${CERTTOOL}" --generate-self-signed \
--load-privkey "${srcdir}/template-test.key" \
--template "${srcdir}/template-othername-xmpp.tmpl" \
--outfile ${OUTFILE} 2>/dev/null
- ${DIFF} "${srcdir}/template-othername-xmpp.pem" ${OUTFILE} >/dev/null 2>&1
- rc=$?
- test ${rc} != 0 && sleep 3
- counter=`expr $counter + 1`
-done
+${DIFF} "${srcdir}/template-othername-xmpp.pem" ${OUTFILE} >/dev/null 2>&1
+rc=$?
# We're done.
if test "${rc}" != "0"; then
# Test SHA3 signatures
-rc=1
-counter=1
-
-while [ "${rc}" != "0" -a $counter -le 3 ]; do
- datefudge "2007-04-22" \
- "${CERTTOOL}" --generate-self-signed \
+datefudge -s "2007-04-22" \
+"${CERTTOOL}" --generate-self-signed \
--load-privkey "${srcdir}/template-test.key" \
--template "${srcdir}/template-test.tmpl" \
--outfile "${TMPFILE}" --hash sha3-256 2>/dev/null
- ${DIFF} "${srcdir}/template-rsa-sha3-256.pem" "${TMPFILE}" >/dev/null 2>&1
- rc=$?
- test ${rc} != 0 && sleep 3
- counter=`expr $counter + 1`
-done
+${DIFF} "${srcdir}/template-rsa-sha3-256.pem" "${TMPFILE}" >/dev/null 2>&1
+rc=$?
# We're done.
if test "${rc}" != "0"; then
exit ${rc}
fi
-datefudge "2007-04-25" \
+datefudge -s "2007-04-25" \
"${CERTTOOL}" --load-ca-certificate "${TMPFILE}" --verify --infile "${TMPFILE}" >/dev/null 2>&1
rc=$?
if test "${rc}" != "0"; then
fi
-rc=1
-counter=1
-
-while [ "${rc}" != "0" -a $counter -le 3 ]; do
- datefudge "2007-04-22" \
+datefudge -s "2007-04-22" \
"${CERTTOOL}" --generate-self-signed \
--load-privkey "${srcdir}/template-test.key" \
--template "${srcdir}/template-test.tmpl" \
--outfile "${TMPFILE}" --hash sha3-512 2>/dev/null
- ${DIFF} "${srcdir}/template-rsa-sha3-512.pem" "${TMPFILE}" >/dev/null 2>&1
- rc=$?
- test ${rc} != 0 && sleep 3
- counter=`expr $counter + 1`
-done
+${DIFF} "${srcdir}/template-rsa-sha3-512.pem" "${TMPFILE}" >/dev/null 2>&1
+rc=$?
# We're done.
if test "${rc}" != "0"; then
exit ${rc}
fi
-datefudge "2007-04-25" \
+datefudge -s "2007-04-25" \
"${CERTTOOL}" --load-ca-certificate "${TMPFILE}" --verify --infile "${TMPFILE}" >/dev/null 2>&1
rc=$?
if test "${rc}" != "0"; then
# Test SHA3 signatures with ECDSA
-datefudge "2007-04-22" \
+datefudge -s "2007-04-22" \
"${CERTTOOL}" --generate-self-signed \
--load-privkey "${srcdir}/template-test-ecc.key" \
--template "${srcdir}/template-test.tmpl" \
exit ${rc}
fi
-datefudge "2007-04-25" \
+datefudge -s "2007-04-25" \
"${CERTTOOL}" --load-ca-certificate "${TMPFILE}" --verify --infile "${TMPFILE}" >/dev/null 2>&1
rc=$?
if test "${rc}" != "0"; then
fi
-datefudge "2007-04-22" \
+datefudge -s "2007-04-22" \
"${CERTTOOL}" --generate-self-signed \
--load-privkey "${srcdir}/template-test-ecc.key" \
--template "${srcdir}/template-test.tmpl" \
exit ${rc}
fi
-datefudge "2007-04-25" \
+datefudge -s "2007-04-25" \
"${CERTTOOL}" --load-ca-certificate "${TMPFILE}" --verify --infile "${TMPFILE}" >/dev/null 2>&1
rc=$?
if test "${rc}" != "0"; then
# time set using datefudge could have changed since the generation
# (if example the system was busy)
-rc=1
-counter=1
-
-while [ "${rc}" != "0" -a $counter -le 3 ]; do
- datefudge "2007-04-22" \
+datefudge -s "2007-04-22" \
"${CERTTOOL}" --generate-self-signed \
--load-privkey "${srcdir}/template-test.key" \
--template "${srcdir}/template-test.tmpl" \
--outfile tmp-tt.pem 2>/dev/null
- ${DIFF} "${srcdir}/template-test.pem" tmp-tt.pem >/dev/null 2>&1
- rc=$?
- test ${rc} != 0 && sleep 3
- counter=`expr $counter + 1`
-done
+${DIFF} "${srcdir}/template-test.pem" tmp-tt.pem >/dev/null 2>&1
+rc=$?
# We're done.
if test "${rc}" != "0"; then
rm -f tmp-tt.pem
-rc=1
-counter=1
-
-while [ "${rc}" != "0" -a $counter -le 3 ]; do
- datefudge "2007-04-22" \
+datefudge -s "2007-04-22" \
"${CERTTOOL}" --generate-self-signed \
--load-privkey "${srcdir}/template-test.key" \
--template "${srcdir}/template-utf8.tmpl" \
--outfile tmp-tt.pem 2>/dev/null
- ${DIFF} "${srcdir}/template-utf8.pem" tmp-tt.pem >/dev/null 2>&1
- rc=$?
- test ${rc} != 0 && sleep 3
- counter=`expr $counter + 1`
-done
+${DIFF} "${srcdir}/template-utf8.pem" tmp-tt.pem >/dev/null 2>&1
+rc=$?
# We're done.
if test "${rc}" != "0"; then
rm -f tmp-tt.pem
-rc=1
-counter=1
-
-while [ "${rc}" != "0" -a $counter -le 3 ]; do
- datefudge "2007-04-22" \
+datefudge -s "2007-04-22" \
"${CERTTOOL}" --generate-self-signed \
--load-privkey "${srcdir}/template-test.key" \
--template "${srcdir}/template-dn.tmpl" \
--outfile tmp-tt.pem 2>/dev/null
- ${DIFF} "${srcdir}/template-dn.pem" tmp-tt.pem >/dev/null 2>&1
- rc=$?
- test ${rc} != 0 && sleep 3
- counter=`expr $counter + 1`
-done
+${DIFF} "${srcdir}/template-dn.pem" tmp-tt.pem >/dev/null 2>&1
+rc=$?
# We're done.
if test "${rc}" != "0"; then
rm -f tmp-tt.pem
-datefudge "2007-04-22" \
+datefudge -s "2007-04-22" \
"${CERTTOOL}" --generate-self-signed \
--load-privkey "${srcdir}/template-test.key" \
--template "${srcdir}/template-dn-err.tmpl" \
rm -f tmp-tt.pem
-rc=1
-counter=1
-
-while [ "${rc}" != "0" -a $counter -le 3 ]; do
- datefudge "2007-04-22" \
+datefudge -s "2007-04-22" \
"${CERTTOOL}" --generate-self-signed \
--load-privkey "${srcdir}/template-test.key" \
--template "${srcdir}/template-overflow.tmpl" \
--outfile tmp-tt.pem 2>/dev/null
- ${DIFF} "${srcdir}/template-overflow.pem" tmp-tt.pem >/dev/null 2>&1
- rc=$?
- test ${rc} != 0 && sleep 3
- counter=`expr $counter + 1`
-done
+${DIFF} "${srcdir}/template-overflow.pem" tmp-tt.pem >/dev/null 2>&1
+rc=$?
# We're done.
if test "${rc}" != "0"; then
# The following test works in 64-bit systems
if echo __SIZEOF_POINTER__ | cpp -E - - | grep '^8$' >/dev/null; then
-rc=1
-counter=1
-
-while [ "${rc}" != "0" -a $counter -le 3 ]; do
- datefudge "2007-04-22" \
+datefudge -s "2007-04-22" \
"${CERTTOOL}" --generate-self-signed \
--load-privkey "${srcdir}/template-test.key" \
--template "${srcdir}/template-overflow2.tmpl" \
--outfile tmp-tt.pem 2>/dev/null
- ${DIFF} "${srcdir}/template-overflow2.pem" tmp-tt.pem >/dev/null 2>&1
- rc=$?
- test ${rc} != 0 && sleep 3
- counter=`expr $counter + 1`
-done
+${DIFF} "${srcdir}/template-overflow2.pem" tmp-tt.pem >/dev/null 2>&1
+rc=$?
# We're done.
if test "${rc}" != "0"; then
rm -f tmp-tt.pem
fi
-rc=1
-counter=1
-
-while [ "${rc}" != "0" -a $counter -le 3 ]; do
- datefudge "2007-04-22" \
+datefudge -s "2007-04-22" \
"${CERTTOOL}" --generate-self-signed \
--load-privkey "${srcdir}/template-test.key" \
--template "${srcdir}/template-date.tmpl" \
--outfile tmp-tt.pem 2>/dev/null
- ${DIFF} "${srcdir}/template-date.pem" tmp-tt.pem >/dev/null 2>&1
- rc=$?
- test ${rc} != 0 && sleep 3
- counter=`expr $counter + 1`
-done
+${DIFF} "${srcdir}/template-date.pem" tmp-tt.pem >/dev/null 2>&1
+rc=$?
# We're done.
if test "${rc}" != "0"; then
# Test name constraints generation
-rc=1
-counter=1
-
-while [ "${rc}" != "0" -a $counter -le 3 ]; do
- datefudge "2007-04-22" \
+datefudge -s "2007-04-22" \
"${CERTTOOL}" --generate-self-signed \
--load-privkey "${srcdir}/template-test.key" \
--template "${srcdir}/template-nc.tmpl" \
--outfile tmp-tt.pem 2>/dev/null
- ${DIFF} "${srcdir}/template-nc.pem" tmp-tt.pem >/dev/null 2>&1
- rc=$?
- test ${rc} != 0 && sleep 3
- counter=`expr $counter + 1`
-done
+${DIFF} "${srcdir}/template-nc.pem" tmp-tt.pem >/dev/null 2>&1
+rc=$?
# We're done.
if test "${rc}" != "0"; then
# Test the GeneralizedTime support
if test "$(getconf LONG_BIT)" = "64"; then
# we should test that on systems which have 64-bit time_t.
- rc=1
- counter=1
-
- while [ "${rc}" != "0" -a $counter -le 3 ]; do
- datefudge "2051-04-22" \
+ datefudge -s "2051-04-22" \
"${CERTTOOL}" --generate-self-signed \
--load-privkey "${srcdir}/template-test.key" \
--template "${srcdir}/template-generalized.tmpl" \
--outfile tmp-tt.pem 2>/dev/null
- ${DIFF} "${srcdir}/template-generalized.pem" tmp-tt.pem >/dev/null 2>&1
- rc=$?
- test ${rc} != 0 && sleep 3
- counter=`expr $counter + 1`
- done
+ ${DIFF} "${srcdir}/template-generalized.pem" tmp-tt.pem >/dev/null 2>&1
+ rc=$?
# We're done.
if test "${rc}" != "0"; then
# Test unique ID field generation
-rc=1
-counter=1
-
-while [ "${rc}" != "0" -a $counter -le 3 ]; do
- datefudge "2007-04-22" \
+datefudge -s "2007-04-22" \
"${CERTTOOL}" --generate-self-signed \
--load-privkey "${srcdir}/template-test.key" \
--template "${srcdir}/template-unique.tmpl" \
--outfile tmp-tt.pem 2>/dev/null
- ${DIFF} "${srcdir}/template-unique.pem" tmp-tt.pem >/dev/null 2>&1
- rc=$?
- test ${rc} != 0 && sleep 3
- counter=`expr $counter + 1`
-done
+${DIFF} "${srcdir}/template-unique.pem" tmp-tt.pem >/dev/null 2>&1
+rc=$?
# We're done.
if test "${rc}" != "0"; then