Struct openssl::x509::extension::BasicConstraints
source · pub struct BasicConstraints { /* private fields */ }Expand description
An extension which indicates whether a certificate is a CA certificate.
Implementations§
source§impl BasicConstraints
impl BasicConstraints
sourcepub fn new() -> BasicConstraints
pub fn new() -> BasicConstraints
Construct a new BasicConstraints extension.
sourcepub fn critical(&mut self) -> &mut BasicConstraints
pub fn critical(&mut self) -> &mut BasicConstraints
Sets the critical flag to true. The extension will be critical.
sourcepub fn ca(&mut self) -> &mut BasicConstraints
pub fn ca(&mut self) -> &mut BasicConstraints
Sets the ca flag to true.
sourcepub fn pathlen(&mut self, pathlen: u32) -> &mut BasicConstraints
pub fn pathlen(&mut self, pathlen: u32) -> &mut BasicConstraints
Sets the pathlen to an optional non-negative value. The pathlen is the
maximum number of CAs that can appear below this one in a chain.
sourcepub fn build(&self) -> Result<X509Extension, ErrorStack>
pub fn build(&self) -> Result<X509Extension, ErrorStack>
Return the BasicConstraints extension as an X509Extension.
Trait Implementations§
source§impl Default for BasicConstraints
impl Default for BasicConstraints
source§fn default() -> BasicConstraints
fn default() -> BasicConstraints
Returns the “default value” for a type. Read more