pub struct CsrAttrsResponse { /* private fields */ }Expand description
CSR Attributes response (RFC 7030 §4.5.2).
Contains a list of attribute OIDs that the EST server recommends or requires in client CSRs. This advertises support for:
- Post-quantum signature algorithms (ML-DSA)
- Post-quantum key encapsulation (ML-KEM)
- Composite algorithms (ML-DSA + traditional)
- Standard X.509 attributes
The response is a DER-encoded ASN.1 SEQUENCE of OIDs, base64-wrapped.
Implementations§
Source§impl CsrAttrsResponse
impl CsrAttrsResponse
Sourcepub fn new(attributes: Vec<CsrAttribute>) -> Self
pub fn new(attributes: Vec<CsrAttribute>) -> Self
Creates a new CSR attributes response.
Sourcepub fn attributes(&self) -> &[CsrAttribute]
pub fn attributes(&self) -> &[CsrAttribute]
Returns the list of attributes.
Sourcepub fn add_attribute(&mut self, attr: CsrAttribute)
pub fn add_attribute(&mut self, attr: CsrAttribute)
Adds an attribute to the response.
Sourcepub fn to_der(&mut self) -> &[u8] ⓘ
pub fn to_der(&mut self) -> &[u8] ⓘ
Encodes the response as DER (ASN.1 SEQUENCE of OIDs).
This is a simplified DER encoder for the specific structure:
CsrAttrs ::= SEQUENCE OF AttrOrOID
AttrOrOID ::= OBJECT IDENTIFIERFull ASN.1 encoding is delegated to the CA module.
Sourcepub fn from_base64(base64_data: &str) -> EstResult<Self>
pub fn from_base64(base64_data: &str) -> EstResult<Self>
Decodes a base64-encoded CSR attributes response.
This is a simplified decoder that extracts OIDs from the DER structure. Full ASN.1 parsing is delegated to the CA module.
Sourcepub fn builder() -> CsrAttrsBuilder
pub fn builder() -> CsrAttrsBuilder
Builder: Starts a new response builder.
Trait Implementations§
Source§impl Clone for CsrAttrsResponse
impl Clone for CsrAttrsResponse
Source§fn clone(&self) -> CsrAttrsResponse
fn clone(&self) -> CsrAttrsResponse
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 moreSource§impl Debug for CsrAttrsResponse
impl Debug for CsrAttrsResponse
Source§impl<'de> Deserialize<'de> for CsrAttrsResponse
impl<'de> Deserialize<'de> for CsrAttrsResponse
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for CsrAttrsResponse
impl PartialEq for CsrAttrsResponse
Source§impl Serialize for CsrAttrsResponse
impl Serialize for CsrAttrsResponse
impl Eq for CsrAttrsResponse
impl StructuralPartialEq for CsrAttrsResponse
Auto Trait Implementations§
impl Freeze for CsrAttrsResponse
impl RefUnwindSafe for CsrAttrsResponse
impl Send for CsrAttrsResponse
impl Sync for CsrAttrsResponse
impl Unpin for CsrAttrsResponse
impl UnsafeUnpin for CsrAttrsResponse
impl UnwindSafe for CsrAttrsResponse
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