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
Auto Trait Implementations§
impl Freeze for BasicConstraints
impl RefUnwindSafe for BasicConstraints
impl Send for BasicConstraints
impl Sync for BasicConstraints
impl Unpin for BasicConstraints
impl UnwindSafe for BasicConstraints
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