Skip to content

Commit d8f267f

Browse files
committed
Make export ssh-key fields non-optional
1 parent 78684b4 commit d8f267f

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

crates/bitwarden-exporters/src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,9 +137,9 @@ pub struct Identity {
137137

138138
pub struct SshKey {
139139
/// [OpenSSH private key](https://github.com/openssh/openssh-portable/blob/master/PROTOCOL.key), in PEM encoding.
140-
pub private_key: Option<String>,
140+
pub private_key: String,
141141
/// Ssh public key (ed25519/rsa) according to [RFC4253](https://datatracker.ietf.org/doc/html/rfc4253#section-6.6)
142-
pub public_key: Option<String>,
142+
pub public_key: String,
143143
/// SSH fingerprint using SHA256 in the format: `SHA256:BASE64_ENCODED_FINGERPRINT`
144-
pub fingerprint: Option<String>,
144+
pub fingerprint: String,
145145
}

crates/bitwarden-exporters/src/models.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,9 @@ impl TryFrom<CipherView> for crate::Cipher {
7777
CipherType::SshKey => {
7878
let s = require!(value.ssh_key);
7979
crate::CipherType::SshKey(Box::new(crate::SshKey {
80-
private_key: Some(s.private_key),
81-
public_key: Some(s.public_key),
82-
fingerprint: Some(s.fingerprint),
80+
private_key: s.private_key,
81+
public_key: s.public_key,
82+
fingerprint: s.fingerprint,
8383
}))
8484
}
8585
};

0 commit comments

Comments
 (0)