ex3_ic_agent/identity/
error.rs1use thiserror::Error;
2
3#[derive(Error, Debug)]
5pub enum PemError {
6 #[error(transparent)]
8 Io(#[from] std::io::Error),
9
10 #[error("Only secp256k1 curve is supported: {0:?}")]
12 UnsupportedKeyCurve(Vec<u8>),
13
14 #[cfg(feature = "pem")]
16 #[error("An error occurred while reading the file: {0}")]
17 PemError(#[from] pem::PemError),
18
19 #[error("A key was rejected by Ring: {0}")]
21 KeyRejected(#[from] ring::error::KeyRejected),
22
23 #[error("A key was rejected by k256: {0}")]
25 ErrorStack(#[from] k256::pkcs8::Error),
26}