mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-05-05 07:45:27 -04:00
misc: replace sha256sum with shasum -a 256 (#1681)
This commit is contained in:
parent
53d8a2d67e
commit
ec1d5e9fb5
10 changed files with 24 additions and 24 deletions
|
@ -26,7 +26,7 @@ cmdline_measure() {
|
|||
# convert to utf-16le and add a null terminator
|
||||
iconv -f utf-8 -t utf-16le "${path}" -o "${tmp}"
|
||||
truncate -s +2 "${tmp}"
|
||||
sha256sum "${tmp}" | cut -d " " -f 1
|
||||
shasum -a 256 "${tmp}" | cut -d " " -f 1
|
||||
rm "${tmp}"
|
||||
}
|
||||
|
||||
|
@ -62,11 +62,11 @@ cmdline_hash=$(cmdline_measure "${DIR}/cmdline")
|
|||
cleanup "${DIR}"
|
||||
|
||||
expected_pcr_12=0000000000000000000000000000000000000000000000000000000000000000
|
||||
expected_pcr_12=$(pcr_extend "${expected_pcr_12}" "${cmdline_hash}" "sha256sum")
|
||||
expected_pcr_12=$(pcr_extend "${expected_pcr_12}" "${cmdline_hash}" "shasum -a 256")
|
||||
if [[ ${CSP} == "azure" ]]; then
|
||||
# Azure displays the boot menu
|
||||
# triggering an extra measurement of the kernel command line.
|
||||
expected_pcr_12=$(pcr_extend "${expected_pcr_12}" "${cmdline_hash}" "sha256sum")
|
||||
expected_pcr_12=$(pcr_extend "${expected_pcr_12}" "${cmdline_hash}" "shasum -a 256")
|
||||
fi
|
||||
|
||||
echo "Kernel commandline: ${cmdline}"
|
||||
|
|
|
@ -20,7 +20,7 @@ get_initrd_from_uki() {
|
|||
|
||||
initrd_measure() {
|
||||
local path="$1"
|
||||
sha256sum "${path}" | cut -d " " -f 1
|
||||
shasum -a 256 "${path}" | cut -d " " -f 1
|
||||
}
|
||||
|
||||
write_output() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue