diff options
| author | Daniil Baturin <daniil@vyos.io> | 2026-01-06 13:30:41 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-01-06 13:30:41 +0000 |
| commit | 041b990ae1662b4ac7fe2fc4b62e1f624f5d6c9a (patch) | |
| tree | 60b5aca9b2a82a53aa14d2fdec9b6ac900aa1c17 /src | |
| parent | 0cabed862b93902b58f47fc45344d9f2d5e72377 (diff) | |
| parent | c44d665dd4b77fa77b8d95ebce12217caaef3fc8 (diff) | |
| download | vyos-1x-041b990ae1662b4ac7fe2fc4b62e1f624f5d6c9a.tar.gz vyos-1x-041b990ae1662b4ac7fe2fc4b62e1f624f5d6c9a.zip | |
Merge pull request #4935 from giga1699/T8146
T8146: Confirm the key when config encryption is configured without TPM
Diffstat (limited to 'src')
| -rwxr-xr-x | src/helpers/vyos-config-encrypt.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/helpers/vyos-config-encrypt.py b/src/helpers/vyos-config-encrypt.py index fdb8641e1..e035040e1 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') |
