mirror of
https://github.com/edgelesssys/constellation.git
synced 2024-12-24 06:59:40 -05:00
image: fix pcr 12 calculation (#1706)
Kernel cmdline embedded in UKIs had no null terminator before. With newer versions of mkosi, it is already null-terminated so we shouldn't null terminate it twice.
This commit is contained in:
parent
1180b376fa
commit
cb6cc8df22
@ -23,9 +23,8 @@ cmdline_measure() {
|
||||
local path="$1"
|
||||
local tmp
|
||||
tmp=$(mktemp)
|
||||
# convert to utf-16le and add a null terminator
|
||||
# convert to utf-16le
|
||||
iconv -f utf-8 -t utf-16le "${path}" -o "${tmp}"
|
||||
truncate -s +2 "${tmp}"
|
||||
sha256sum "${tmp}" | cut -d " " -f 1
|
||||
rm "${tmp}"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user