pub struct KeyUsage {
inner: ExtendedKeyUsage,
}
Expand description
The expected key usage of a certificate.
This type represents the expected key usage of an end entity certificate. Although for most kinds of certificates the extended key usage extension is optional (and so certificates not carrying a particular value in the EKU extension are acceptable). If the extension is present, the certificate MUST only be used for one of the purposes indicated.
Fields§
§inner: ExtendedKeyUsage
Implementations§
source§impl KeyUsage
impl KeyUsage
sourcepub const fn server_auth() -> Self
pub const fn server_auth() -> Self
Construct a new KeyUsage
as appropriate for server certificate authentication.
As specified in https://www.rfc-editor.org/rfc/rfc5280#section-4.2.1.12, this does not require the certificate to specify the eKU extension.
sourcepub const fn client_auth() -> Self
pub const fn client_auth() -> Self
Construct a new KeyUsage
as appropriate for client certificate authentication.
As specified in <>, this does not require the certificate to specify the eKU extension.