mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-08-03 20:44:14 -04: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. Co-authored-by: Malte Poll <1780588+malt3@users.noreply.github.com>
This commit is contained in:
parent
c2439cbf74
commit
9bee6fc69c
1 changed files with 1 additions and 2 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue