#[non_exhaustive]pub struct ExtendedKeyUsageOptions {
pub server_auth: bool,
pub client_auth: bool,
pub code_signing: bool,
pub email_protection: bool,
pub time_stamping: bool,
pub ocsp_signing: bool,
/* private fields */
}Expand description
KeyUsage.ExtendedKeyUsageOptions has fields that correspond to certain common OIDs that could be specified as an extended key usage value.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.server_auth: boolCorresponds to OID 1.3.6.1.5.5.7.3.1. Officially described as “TLS WWW server authentication”, though regularly used for non-WWW TLS.
client_auth: boolCorresponds to OID 1.3.6.1.5.5.7.3.2. Officially described as “TLS WWW client authentication”, though regularly used for non-WWW TLS.
code_signing: boolCorresponds to OID 1.3.6.1.5.5.7.3.3. Officially described as “Signing of downloadable executable code client authentication”.
email_protection: boolCorresponds to OID 1.3.6.1.5.5.7.3.4. Officially described as “Email protection”.
time_stamping: boolCorresponds to OID 1.3.6.1.5.5.7.3.8. Officially described as “Binding the hash of an object to a time”.
ocsp_signing: boolCorresponds to OID 1.3.6.1.5.5.7.3.9. Officially described as “Signing OCSP responses”.
Implementations§
Source§impl ExtendedKeyUsageOptions
impl ExtendedKeyUsageOptions
pub fn new() -> Self
Sourcepub fn set_server_auth<T: Into<bool>>(self, v: T) -> Self
pub fn set_server_auth<T: Into<bool>>(self, v: T) -> Self
Sets the value of server_auth.
§Example
let x = ExtendedKeyUsageOptions::new().set_server_auth(true);Sourcepub fn set_client_auth<T: Into<bool>>(self, v: T) -> Self
pub fn set_client_auth<T: Into<bool>>(self, v: T) -> Self
Sets the value of client_auth.
§Example
let x = ExtendedKeyUsageOptions::new().set_client_auth(true);Sourcepub fn set_code_signing<T: Into<bool>>(self, v: T) -> Self
pub fn set_code_signing<T: Into<bool>>(self, v: T) -> Self
Sets the value of code_signing.
§Example
let x = ExtendedKeyUsageOptions::new().set_code_signing(true);Sourcepub fn set_email_protection<T: Into<bool>>(self, v: T) -> Self
pub fn set_email_protection<T: Into<bool>>(self, v: T) -> Self
Sets the value of email_protection.
§Example
let x = ExtendedKeyUsageOptions::new().set_email_protection(true);Sourcepub fn set_time_stamping<T: Into<bool>>(self, v: T) -> Self
pub fn set_time_stamping<T: Into<bool>>(self, v: T) -> Self
Sets the value of time_stamping.
§Example
let x = ExtendedKeyUsageOptions::new().set_time_stamping(true);Sourcepub fn set_ocsp_signing<T: Into<bool>>(self, v: T) -> Self
pub fn set_ocsp_signing<T: Into<bool>>(self, v: T) -> Self
Sets the value of ocsp_signing.
§Example
let x = ExtendedKeyUsageOptions::new().set_ocsp_signing(true);Trait Implementations§
Source§impl Clone for ExtendedKeyUsageOptions
impl Clone for ExtendedKeyUsageOptions
Source§fn clone(&self) -> ExtendedKeyUsageOptions
fn clone(&self) -> ExtendedKeyUsageOptions
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more