pub struct KeyUsage { /* private fields */ }Expand description
The X.509 keyUsage extension (RFC 5280 §4.2.1.3) as a bitfield.
A public BIT STRING read — NOT a trust decision. Which bits a
role requires is decided by verify_chain / tlcp::chain::verify_pair,
not by parsing. Bit 0 is the most-significant bit of the first content
byte (DER BIT STRING order); bits 0–8 are named below.
Implementations§
Source§impl KeyUsage
impl KeyUsage
Sourcepub const fn digital_signature(self) -> bool
pub const fn digital_signature(self) -> bool
digitalSignature (bit 0).
Sourcepub const fn content_commitment(self) -> bool
pub const fn content_commitment(self) -> bool
nonRepudiation / contentCommitment (bit 1).
Sourcepub const fn key_encipherment(self) -> bool
pub const fn key_encipherment(self) -> bool
keyEncipherment (bit 2).
Sourcepub const fn data_encipherment(self) -> bool
pub const fn data_encipherment(self) -> bool
dataEncipherment (bit 3).
Sourcepub const fn key_agreement(self) -> bool
pub const fn key_agreement(self) -> bool
keyAgreement (bit 4).
Sourcepub const fn key_cert_sign(self) -> bool
pub const fn key_cert_sign(self) -> bool
keyCertSign (bit 5).
Sourcepub const fn encipher_only(self) -> bool
pub const fn encipher_only(self) -> bool
encipherOnly (bit 7).
Sourcepub const fn decipher_only(self) -> bool
pub const fn decipher_only(self) -> bool
decipherOnly (bit 8).
Trait Implementations§
impl Copy for KeyUsage
impl Eq for KeyUsage
impl StructuralPartialEq for KeyUsage
Auto Trait Implementations§
impl Freeze for KeyUsage
impl RefUnwindSafe for KeyUsage
impl Send for KeyUsage
impl Sync for KeyUsage
impl Unpin for KeyUsage
impl UnsafeUnpin for KeyUsage
impl UnwindSafe for KeyUsage
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