Skip to content

Commit

Permalink
Add documentation for ssh key formats
Browse files Browse the repository at this point in the history
  • Loading branch information
quexten committed Oct 1, 2024
1 parent a687404 commit eac218c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions crates/bitwarden-vault/src/cipher/ssh_key.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,23 @@ use serde::{Deserialize, Serialize};
#[serde(rename_all = "camelCase", deny_unknown_fields)]
#[cfg_attr(feature = "uniffi", derive(uniffi::Record))]
pub struct SshKey {
/// Ssh private key (ed25519/rsa) in unencrypted openssh private key format https://github.com/openssh/openssh-portable/blob/master/PROTOCOL.key
pub private_key: Option<EncString>,
/// Ssh public key (ed25519/rsa) according to RFC4253 https://datatracker.ietf.org/doc/html/rfc4253#section-6.6
pub public_key: Option<EncString>,
/// Ssh fingerprint using SHA256 in the format: SHA256:BASE64_ENCODED_FINGERPRINT
pub fingerprint: Option<EncString>,
}

#[derive(Serialize, Deserialize, Debug, JsonSchema, Clone)]
#[serde(rename_all = "camelCase", deny_unknown_fields)]
#[cfg_attr(feature = "uniffi", derive(uniffi::Record))]
pub struct SshKeyView {
/// Ssh private key (ed25519/rsa) in unencrypted openssh private key format https://github.com/openssh/openssh-portable/blob/master/PROTOCOL.key
pub private_key: Option<String>,
/// Ssh public key (ed25519/rsa) according to RFC4253 https://datatracker.ietf.org/doc/html/rfc4253#section-6.6
pub public_key: Option<String>,
/// Ssh fingerprint using SHA256 in the format: SHA256:BASE64_ENCODED_FINGERPRINT
pub fingerprint: Option<String>,
}

Expand Down

0 comments on commit eac218c

Please sign in to comment.