#[non_exhaustive]pub struct Extensions {
pub basic_constraints: Option<BasicConstraints>,
pub key_usage: Option<KeyUsage>,
pub extended_key_usage: Option<Vec<u32>>,
pub subject_key_identifier: Option<KeyIdentifier>,
pub authority_key_identifier: Option<KeyIdentifier>,
}Expand description
Decoded certificate extensions.
#[non_exhaustive]: the spec (§6.5.4) defines exactly five extensions
today, but marking this prevents a future spec-driven addition from being
a semver-breaking change for downstream crates. Outside matter-cert,
construct via Extensions::builder (or Extensions::default) rather
than a struct literal.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.basic_constraints: Option<BasicConstraints>Basic constraints extension, if present.
key_usage: Option<KeyUsage>Key usage flags, if present.
extended_key_usage: Option<Vec<u32>>Extended key usage OID list, if present.
subject_key_identifier: Option<KeyIdentifier>Subject key identifier (20-byte SHA-1 of public key), if present.
Authority key identifier (20-byte SHA-1 of issuer public key), if present.
Implementations§
Source§impl Extensions
impl Extensions
Sourcepub fn builder() -> ExtensionsBuilder
pub fn builder() -> ExtensionsBuilder
Start building an Extensions value.
Because Extensions is #[non_exhaustive], downstream crates cannot
build it with a struct literal; this builder is the supported path.
Unset fields default to None.
Trait Implementations§
Source§impl Clone for Extensions
impl Clone for Extensions
Source§fn clone(&self) -> Extensions
fn clone(&self) -> Extensions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more