pub enum CmcErrorCode {
BadAlgorithm,
BadMessageCheck,
BadRequest,
BadTime,
BadCertId,
BadDataFormat,
WrongAuthority,
IncorrectData,
MissingTimestamp,
BadPop,
}Expand description
CMC error codes mapped to HTTP status codes (RHELBU-3536 R17).
RFC 5272 §15.2 defines CMC failure codes. These are mapped to HTTP status codes for the EST response.
Variants§
BadAlgorithm
badAlg (0) — unrecognized or unsupported algorithm.
BadMessageCheck
badMessageCheck (1) — integrity check failed.
BadRequest
badRequest (2) — transaction not permitted or supported.
BadTime
badTime (3) — message time field not sufficiently close to system time.
BadCertId
badCertId (4) — no certificate found matching provided criteria.
BadDataFormat
badDataFormat (5) — data not formatted as expected.
WrongAuthority
wrongAuthority (6) — wrong authority specified in request.
IncorrectData
incorrectData (7) — included data is incorrect.
MissingTimestamp
missingTimeStamp (8) — required timestamp missing.
BadPop
badPOP (9) — proof-of-possession failed.
Implementations§
Source§impl CmcErrorCode
impl CmcErrorCode
Sourcepub fn to_http_status(self) -> StatusCode
pub fn to_http_status(self) -> StatusCode
Map a CMC error code to an HTTP status code.
Trait Implementations§
Source§impl Clone for CmcErrorCode
impl Clone for CmcErrorCode
Source§fn clone(&self) -> CmcErrorCode
fn clone(&self) -> CmcErrorCode
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CmcErrorCode
impl Debug for CmcErrorCode
impl Copy for CmcErrorCode
Auto Trait Implementations§
impl Freeze for CmcErrorCode
impl RefUnwindSafe for CmcErrorCode
impl Send for CmcErrorCode
impl Sync for CmcErrorCode
impl Unpin for CmcErrorCode
impl UnsafeUnpin for CmcErrorCode
impl UnwindSafe for CmcErrorCode
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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>
Converts
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>
Converts
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