mirror of
https://github.com/stefanberger/swtpm.git
synced 2026-01-13 19:09:39 +00:00
tests: Move setting CERRTOOL variable to tests-common
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
This commit is contained in:
parent
ef1407f56d
commit
e5bb6f4ec5
@ -7,6 +7,13 @@ SWTPM_SETUP=${SWTPM_SETUP:-${ROOT}/src/swtpm_setup/swtpm_setup}
|
||||
SWTPM_CERT=${SWTPM_CERT:-${ROOT}/src/swtpm_cert/swtpm_cert}
|
||||
ECHO=$(type -P echo)
|
||||
|
||||
case "$(uname -s)" in
|
||||
Darwin)
|
||||
CERTTOOL=gnutls-certtool;;
|
||||
*)
|
||||
CERTTOOL=certtool;;
|
||||
esac
|
||||
|
||||
# Note: Do not use file descriptors above 127 due to OpenBSD.
|
||||
|
||||
# Kill a process quietly
|
||||
|
||||
@ -76,13 +76,6 @@ function cleanup()
|
||||
trap "cleanup" SIGTERM EXIT
|
||||
source ${TESTDIR}/common
|
||||
|
||||
case "$(uname -s)" in
|
||||
Darwin)
|
||||
CERTTOOL=gnutls-certtool;;
|
||||
*)
|
||||
CERTTOOL=certtool;;
|
||||
esac
|
||||
|
||||
PATH=${ROOT}/src/swtpm_bios:${ROOT}/src/swtpm_cert:${PATH}
|
||||
|
||||
# run the test with the given owner and SRK passwords
|
||||
|
||||
@ -85,13 +85,6 @@ function cleanup()
|
||||
trap "cleanup" SIGTERM EXIT
|
||||
source ${TESTDIR}/common
|
||||
|
||||
case "$(uname -s)" in
|
||||
Darwin)
|
||||
CERTTOOL=gnutls-certtool;;
|
||||
*)
|
||||
CERTTOOL=certtool;;
|
||||
esac
|
||||
|
||||
PATH=${ROOT}/src/swtpm_bios:${ROOT}/src/swtpm_cert:${PATH}
|
||||
|
||||
# Run the tests
|
||||
|
||||
@ -22,6 +22,8 @@ CERTSERIAL=${workdir}/certserial
|
||||
|
||||
PATH=${TOPBUILD}/src/swtpm_cert:$PATH
|
||||
|
||||
source ${TESTDIR}/common
|
||||
|
||||
trap "cleanup" SIGTERM EXIT
|
||||
|
||||
function cleanup()
|
||||
@ -29,13 +31,6 @@ function cleanup()
|
||||
rm -rf "${workdir}"
|
||||
}
|
||||
|
||||
case "$(uname -s)" in
|
||||
Darwin)
|
||||
CERTTOOL=gnutls-certtool;;
|
||||
*)
|
||||
CERTTOOL=certtool;;
|
||||
esac
|
||||
|
||||
cat <<_EOF_ > "${workdir}/swtpm-localca.conf"
|
||||
statedir=${workdir}
|
||||
signingkey = ${SIGNINGKEY}
|
||||
|
||||
@ -33,6 +33,8 @@ CERTSERIAL=${workdir}/certserial
|
||||
|
||||
PATH=${TOPBUILD}/src/swtpm_cert:$PATH
|
||||
|
||||
source ${TESTDIR}/common
|
||||
|
||||
trap "cleanup" SIGTERM EXIT
|
||||
|
||||
function cleanup()
|
||||
@ -41,13 +43,6 @@ function cleanup()
|
||||
${TESTDIR}/softhsm_setup teardown
|
||||
}
|
||||
|
||||
case "$(uname -s)" in
|
||||
Darwin)
|
||||
CERTTOOL=gnutls-certtool;;
|
||||
*)
|
||||
CERTTOOL=certtool;;
|
||||
esac
|
||||
|
||||
unset GNUTLS_PIN
|
||||
export PIN="abcdef"
|
||||
|
||||
|
||||
@ -49,13 +49,6 @@ source ${TESTDIR}/common
|
||||
|
||||
trap "cleanup" SIGTERM EXIT
|
||||
|
||||
case "$(uname -s)" in
|
||||
Darwin)
|
||||
CERTTOOL=gnutls-certtool;;
|
||||
*)
|
||||
CERTTOOL=certtool;;
|
||||
esac
|
||||
|
||||
function cleanup()
|
||||
{
|
||||
rm -rf $TPMDIR
|
||||
|
||||
Loading…
Reference in New Issue
Block a user