shred TOTP_SECRET also when generation is successful

This commit is contained in:
Thierry Laurion 2019-02-24 11:11:00 -05:00
parent 8310a3d62e
commit 2740317d67
No known key found for this signature in database
GPG Key ID: 79C78E6659DB658F

View File

@ -44,9 +44,11 @@ if ! tpm sealfile2 \
-ix 7 X \
; then
shred -n 10 -z -u "$TOTP_SECRET" 2> /dev/null
die "Unable to seal secret"
die "Unable to seal secret"
fi
shred -n 10 -z -u "$TOTP_SECRET" 2> /dev/null
# to create an nvram space we need the TPM owner password
# and the TPM physical presence must be asserted.