summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiga Murphy <giga1699@gmail.com>2026-01-03 21:24:07 +0000
committerGiga Murphy <giga1699@gmail.com>2026-01-03 21:24:07 +0000
commitc44d665dd4b77fa77b8d95ebce12217caaef3fc8 (patch)
tree80b0e19d4fab0d6e7314f1880ae7e7658e7486c7
parent76830afc8703a3f9f6be7500cb92aa9b6e255425 (diff)
downloadvyos-1x-c44d665dd4b77fa77b8d95ebce12217caaef3fc8.tar.gz
vyos-1x-c44d665dd4b77fa77b8d95ebce12217caaef3fc8.zip
T8146: Encryption without TPM confirm key
-rwxr-xr-xsrc/helpers/vyos-config-encrypt.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/helpers/vyos-config-encrypt.py b/src/helpers/vyos-config-encrypt.py
index c983e6065..6a6e6fc30 100755
--- a/src/helpers/vyos-config-encrypt.py
+++ b/src/helpers/vyos-config-encrypt.py
@@ -326,6 +326,9 @@ if __name__ == '__main__':
print('Backup the recovery key in a safe place!')
print('Recovery key: ' + recovery_key.decode())
elif args.enable:
+ if recovery_key != ask_input('Confirm key:', default=None, no_echo=True).encode():
+ raise ValueError("Keys did not match!")
+
encrypt_config(recovery_key, is_tpm=False)
print('Encrypted config volume has been enabled without TPM')