src/zlevis-decrypt: update
Silenced tpm2_unseal error when TPM is empty.
This commit is contained in:
parent
8bf01a4a03
commit
4a3b0583c4
1 changed files with 2 additions and 2 deletions
|
@ -122,7 +122,7 @@ rm -f "$tmp_jwk_pub" "$tmp_jwk_priv" "$tmp_primary_context"
|
|||
|
||||
# Unseal the JWK from the TPM
|
||||
case "$tpm2tools_version" in
|
||||
4|5) jwk="$(tpm2_unseal -c "$tmp_load_context" ${pcr_spec:+-p pcr:$pcr_spec})" || fail=$?;;
|
||||
4|5) jwk="$(tpm2_unseal -c "$tmp_load_context" ${pcr_spec:+-p pcr:$pcr_spec} 2>/dev/null)" || fail=$?;;
|
||||
*) fail=1;;
|
||||
esac
|
||||
if [ -n "$fail" ]; then
|
||||
|
@ -138,4 +138,4 @@ rm -f "$tmp_load_context"
|
|||
(echo "$jwk$hdr."; /bin/cat) | jose jwe dec -k- -i-
|
||||
|
||||
# Exit with the status of the last command
|
||||
exit $?
|
||||
exit $?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue