diff options
author | Quentin Dufour <quentin@deuxfleurs.fr> | 2023-12-12 09:17:59 +0100 |
---|---|---|
committer | Quentin Dufour <quentin@deuxfleurs.fr> | 2023-12-12 09:17:59 +0100 |
commit | 47e25cd7f710fcd82356377cf48eccf9f65d31cc (patch) | |
tree | b847e1b83b6608047d666acc4856113604fc0dbd /src/login/static_provider.rs | |
parent | 23f918fd0edb224668fb775c770075eb4f44ce4d (diff) | |
download | aerogramme-47e25cd7f710fcd82356377cf48eccf9f65d31cc.tar.gz aerogramme-47e25cd7f710fcd82356377cf48eccf9f65d31cc.zip |
WIP
Diffstat (limited to 'src/login/static_provider.rs')
-rw-r--r-- | src/login/static_provider.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/login/static_provider.rs b/src/login/static_provider.rs index 0f6ab3a..7fadf2f 100644 --- a/src/login/static_provider.rs +++ b/src/login/static_provider.rs @@ -83,15 +83,15 @@ impl LoginProvider for StaticLoginProvider { }; let keys = match &user.crypto_root { /*(&user.master_key, &user.secret_key) {*/ - CryptographyRoot::InPlace { master_key: m, secret_key: s } => { + CryptographyRoot::ClearText { master_key: m, secret_key: s } => { let master_key = Key::from_slice(&base64::decode(m)?).ok_or(anyhow!("Invalid master key"))?; let secret_key = SecretKey::from_slice(&base64::decode(s)?) .ok_or(anyhow!("Invalid secret key"))?; CryptoKeys::open_without_password(&storage, &master_key, &secret_key).await? } - CryptographyRoot::PasswordProtected => { - CryptoKeys::open(&storage, password).await? + CryptographyRoot::PasswordProtected { root_blob } => { + CryptoKeys::open(password, root_blob).await? } CryptographyRoot::Keyring => unimplemented!(), }; |