mirror of
https://github.com/linuxboot/heads.git
synced 2024-12-19 21:17:55 +00:00
tpmr: Don't add newline when extending PCR with literal data
tpmr extend with -ic (extend with literal data) was adding a newline, use echo -n so it only includes the data given in the hash. Signed-off-by: Jonathon Hall <jonathon.hall@puri.sm>
This commit is contained in:
parent
809b55666b
commit
641bea4d46
@ -26,10 +26,10 @@ tpm2_extend() {
|
||||
index="$2"
|
||||
shift 2;;
|
||||
-ic)
|
||||
hash="`echo $2|sha256sum|cut -d' ' -f1`"
|
||||
hash="$(echo -n "$2"|sha256sum|cut -d' ' -f1)"
|
||||
shift 2;;
|
||||
-if)
|
||||
hash="`sha256sum $2|cut -d' ' -f1`"
|
||||
hash="$(sha256sum "$2"|cut -d' ' -f1)"
|
||||
shift 2;;
|
||||
*)
|
||||
break;;
|
||||
|
Loading…
Reference in New Issue
Block a user