swtpm/tests/create_certs.sh
Stefan Berger 15226ad9a5 Support TPM 2 in swtpm_setup and swtpm_setup.sh
Support TPM 2 in swtpm_setup and swtpm_setup.sh.
Implement support for all command line options except for:
 o --take-ownership and anything related to ownership passwords
 o --lock-nvram
 o --display

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
2018-08-07 12:19:46 -04:00

44 lines
426 B
Bash
Executable File

#!/bin/bash
#echo $@
main() {
local typ ek dir vmid
while [ $# -ne 0 ]; do
#echo $1
case "$1" in
--type)
shift
typ="$1"
;;
--ek)
shift
ek="$1"
;;
--dir)
shift
dir="$1"
;;
--vmid)
shift
vmid="$1"
;;
--tpm2)
;;
esac
shift
done
case "$typ" in
ek)
echo -n "ek" > ${dir}/ek.cert
;;
platform)
echo -n "platform" > ${dir}/platform.cert
;;
esac
}
main "$@"