1use bitwarden_error::bitwarden_error;
2use thiserror::Error;
3
4#[allow(missing_docs)]
5#[bitwarden_error(flat)]
6#[derive(Error, Debug)]
7pub enum KeyGenerationError {
8 #[error("Failed to generate key: {0}")]
9 KeyGenerationError(ssh_key::Error),
10 #[error("Failed to convert key")]
11 KeyConversionError,
12}
13
14#[allow(missing_docs)]
15#[bitwarden_error(flat)]
16#[derive(Error, Debug, PartialEq)]
17pub enum SshKeyImportError {
18 #[error("Failed to parse key")]
19 ParsingError,
20 #[error("Password required")]
21 PasswordRequired,
22 #[error("Wrong password")]
23 WrongPassword,
24 #[error("Unsupported key type")]
25 UnsupportedKeyType,
26}
27
28#[allow(missing_docs)]
29#[bitwarden_error(flat)]
30#[derive(Error, Debug, PartialEq)]
31pub enum SshKeyExportError {
32 #[error("Failed to convert key")]
33 KeyConversionError,
34}