pub struct CsrTemplate {
pub subject: Vec<CsrTemplateRdn>,
pub key_algorithm: Option<String>,
pub required_extensions: Vec<String>,
}Expand description
CSR template mode configuration (draft-ietf-lamps-rfc7030-csrattrs / RFC 9908).
When configured, the /csrattrs response includes a
CertificationRequestInfoTemplate attribute alongside the OID list,
guiding clients on expected subject DN, key algorithm, and extensions.
The template is backward-compatible: clients that do not understand the template attribute will ignore it and process only the OID list.
[est.csr_template]
key_algorithm = "ec:P-256"
required_extensions = ["2.5.29.17"]
[[est.csr_template.subject]]
oid = "2.5.4.10"
value = "Example Corp"
[[est.csr_template.subject]]
oid = "2.5.4.3"Fields§
§subject: Vec<CsrTemplateRdn>Required subject DN components.
Each entry specifies an OID and an optional value. When value is
None, the client must supply its own value for that RDN component.
key_algorithm: Option<String>Required key algorithm constraint.
Format: "ec:P-256", "ec:P-384", "rsa:2048", "rsa:4096".
When set, encodes a SubjectPublicKeyInfoTemplate in the template.
required_extensions: Vec<String>Required X.509 extension OIDs (client fills values).
Each entry is a dotted-decimal OID string (e.g., "2.5.29.17"
for subjectAltName).
Implementations§
Source§impl CsrTemplate
impl CsrTemplate
Sourcepub fn has_content(&self) -> bool
pub fn has_content(&self) -> bool
Returns true when at least one template field carries content.
Trait Implementations§
Source§impl Clone for CsrTemplate
impl Clone for CsrTemplate
Source§fn clone(&self) -> CsrTemplate
fn clone(&self) -> CsrTemplate
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CsrTemplate
impl Debug for CsrTemplate
Source§impl<'de> Deserialize<'de> for CsrTemplate
impl<'de> Deserialize<'de> for CsrTemplate
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>,
Auto Trait Implementations§
impl Freeze for CsrTemplate
impl RefUnwindSafe for CsrTemplate
impl Send for CsrTemplate
impl Sync for CsrTemplate
impl Unpin for CsrTemplate
impl UnsafeUnpin for CsrTemplate
impl UnwindSafe for CsrTemplate
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more