diff --git a/src/backup/key_derivation.rs b/src/backup/key_derivation.rs index a842e9be..45c464aa 100644 --- a/src/backup/key_derivation.rs +++ b/src/backup/key_derivation.rs @@ -148,7 +148,7 @@ pub fn encrypt_key_with_passphrase( }) } -pub fn load_and_decrtypt_key(path: &std::path::Path, passphrase: &dyn Fn() -> Result, Error>) -> Result<([u8;32], DateTime), Error> { +pub fn load_and_decrypt_key(path: &std::path::Path, passphrase: &dyn Fn() -> Result, Error>) -> Result<([u8;32], DateTime), Error> { let raw = file_get_contents(&path)?; let data = String::from_utf8(raw)?; diff --git a/src/bin/proxmox-backup-client.rs b/src/bin/proxmox-backup-client.rs index 356813c9..07b2189a 100644 --- a/src/bin/proxmox-backup-client.rs +++ b/src/bin/proxmox-backup-client.rs @@ -558,7 +558,7 @@ async fn dump_catalog(param: Value) -> Result { let crypt_config = match keyfile { None => None, Some(path) => { - let (key, _) = load_and_decrtypt_key(&path, &get_encryption_key_password)?; + let (key, _) = load_and_decrypt_key(&path, &get_encryption_key_password)?; Some(Arc::new(CryptConfig::new(key)?)) } }; @@ -917,7 +917,7 @@ async fn create_backup( let (crypt_config, rsa_encrypted_key) = match keyfile { None => (None, None), Some(path) => { - let (key, created) = load_and_decrtypt_key(&path, &get_encryption_key_password)?; + let (key, created) = load_and_decrypt_key(&path, &get_encryption_key_password)?; let crypt_config = CryptConfig::new(key)?; @@ -1183,7 +1183,7 @@ async fn restore(param: Value) -> Result { let crypt_config = match keyfile { None => None, Some(path) => { - let (key, _) = load_and_decrtypt_key(&path, &get_encryption_key_password)?; + let (key, _) = load_and_decrypt_key(&path, &get_encryption_key_password)?; Some(Arc::new(CryptConfig::new(key)?)) } }; @@ -1335,7 +1335,7 @@ async fn upload_log(param: Value) -> Result { let crypt_config = match keyfile { None => None, Some(path) => { - let (key, _created) = load_and_decrtypt_key(&path, &get_encryption_key_password)?; + let (key, _created) = load_and_decrypt_key(&path, &get_encryption_key_password)?; let crypt_config = CryptConfig::new(key)?; Some(Arc::new(crypt_config)) } @@ -1794,7 +1794,7 @@ fn key_change_passphrase( bail!("unable to change passphrase - no tty"); } - let (key, created) = load_and_decrtypt_key(&path, &get_encryption_key_password)?; + let (key, created) = load_and_decrypt_key(&path, &get_encryption_key_password)?; if kdf == "scrypt" { @@ -1950,7 +1950,7 @@ async fn mount_do(param: Value, pipe: Option) -> Result { let crypt_config = match keyfile { None => None, Some(path) => { - let (key, _) = load_and_decrtypt_key(&path, &get_encryption_key_password)?; + let (key, _) = load_and_decrypt_key(&path, &get_encryption_key_password)?; Some(Arc::new(CryptConfig::new(key)?)) } }; @@ -2059,7 +2059,7 @@ async fn catalog_shell(param: Value) -> Result<(), Error> { let crypt_config = match keyfile { None => None, Some(path) => { - let (key, _) = load_and_decrtypt_key(&path, &get_encryption_key_password)?; + let (key, _) = load_and_decrypt_key(&path, &get_encryption_key_password)?; Some(Arc::new(CryptConfig::new(key)?)) } };