pub struct KeyUsage(pub FlagSet<KeyUsages>);
Expand description
KeyUsage as defined in RFC 5280 Section 4.2.1.3.
Tuple Fields§
§0: FlagSet<KeyUsages>
Implementations§
source§impl KeyUsage
impl KeyUsage
sourcepub fn digital_signature(&self) -> bool
pub fn digital_signature(&self) -> bool
The subject public key is used for verifying digital signatures
sourcepub fn non_repudiation(&self) -> bool
pub fn non_repudiation(&self) -> bool
When the subject public key is used to verify digital signatures, it is asserted as non-repudiation.
sourcepub fn key_encipherment(&self) -> bool
pub fn key_encipherment(&self) -> bool
The subject public key is used for enciphering private or secret keys, i.e., for key transport.
sourcepub fn data_encipherment(&self) -> bool
pub fn data_encipherment(&self) -> bool
The subject public key is used for directly enciphering raw user data without the use of an intermediate symmetric cipher.
sourcepub fn key_agreement(&self) -> bool
pub fn key_agreement(&self) -> bool
The subject public key is used for key agreement
sourcepub fn key_cert_sign(&self) -> bool
pub fn key_cert_sign(&self) -> bool
The subject public key is used for enciphering private or secret keys, i.e., for key transport.
sourcepub fn crl_sign(&self) -> bool
pub fn crl_sign(&self) -> bool
The subject public key is used for verifying signatures on certificate revocation lists (e.g., CRLs, delta CRLs, or ARLs).
sourcepub fn encipher_only(&self) -> bool
pub fn encipher_only(&self) -> bool
The meaning of the encipher_only
is undefined when key_agreement
returns false. When encipher_only
returns true and
key_agreement
also returns true, the subject public key may be
used only for enciphering data while performing key agreement.
sourcepub fn decipher_only(&self) -> bool
pub fn decipher_only(&self) -> bool
The meaning of the decipher_only
is undefined when key_agreement
returns false. When encipher_only
returns true and
key_agreement
also returns true, the subject public key may be
used only for deciphering data while performing key agreement.
Trait Implementations§
source§impl AsExtension for KeyUsage
impl AsExtension for KeyUsage
source§impl AssociatedOid for KeyUsage
impl AssociatedOid for KeyUsage
source§const OID: ObjectIdentifier = ID_CE_KEY_USAGE
const OID: ObjectIdentifier = ID_CE_KEY_USAGE
source§impl<'a> DecodeValue<'a> for KeyUsage
impl<'a> DecodeValue<'a> for KeyUsage
source§impl<'a> EncodeValue for KeyUsage
impl<'a> EncodeValue for KeyUsage
source§impl PartialEq for KeyUsage
impl PartialEq for KeyUsage
impl Copy for KeyUsage
impl Eq for KeyUsage
impl StructuralEq for KeyUsage
impl StructuralPartialEq for KeyUsage
Auto Trait Implementations§
impl RefUnwindSafe for KeyUsage
impl Send for KeyUsage
impl Sync for KeyUsage
impl Unpin 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
source§impl<'a, T> Decode<'a> for Twhere
T: DecodeValue<'a> + FixedTag,
impl<'a, T> Decode<'a> for Twhere
T: DecodeValue<'a> + FixedTag,
source§impl<T> DynAssociatedOid for Twhere
T: AssociatedOid,
impl<T> DynAssociatedOid for Twhere
T: AssociatedOid,
source§fn oid(&self) -> ObjectIdentifier
fn oid(&self) -> ObjectIdentifier
source§impl<T> Encode for Twhere
T: EncodeValue + Tagged,
impl<T> Encode for Twhere
T: EncodeValue + Tagged,
source§fn encoded_len(&self) -> Result<Length, Error>
fn encoded_len(&self) -> Result<Length, Error>
Compute the length of this value in bytes when encoded as ASN.1 DER.
source§fn encode(&self, writer: &mut impl Writer) -> Result<(), Error>
fn encode(&self, writer: &mut impl Writer) -> Result<(), Error>
Encode this value as ASN.1 DER using the provided Writer
.