From 8c6854c8fd613c400ee7609f56b06a3a2c479d4b Mon Sep 17 00:00:00 2001 From: Stoiko Ivanov Date: Wed, 11 Nov 2020 15:33:21 +0000 Subject: [PATCH] inform user when using default encryption key Currently if you generate a default encryption key: `proxmox-backup-client key create --kdf none` all backup operations which don't explicitly disable encryption will be encrypted with this key. I found it quite surprising, that my backups were all encrypted without me explicitly specfying neither key nor encryption mode This patch informs the user when the default key is used (and no crypt-mode is provided explicitly) Signed-off-by: Stoiko Ivanov --- src/bin/proxmox-backup-client.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/bin/proxmox-backup-client.rs b/src/bin/proxmox-backup-client.rs index 2d05f622..79031d72 100644 --- a/src/bin/proxmox-backup-client.rs +++ b/src/bin/proxmox-backup-client.rs @@ -817,7 +817,10 @@ fn keyfile_parameters(param: &Value) -> Result<(Option>, CryptMode), Err Ok(match (keydata, crypt_mode) { // no parameters: (None, None) => match key::read_optional_default_encryption_key()? { - Some(key) => (Some(key), CryptMode::Encrypt), + Some(key) => { + println!("Encrypting with default encryption key!"); + (Some(key), CryptMode::Encrypt) + }, None => (None, CryptMode::None), },