mirror of
https://github.com/stefanberger/swtpm.git
synced 2026-08-16 21:04:32 +00:00
swtpm_setup: remove PATH extension to local dir
Remove the extension of PATH to the local dir('.') from swtpm_setup.sh
and adapt test cases accordingly.
Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
This commit is contained in:
parent
4f185f6e45
commit
84d2e89a74
@ -154,7 +154,7 @@ call_create_certs()
|
||||
create_certs_tool_options="$(sed -n 's/\s*create_certs_tool_options\s*=\s*\([^#]*\).*/\1/p' \
|
||||
"$configfile")"
|
||||
if [ -n "$create_certs_tool_options" ]; then
|
||||
params="$params --optsfile $create_certs_tool_options"
|
||||
params="$params --optsfile \"$create_certs_tool_options\""
|
||||
fi
|
||||
else
|
||||
logerr "Could not access config file" \
|
||||
@ -409,7 +409,6 @@ init_tpm()
|
||||
|
||||
export TCSD_USE_TCP_DEVICE=1
|
||||
export TCSD_TCP_DEVICE_PORT=$TPM_PORT
|
||||
PATH=$PATH:.
|
||||
|
||||
swtpm_bios
|
||||
if [ $? -ne 0 ]; then
|
||||
|
||||
@ -81,6 +81,11 @@ if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# swtpm_setup.conf points to the local create_certs.sh
|
||||
# For create_certs.sh to be found (with out full path)
|
||||
# add this directory to the PATH
|
||||
PATH=$PATH:$PWD
|
||||
|
||||
for (( i=0; i<${#PARAMETERS[*]}; i++)); do
|
||||
rm -rf $TPMDIR/*
|
||||
echo -n "Test $i: "
|
||||
|
||||
@ -6,6 +6,7 @@ DIR=$(dirname "$0")
|
||||
ROOT=${DIR}/..
|
||||
SWTPM_SETUP=${ROOT}/src/swtpm_setup/swtpm_setup
|
||||
SWTPM_LOCALCA=${ROOT}/samples/swtpm-localca
|
||||
SWTPM=${ROOT}/src/swtpm/swtpm
|
||||
|
||||
workdir=$(mktemp -d)
|
||||
|
||||
@ -13,6 +14,8 @@ SIGNINGKEY=${workdir}/signingkey.pem
|
||||
ISSUERCERT=${workdir}/issuercert.pem
|
||||
CERTSERIAL=${workdir}/certserial
|
||||
|
||||
PATH=${PWD}/${ROOT}/src/swtpm_bios:$PATH
|
||||
|
||||
trap "cleanup" SIGTERM EXIT
|
||||
|
||||
function cleanup()
|
||||
@ -52,7 +55,8 @@ $SWTPM_SETUP \
|
||||
--tpm-state ${workdir} \
|
||||
--create-ek-cert \
|
||||
--config ${workdir}/swtpm_setup.conf \
|
||||
--logfile ${workdir}/logfile
|
||||
--logfile ${workdir}/logfile \
|
||||
--tpm "${SWTPM} socket"
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Error: Could not run $SWTPM_SETUP."
|
||||
|
||||
Loading…
Reference in New Issue
Block a user