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 <s.ivanov@proxmox.com>
This commit is contained in:
parent
57f472d9bb
commit
8c6854c8fd
|
@ -817,7 +817,10 @@ fn keyfile_parameters(param: &Value) -> Result<(Option<Vec<u8>>, CryptMode), Err
|
||||||
Ok(match (keydata, crypt_mode) {
|
Ok(match (keydata, crypt_mode) {
|
||||||
// no parameters:
|
// no parameters:
|
||||||
(None, None) => match key::read_optional_default_encryption_key()? {
|
(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),
|
None => (None, CryptMode::None),
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue