Skip to content

Commit a0b4ad6

Browse files
committed
tpm: T7726: Prompt user before clearing TPM key
1 parent c303aa6 commit a0b4ad6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/helpers/vyos-config-encrypt.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,8 @@ def decrypt_config(key):
198198
os.unlink(image_path)
199199

200200
try:
201-
clear_tpm_key()
201+
if ask_yes_no('Do you want to clear the TPM? This will cause issues if other system images use the key'):
202+
clear_tpm_key()
202203
except:
203204
pass
204205

0 commit comments

Comments
 (0)