File tree Expand file tree Collapse file tree 1 file changed +3
-15
lines changed
crates/bitwarden-vault/src/cipher Expand file tree Collapse file tree 1 file changed +3
-15
lines changed Original file line number Diff line number Diff line change @@ -41,21 +41,9 @@ 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 ( ) )
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" ) ) ?,
44
+ private_key : self . private_key . decrypt_with_key ( key) ?,
45
+ public_key : self . public_key . decrypt_with_key ( key) ?,
46
+ fingerprint : self . fingerprint . decrypt_with_key ( key) ?,
59
47
} )
60
48
}
61
49
}
You can’t perform that action at this time.
0 commit comments