Struct openssl::x509::verify::X509VerifyParam
source · pub struct X509VerifyParam(_);
Expand description
Adjust parameters associated with certificate verification.
Implementations§
source§impl X509VerifyParam
impl X509VerifyParam
sourcepub fn new() -> Result<X509VerifyParam, ErrorStack>
pub fn new() -> Result<X509VerifyParam, ErrorStack>
Create an X509VerifyParam
This corresponds to X509_VERIFY_PARAM_new
.
Methods from Deref<Target = X509VerifyParamRef>§
sourcepub fn set_hostflags(&mut self, hostflags: X509CheckFlags)
pub fn set_hostflags(&mut self, hostflags: X509CheckFlags)
Set the host flags.
This corresponds to X509_VERIFY_PARAM_set_hostflags
.
sourcepub fn set_flags(&mut self, flags: X509VerifyFlags) -> Result<(), ErrorStack>
pub fn set_flags(&mut self, flags: X509VerifyFlags) -> Result<(), ErrorStack>
Set verification flags.
This corresponds to X509_VERIFY_PARAM_set_flags
.
sourcepub fn clear_flags(&mut self, flags: X509VerifyFlags) -> Result<(), ErrorStack>
pub fn clear_flags(&mut self, flags: X509VerifyFlags) -> Result<(), ErrorStack>
Clear verification flags.
This corresponds to X509_VERIFY_PARAM_clear_flags
.
sourcepub fn flags(&mut self) -> X509VerifyFlags
pub fn flags(&mut self) -> X509VerifyFlags
Gets verification flags.
This corresponds to X509_VERIFY_PARAM_get_flags
.
sourcepub fn set_host(&mut self, host: &str) -> Result<(), ErrorStack>
pub fn set_host(&mut self, host: &str) -> Result<(), ErrorStack>
Set the expected DNS hostname.
This corresponds to X509_VERIFY_PARAM_set1_host
.
sourcepub fn set_ip(&mut self, ip: IpAddr) -> Result<(), ErrorStack>
pub fn set_ip(&mut self, ip: IpAddr) -> Result<(), ErrorStack>
Set the expected IPv4 or IPv6 address.
This corresponds to X509_VERIFY_PARAM_set1_ip
.
sourcepub fn set_time(&mut self, time: time_t)
pub fn set_time(&mut self, time: time_t)
Set the verification time, where time is of type time_t, traditionaly defined as seconds since the epoch
This corresponds to X509_VERIFY_PARAM_set_time
.
sourcepub fn set_depth(&mut self, depth: c_int)
pub fn set_depth(&mut self, depth: c_int)
Set the verification depth
This corresponds to X509_VERIFY_PARAM_set_depth
.
sourcepub fn set_auth_level(&mut self, lvl: c_int)
pub fn set_auth_level(&mut self, lvl: c_int)
Sets the authentication security level to auth_level
This corresponds to X509_VERIFY_PARAM_set_auth_level
.
sourcepub fn auth_level(&self) -> i32
pub fn auth_level(&self) -> i32
Gets the current authentication security level
This corresponds to X509_VERIFY_PARAM_get_auth_level
.
sourcepub fn set_purpose(&mut self, purpose: X509PurposeId) -> Result<(), ErrorStack>
pub fn set_purpose(&mut self, purpose: X509PurposeId) -> Result<(), ErrorStack>
Sets the verification purpose
This corresponds to X509_VERIFY_PARAM_set_purpose
.