pub fn parse_cmp_message(der: &[u8]) -> Result<CmpRequest, KipukaError>Expand description
Parse a DER-encoded CMP PKIMessage into a CmpRequest.
RFC 9810 §5: PKIMessage is an ASN.1 SEQUENCE:
PKIMessage ::= SEQUENCE {
header PKIHeader,
body PKIBody,
protection [0] PKIProtection OPTIONAL,
extraCerts [1] SEQUENCE SIZE (1..MAX) OF CMPCertificate OPTIONAL
}This function performs minimal structural validation and extracts the fields needed for request dispatch.
§Errors
KipukaError::BadRequest— malformed DER, unknown message type, missing required header fields.KipukaError::Internal— full ASN.1 parsing not yet implemented.