pub struct X509VerifyParam(/* private fields */);Expand description
Adjust parameters associated with certificate verification.
Implementations§
Source§impl X509VerifyParam
impl X509VerifyParam
Sourcepub fn new() -> Result<Self, ErrorStack>
pub fn new() -> Result<Self, ErrorStack>
Create an X509VerifyParam
This corresponds to X509_VERIFY_PARAM_new.
Methods from Deref<Target = X509VerifyParamRef>§
Sourcepub fn set_flags(&mut self, flags: X509VerifyFlags)
pub fn set_flags(&mut self, flags: X509VerifyFlags)
Set verification flags.
This corresponds to X509_VERIFY_PARAM_set_flags.
Sourcepub fn clear_flags(&mut self, flags: X509VerifyFlags)
pub fn clear_flags(&mut self, flags: X509VerifyFlags)
Clear verification flags.
This corresponds to X509_VERIFY_PARAM_clear_flags.
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 flags(&self) -> X509VerifyFlags
pub fn flags(&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_email(&mut self, email: &str) -> Result<(), ErrorStack>
pub fn set_email(&mut self, email: &str) -> Result<(), ErrorStack>
Set the expected email address.
This corresponds to X509_VERIFY_PARAM_set1_email.
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 copy_from(&mut self, src: &Self) -> Result<(), ErrorStack>
pub fn copy_from(&mut self, src: &Self) -> Result<(), ErrorStack>
Copies parameters from src.
If a parameter is unset in src, the existing value in `self`` is preserved.
This corresponds to X509_VERIFY_PARAM_set1.