File tree Expand file tree Collapse file tree 1 file changed +15
-3
lines changed
crates/bitwarden-vault/src/cipher Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -41,9 +41,21 @@ impl KeyEncryptable<SymmetricCryptoKey, SshKey> for SshKeyView {
41
41
impl KeyDecryptable < SymmetricCryptoKey , SshKeyView > for SshKey {
42
42
fn decrypt_with_key ( & self , key : & SymmetricCryptoKey ) -> Result < SshKeyView , CryptoError > {
43
43
Ok ( SshKeyView {
44
- private_key : Some ( self . private_key . clone ( ) ) . decrypt_with_key ( key) . ok ( ) . flatten ( ) . ok_or ( CryptoError :: MissingField ( "private_key" ) ) ?,
45
- public_key : Some ( self . public_key . clone ( ) ) . decrypt_with_key ( key) . ok ( ) . flatten ( ) . ok_or ( CryptoError :: MissingField ( "public_key" ) ) ?,
46
- fingerprint : Some ( self . fingerprint . clone ( ) ) . decrypt_with_key ( key) . ok ( ) . flatten ( ) . ok_or ( CryptoError :: MissingField ( "fingerprint" ) ) ?,
44
+ private_key : Some ( self . private_key . clone ( ) )
45
+ . decrypt_with_key ( key)
46
+ . ok ( )
47
+ . flatten ( )
48
+ . ok_or ( CryptoError :: MissingField ( "private_key" ) ) ?,
49
+ public_key : Some ( self . public_key . clone ( ) )
50
+ . decrypt_with_key ( key)
51
+ . ok ( )
52
+ . flatten ( )
53
+ . ok_or ( CryptoError :: MissingField ( "public_key" ) ) ?,
54
+ fingerprint : Some ( self . fingerprint . clone ( ) )
55
+ . decrypt_with_key ( key)
56
+ . ok ( )
57
+ . flatten ( )
58
+ . ok_or ( CryptoError :: MissingField ( "fingerprint" ) ) ?,
47
59
} )
48
60
}
49
61
}
You can’t perform that action at this time.
0 commit comments