tor_key_forge/
err.rs

1//! An error type for the `tor-key-forge` crate.
2
3use crate::ssh::SshKeyAlgorithm;
4
5/// An Error type for this crate.
6#[derive(thiserror::Error, Debug, Clone)]
7#[non_exhaustive]
8pub enum Error {
9    /// Attempted to use an unsupported key.
10    #[error("Unsupported key algorithm {0}")]
11    UnsupportedKeyAlgorithm(SshKeyAlgorithm),
12
13    /// Failed to parse certificate.
14    #[error("Failed to parse certificate")]
15    CertParse(tor_bytes::Error),
16
17    /// An internal error.
18    #[error("Internal error")]
19    Bug(#[from] tor_error::Bug),
20}