From c44d665dd4b77fa77b8d95ebce12217caaef3fc8 Mon Sep 17 00:00:00 2001 From: Giga Murphy Date: Sat, 3 Jan 2026 21:24:07 +0000 Subject: T8146: Encryption without TPM confirm key --- src/helpers/vyos-config-encrypt.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/helpers') 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') -- cgit v1.2.3