Skip to content

Commit

Permalink
Merge pull request #336 from jpculp/hmac-bugfix
Browse files Browse the repository at this point in the history
imghelper: remove full path from .vmlinuz.hmac
  • Loading branch information
jpculp authored Jul 26, 2024
2 parents 0e3b651 + 84d0c29 commit e2a9fa6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion twoliter/embedded/imghelper
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,7 @@ sbsetup_signing_profile() {
undo_sign() {
local what
what="${1:?}"
# shellcheck disable=SC2076 # literal match is intended.
if [[ ! "$(pesign -i "${what}" -l)" =~ 'No signatures found.' ]]; then
mv "${what}" "${what}.orig"
pesign -i "${what}.orig" -o "${what}" -u 0 -r
Expand Down Expand Up @@ -574,7 +575,7 @@ generate_hmac() {
local vmlinuz
vmlinuz="${1:?}"
openssl sha512 -hmac FIPS-FTW-RHT2009 -hex "${vmlinuz}" |
awk -v vmlinuz="${vmlinuz}" '{ print $2 " " vmlinuz }' \
awk '{ print $2 " vmlinuz" }' \
>"${vmlinuz%/*}/.${vmlinuz##*/}.hmac"
}

Expand Down

0 comments on commit e2a9fa6

Please sign in to comment.