pub enum CmpMessageType {
Show 13 variants
Ir,
Ip,
Cr,
Cp,
Kur,
Kup,
Rr,
Rp,
GenM,
GenP,
Error,
CertConf,
PkiConf,
}Expand description
CMP message type, identified by the implicit tag on the PKIBody choice within PKIMessage (RFC 9810 §5.3).
Each variant corresponds to a specific CMP operation. Request
types have matching response types (e.g., Ir → Ip).
Variants§
Ir
Initialization request (tag 0) — new certificate enrollment with no prior credential.
Ip
Initialization response (tag 1).
Cr
Certification request (tag 2) — standard enrollment with an existing credential.
Cp
Certification response (tag 3).
Kur
Key update request (tag 7) — re-enrollment / key rollover.
Kup
Key update response (tag 8).
Rr
Revocation request (tag 11).
Rp
Revocation response (tag 12).
GenM
General message (tag 21) — CA information, supported algorithms.
GenP
General response (tag 22).
Error
Error message (tag 23).
CertConf
Certificate confirmation (tag 24).
PkiConf
PKI confirmation (tag 25).
Implementations§
Source§impl CmpMessageType
impl CmpMessageType
Sourcepub fn from_tag(tag: u8) -> Option<Self>
pub fn from_tag(tag: u8) -> Option<Self>
Map an ASN.1 implicit tag value to the corresponding message type.
RFC 9810 §5.3 defines the PKIBody CHOICE tags:
ir [0] CertReqMessages
ip [1] CertRepMessage
cr [2] CertReqMessages
cp [3] CertRepMessage
...
kur [7] CertReqMessages
kup [8] CertRepMessage
...
rr [11] RevReqContent
rp [12] RevRepContent
...
genm [21] GenMsgContent
genp [22] GenRepContent
error [23] ErrorMsgContent
certConf [24] CertConfirmContent
pkiConf [25] PKIConfirmContentSourcepub fn is_request(&self) -> bool
pub fn is_request(&self) -> bool
Returns true if this message type is a client request.
Sourcepub fn expected_response(&self) -> Option<Self>
pub fn expected_response(&self) -> Option<Self>
Return the expected response type for a given request type.
Returns None for response types or types that do not expect
a specific response (e.g., CertConf expects PkiConf, but
error messages do not expect a response).
Trait Implementations§
Source§impl Clone for CmpMessageType
impl Clone for CmpMessageType
Source§fn clone(&self) -> CmpMessageType
fn clone(&self) -> CmpMessageType
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CmpMessageType
impl Debug for CmpMessageType
Source§impl Display for CmpMessageType
impl Display for CmpMessageType
Source§impl PartialEq for CmpMessageType
impl PartialEq for CmpMessageType
impl Copy for CmpMessageType
impl Eq for CmpMessageType
impl StructuralPartialEq for CmpMessageType
Auto Trait Implementations§
impl Freeze for CmpMessageType
impl RefUnwindSafe for CmpMessageType
impl Send for CmpMessageType
impl Sync for CmpMessageType
impl Unpin for CmpMessageType
impl UnsafeUnpin for CmpMessageType
impl UnwindSafe for CmpMessageType
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§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