fix typo for function name load_and_decrypt_key
Signed-off-by: Oguz Bektas <o.bektas@proxmox.com>
This commit is contained in:
		
				
					committed by
					
						
						Dietmar Maurer
					
				
			
			
				
	
			
			
			
						parent
						
							50af953e1b
						
					
				
				
					commit
					6d20a29d73
				
			@ -148,7 +148,7 @@ pub fn encrypt_key_with_passphrase(
 | 
			
		||||
    })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
pub fn load_and_decrtypt_key(path: &std::path::Path, passphrase: &dyn Fn() -> Result<Vec<u8>, Error>) -> Result<([u8;32], DateTime<Local>), Error> {
 | 
			
		||||
pub fn load_and_decrypt_key(path: &std::path::Path, passphrase: &dyn Fn() -> Result<Vec<u8>, Error>) -> Result<([u8;32], DateTime<Local>), Error> {
 | 
			
		||||
 | 
			
		||||
    let raw = file_get_contents(&path)?;
 | 
			
		||||
    let data = String::from_utf8(raw)?;
 | 
			
		||||
 | 
			
		||||
@ -558,7 +558,7 @@ async fn dump_catalog(param: Value) -> Result<Value, 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)?))
 | 
			
		||||
        }
 | 
			
		||||
    };
 | 
			
		||||
@ -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<Value, 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)?))
 | 
			
		||||
        }
 | 
			
		||||
    };
 | 
			
		||||
@ -1335,7 +1335,7 @@ async fn upload_log(param: Value) -> Result<Value, Error> {
 | 
			
		||||
    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<RawFd>) -> Result<Value, 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)?))
 | 
			
		||||
        }
 | 
			
		||||
    };
 | 
			
		||||
@ -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)?))
 | 
			
		||||
        }
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user