pub struct PkiHeader<'a> {
pub pvno: Pvno,
pub sender: GeneralName<'a>,
pub recipient: GeneralName<'a>,
pub message_time: Option<GeneralizedTime>,
pub protection_alg: Option<AlgorithmIdentifierOwned>,
pub sender_kid: Option<OctetString>,
pub recip_kid: Option<OctetString>,
pub trans_id: Option<OctetString>,
pub sender_nonce: Option<OctetString>,
pub recip_nonce: Option<OctetString>,
pub free_text: Option<PkiFreeText>,
pub general_info: Option<GeneralInfo>,
}Expand description
The PKIHeader type is defined in RFC 4210 Section 5.1.1.
PKIHeader ::= SEQUENCE {
pvno INTEGER { cmp1999(1), cmp2000(2) },
sender GeneralName,
-- identifies the sender
recipient GeneralName,
-- identifies the intended recipient
messageTime [0] GeneralizedTime OPTIONAL,
-- time of production of this message (used when sender
-- believes that the transport will be "suitable"; i.e.,
-- that the time will still be meaningful upon receipt)
protectionAlg [1] AlgorithmIdentifier{ALGORITHM, {...}}
OPTIONAL,
-- algorithm used for calculation of protection bits
senderKID [2] KeyIdentifier OPTIONAL,
recipKID [3] KeyIdentifier OPTIONAL,
-- to identify specific keys used for protection
transactionID [4] OCTET STRING OPTIONAL,
-- identifies the transaction; i.e., this will be the same in
-- corresponding request, response, certConf, and PKIConf
-- messages
senderNonce [5] OCTET STRING OPTIONAL,
recipNonce [6] OCTET STRING OPTIONAL,
-- nonces used to provide replay protection, senderNonce
-- is inserted by the creator of this message; recipNonce
-- is a nonce previously inserted in a related message by
-- the intended recipient of this message
freeText [7] PKIFreeText OPTIONAL,
-- this may be used to indicate context-specific instructions
-- (this field is intended for human consumption)
generalInfo [8] SEQUENCE SIZE (1..MAX) OF
InfoTypeAndValue OPTIONAL
-- this may be used to convey context-specific information
-- (this field not primarily intended for human consumption)
}Tags are EXPLICIT TAG in default according to rfc4210#appendix-F.
Fields§
§pvno: Pvno§sender: GeneralName<'a>§recipient: GeneralName<'a>§message_time: Option<GeneralizedTime>§protection_alg: Option<AlgorithmIdentifierOwned>§sender_kid: Option<OctetString>§recip_kid: Option<OctetString>§trans_id: Option<OctetString>§sender_nonce: Option<OctetString>§recip_nonce: Option<OctetString>§free_text: Option<PkiFreeText>§general_info: Option<GeneralInfo>Trait Implementations§
Source§impl<'a> BERDecodable for PkiHeader<'a>
impl<'a> BERDecodable for PkiHeader<'a>
Source§fn decode_ber(reader: BERReader<'_, '_>) -> ASN1Result<Self>
fn decode_ber(reader: BERReader<'_, '_>) -> ASN1Result<Self>
impl<'a> Eq for PkiHeader<'a>
Source§impl<'a> PartialEq for PkiHeader<'a>
impl<'a> PartialEq for PkiHeader<'a>
impl<'a> StructuralPartialEq for PkiHeader<'a>
Auto Trait Implementations§
impl<'a> Freeze for PkiHeader<'a>
impl<'a> RefUnwindSafe for PkiHeader<'a>
impl<'a> Send for PkiHeader<'a>
impl<'a> Sync for PkiHeader<'a>
impl<'a> Unpin for PkiHeader<'a>
impl<'a> UnsafeUnpin for PkiHeader<'a>
impl<'a> UnwindSafe for PkiHeader<'a>
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