pub enum KeyPinError {
HistoryRewritten {
origin: String,
missing: usize,
pinned: usize,
},
HistoriesDiverge {
origin: String,
only_carried: usize,
only_local: usize,
},
EmptyHistory {
origin: String,
},
UnsupportedVersion {
found: u8,
supported: u8,
},
CorruptPin {
origin: String,
reason: String,
},
Codec(CanonicalError),
Io(String),
}Expand description
Errors pinning or reading a server’s attestation-key history.
Variants§
HistoryRewritten
The server no longer publishes a key this library pinned for it: its history was rewritten, not extended. The pin is unchanged and nothing the server signs is trusted.
Fields
HistoriesDiverge
A backup carries a pinned history for an origin that neither extends nor is extended by the one this library pins: each holds a key the other lacks. Neither pin is trusted over the other, so the restore is refused and the library’s pin is left exactly as it was.
Fields
EmptyHistory
The server published no attestation key at all, so there is nothing to pin and nothing a receipt could verify under.
UnsupportedVersion
The pin file was written by a schema this build does not know.
Fields
CorruptPin
A pinned key’s bytes no longer decode as a key.
Fields
Codec(CanonicalError)
The pin file could not be decoded or encoded.
Io(String)
A filesystem error reading or writing the pin file.
Trait Implementations§
Source§impl Debug for KeyPinError
impl Debug for KeyPinError
Source§impl Display for KeyPinError
impl Display for KeyPinError
Source§impl Error for KeyPinError
impl Error for KeyPinError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<CanonicalError> for KeyPinError
impl From<CanonicalError> for KeyPinError
Source§impl From<KeyPinError> for BackupError
A pin failure during a backup restore, as the backup error the restore reports: a diverged
history keeps its counts, everything else its message.
impl From<KeyPinError> for BackupError
A pin failure during a backup restore, as the backup error the restore reports: a diverged history keeps its counts, everything else its message.
Source§fn from(error: KeyPinError) -> Self
fn from(error: KeyPinError) -> Self
Auto Trait Implementations§
impl Freeze for KeyPinError
impl RefUnwindSafe for KeyPinError
impl Send for KeyPinError
impl Sync for KeyPinError
impl Unpin for KeyPinError
impl UnsafeUnpin for KeyPinError
impl UnwindSafe for KeyPinError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more