mirror of
https://github.com/linuxboot/heads.git
synced 2024-12-21 13:57:52 +00:00
5bc2bc88e4
-qemu-coreboot-*whiptail-tpm1(-hotp) boards have 'export CONFIG_DEBUG_OUTPUT=y' by default now
25 lines
377 B
Bash
Executable File
25 lines
377 B
Bash
Executable File
#!/bin/sh
|
|
# get a file and extend a TPM PCR
|
|
. /etc/functions
|
|
|
|
die() {
|
|
DEBUG "Under /bin/wget-measure.sh:die"
|
|
echo >&2 "$@"
|
|
exit 1
|
|
}
|
|
|
|
INDEX="$1"
|
|
URL="$2"
|
|
|
|
if [ -z "$INDEX" -o -z "$URL" ]; then
|
|
die "Usage: $0 pcr-index url"
|
|
fi
|
|
|
|
|
|
wget "$URL" || die "$URL: failed"
|
|
|
|
FILE="`basename "$URL"`"
|
|
tpm extend -ix "$INDEX" -if "$FILE" || die "$FILE: tpm extend failed"
|
|
|
|
|