pub struct ReenrollRequest { /* private fields */ }Expand description
Re-enrollment request (RFC 7030 §4.2.2).
Identical wire format to EnrollRequest, but with additional requirements:
- The client MUST present a valid certificate via mTLS
- The CSR subject MUST match the mTLS certificate subject
- The CSR public key MAY differ (key rotation)
Subject matching is enforced by the EST server before processing.
Implementations§
Source§impl ReenrollRequest
impl ReenrollRequest
Sourcepub fn new(csr_der: Vec<u8>) -> Self
pub fn new(csr_der: Vec<u8>) -> Self
Creates a new re-enrollment request from a DER-encoded PKCS#10 CSR.
Sourcepub fn from_enroll_request(inner: EnrollRequest) -> Self
pub fn from_enroll_request(inner: EnrollRequest) -> Self
Creates from an existing EnrollRequest.
Sourcepub fn inner(&self) -> &EnrollRequest
pub fn inner(&self) -> &EnrollRequest
Returns the inner enrollment request.
Sourcepub fn into_inner(self) -> EnrollRequest
pub fn into_inner(self) -> EnrollRequest
Consumes self and returns the inner enrollment request.
Sourcepub fn into_csr_der(self) -> Vec<u8> ⓘ
pub fn into_csr_der(self) -> Vec<u8> ⓘ
Consumes self and returns the DER-encoded CSR.
Sourcepub fn from_base64(base64_data: &str) -> EstResult<Self>
pub fn from_base64(base64_data: &str) -> EstResult<Self>
Decodes a base64-encoded re-enrollment request.
Sourcepub fn validate_subject_match(
&self,
mtls_subject: &str,
csr_subject: &str,
) -> EstResult<()>
pub fn validate_subject_match( &self, mtls_subject: &str, csr_subject: &str, ) -> EstResult<()>
Validates subject matching between CSR and mTLS client certificate.
§Arguments
mtls_subject- Distinguished name from mTLS client certificatecsr_subject- Distinguished name from CSR (parsed by caller)
§Errors
Returns EstError::SubjectMismatch if subjects don’t match.
§Note
Subject parsing is delegated to the caller (CA module) since it requires full X.509 ASN.1 parsing. This method only compares the pre-parsed values.
Sourcepub fn contains_ml_dsa(&self) -> bool
pub fn contains_ml_dsa(&self) -> bool
Checks if the CSR appears to contain an ML-DSA public key.
Sourcepub fn contains_ml_kem(&self) -> bool
pub fn contains_ml_kem(&self) -> bool
Checks if the CSR appears to contain an ML-KEM public key.
Sourcepub fn to_certification_request(&self) -> CertificationRequest
pub fn to_certification_request(&self) -> CertificationRequest
Returns a parsed CertificationRequest from the inner DER-encoded CSR.
Delegates to EnrollRequest::to_certification_request. The CA module
populates the struct fields from actual ASN.1 parsing.
Trait Implementations§
Source§impl Clone for ReenrollRequest
impl Clone for ReenrollRequest
Source§fn clone(&self) -> ReenrollRequest
fn clone(&self) -> ReenrollRequest
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more