exit 77
fi
+if [ -z "$(type openssl)" ]; then
+ echo "Openssl command line tool is required."
+ exit 1
+fi
+
ROOT=${abs_top_builddir:-$(pwd)/..}
TESTDIR=${abs_top_testdir:-$(dirname "$0")}
ABSTESTDIR=$(cd ${TESTDIR} &>/dev/null;echo ${PWD})
trap "cleanup" EXIT
source ${TESTDIR}/common
-WORKDIR=$(mktemp -d)
+skip_test_no_tpm20 "${SWTPM_EXE}"
+
+WORKDIR="$(mktemp -d)" || exit 1
REGLOG=${WORKDIR}/reglog
exit 1
fi
+# To be able to apply the patches we need to to set some variables
+# for user that don't have this set up properly
+git config --local user.name test
+git config --local user.email test@test.test
+
# A v1.6.0 bug work-around:
# We cannot run the EK certificate tests since rootcerts.txt points to
# files we do not have
# set CRYPTOLIBRARY=openssl
git am < ${PATCHESDIR}/0003-Set-CRYPTOLIBRARY-to-openssl.patch
-# Store volatile state at every step
-git am < ${PATCHESDIR}/0004-Store-volatile-state-at-every-step.patch
+# Store and restore volatile state at every step
+git am < ${PATCHESDIR}/0004-Store-and-restore-volatile-state-at-every-step.patch
# Disable 'Events' test
git am < ${PATCHESDIR}/0005-Disable-tests-related-to-events.patch
git am < ${PATCHESDIR}/0009-Disable-getcapability-TPM_CAP_ACT.patch
fi
+if [ -n "$(openssl version | grep -E "^OpenSSL 3")" ]; then
+ git am < ${PATCHESDIR}/0010-Adjust-test-cases-for-OpenSSL-3.patch
+fi
+
autoreconf --force --install
unset CFLAGS LDFLAGS LIBS
./configure --disable-tpm-1.2
[ $ret -eq 0 ] && echo "OK"
-exit $ret
\ No newline at end of file
+exit $ret