pub enum CmpProtectionType {
Signature {
algorithm: String,
cert_der: Vec<u8>,
},
Mac {
algorithm: String,
},
}Expand description
CMP message protection mechanism.
RFC 9810 §5.1.3: PKIMessage protection is computed over the
header and body fields. Two modes are defined:
- Signature-based: the sender signs with a certificate-bound key.
- MAC-based: a shared secret protects the message; used for initial enrollment when no certificate exists yet.
Variants§
Signature
Signature-based protection (RFC 9810 §5.1.3.3).
The sender’s certificate is included in the extraCerts field
of the PKIMessage.
Fields
Mac
MAC-based protection (RFC 9810 §5.1.3.1).
Uses a shared secret (reference number + passphrase) to compute
a MAC over the message. Typically used for initial enrollment
(ir) before the client has a certificate.
Trait Implementations§
Source§impl Clone for CmpProtectionType
impl Clone for CmpProtectionType
Source§fn clone(&self) -> CmpProtectionType
fn clone(&self) -> CmpProtectionType
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 moreAuto Trait Implementations§
impl Freeze for CmpProtectionType
impl RefUnwindSafe for CmpProtectionType
impl Send for CmpProtectionType
impl Sync for CmpProtectionType
impl Unpin for CmpProtectionType
impl UnsafeUnpin for CmpProtectionType
impl UnwindSafe for CmpProtectionType
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