Skip to content

Commit

Permalink
Make export ssh-key fields non-optional
Browse files Browse the repository at this point in the history
  • Loading branch information
quexten committed Oct 28, 2024
1 parent 78684b4 commit d8f267f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions crates/bitwarden-exporters/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,9 @@ pub struct Identity {

pub struct SshKey {
/// [OpenSSH private key](https://github.com/openssh/openssh-portable/blob/master/PROTOCOL.key), in PEM encoding.
pub private_key: Option<String>,
pub private_key: String,
/// Ssh public key (ed25519/rsa) according to [RFC4253](https://datatracker.ietf.org/doc/html/rfc4253#section-6.6)
pub public_key: Option<String>,
pub public_key: String,
/// SSH fingerprint using SHA256 in the format: `SHA256:BASE64_ENCODED_FINGERPRINT`
pub fingerprint: Option<String>,
pub fingerprint: String,
}
6 changes: 3 additions & 3 deletions crates/bitwarden-exporters/src/models.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,9 @@ impl TryFrom<CipherView> for crate::Cipher {
CipherType::SshKey => {
let s = require!(value.ssh_key);
crate::CipherType::SshKey(Box::new(crate::SshKey {
private_key: Some(s.private_key),
public_key: Some(s.public_key),
fingerprint: Some(s.fingerprint),
private_key: s.private_key,
public_key: s.public_key,
fingerprint: s.fingerprint,
}))
}
};
Expand Down

0 comments on commit d8f267f

Please sign in to comment.