pub struct FullCmcRequest { /* private fields */ }Expand description
Full CMC request (RFC 7030 §4.3.1).
Contains a CMC PKIData message wrapped in a PKCS#7 SignedData structure.
The SignedData MUST be signed by an RA certificate with id-kp-cmcRA EKU.
CMC supports advanced features:
- Batch enrollment (multiple CSRs in one request)
- Attribute certification
- Key archival
- Revocation requests
- ML-DSA and ML-KEM enrollment
Implementations§
Source§impl FullCmcRequest
impl FullCmcRequest
Sourcepub fn into_cmc_der(self) -> Vec<u8> ⓘ
pub fn into_cmc_der(self) -> Vec<u8> ⓘ
Consumes self and returns the DER-encoded CMC data.
Sourcepub fn from_base64(base64_data: &str) -> EstResult<Self>
pub fn from_base64(base64_data: &str) -> EstResult<Self>
Decodes a base64-encoded Full CMC request.
Sourcepub fn validate(&self) -> EstResult<()>
pub fn validate(&self) -> EstResult<()>
Validates the CMC structure.
This performs basic DER validation. Full CMC validation (signature verification, RA EKU check, PKIData parsing) is delegated to the CA module.
Sourcepub fn validate_ra_eku(&self, _ra_cert_der: &[u8]) -> EstResult<()>
pub fn validate_ra_eku(&self, _ra_cert_der: &[u8]) -> EstResult<()>
Validates RA certificate EKU (stub).
The RA certificate used to sign the CMC request MUST contain the id-kp-cmcRA (1.3.6.1.5.5.7.3.28) extended key usage.
This is a placeholder - actual validation requires parsing the SignedData and verifying the signer certificate’s EKU. Delegated to CA module.
§Arguments
ra_cert_der- DER-encoded RA certificate from SignedData
§Errors
Returns EstError::InvalidEku if the certificate lacks id-kp-cmcRA.
Sourcepub fn contains_pqc(&self) -> bool
pub fn contains_pqc(&self) -> bool
Checks if the CMC request contains ML-DSA or ML-KEM enrollment requests.
Searches for post-quantum algorithm OID prefixes in the DER structure.
Trait Implementations§
Source§impl Clone for FullCmcRequest
impl Clone for FullCmcRequest
Source§fn clone(&self) -> FullCmcRequest
fn clone(&self) -> FullCmcRequest
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more