Skip to content

Commit

Permalink
Error expansion seems to be missed
Browse files Browse the repository at this point in the history
Fixes: latchset#393

Signed-off-by: Sergio Arroutbi <[email protected]>
  • Loading branch information
sarroutbi committed Dec 2, 2022
1 parent 3999199 commit dd63299
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/luks/clevis-luks-report
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,13 @@ report_sss() {
[ -z "${content}" ] && return 1

local jwe
for jwe in $(jose fmt --json="${content}" --get jwe --foreach=-); do
local jwe_list
if ! jwe_list="$(jose fmt --json="${content}" --get jwe --foreach=-);"; then
return 1
fi
for jwe in $jwe_list; do
jwe="$(printf '%s' "${jwe}" | sed -e 's/"//g')"
report_decode "${jwe}"
report_decode "${jwe}" || return 1
done
}

Expand Down Expand Up @@ -129,10 +133,10 @@ report_decode() {

case "${pin}" in
tang)
report_tang "${content}"
report_tang "${content}" || return 1
;;
sss)
report_sss "${content}"
report_sss "${content}" || return 1
;;
esac
}
Expand Down

0 comments on commit dd63299

Please sign in to comment.