pub struct X509VerifyParam(/* private fields */);
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_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 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
.
Trait Implementations§
Source§impl AsRef<X509VerifyParamRef> for X509VerifyParam
impl AsRef<X509VerifyParamRef> for X509VerifyParam
Source§fn as_ref(&self) -> &X509VerifyParamRef
fn as_ref(&self) -> &X509VerifyParamRef
Source§impl Borrow<X509VerifyParamRef> for X509VerifyParam
impl Borrow<X509VerifyParamRef> for X509VerifyParam
Source§fn borrow(&self) -> &X509VerifyParamRef
fn borrow(&self) -> &X509VerifyParamRef
Source§impl Deref for X509VerifyParam
impl Deref for X509VerifyParam
Source§type Target = X509VerifyParamRef
type Target = X509VerifyParamRef
Source§fn deref(&self) -> &X509VerifyParamRef
fn deref(&self) -> &X509VerifyParamRef
Source§impl DerefMut for X509VerifyParam
impl DerefMut for X509VerifyParam
Source§fn deref_mut(&mut self) -> &mut X509VerifyParamRef
fn deref_mut(&mut self) -> &mut X509VerifyParamRef
Source§impl Drop for X509VerifyParam
impl Drop for X509VerifyParam
Source§impl ForeignType for X509VerifyParam
impl ForeignType for X509VerifyParam
Source§type CType = X509_VERIFY_PARAM
type CType = X509_VERIFY_PARAM
Source§type Ref = X509VerifyParamRef
type Ref = X509VerifyParamRef
Source§unsafe fn from_ptr(ptr: *mut X509_VERIFY_PARAM) -> X509VerifyParam
unsafe fn from_ptr(ptr: *mut X509_VERIFY_PARAM) -> X509VerifyParam
Source§fn as_ptr(&self) -> *mut X509_VERIFY_PARAM
fn as_ptr(&self) -> *mut X509_VERIFY_PARAM
impl Send for X509VerifyParam
impl Sync for X509VerifyParam
Auto Trait Implementations§
impl Freeze for X509VerifyParam
impl RefUnwindSafe for X509VerifyParam
impl Unpin for X509VerifyParam
impl UnwindSafe for X509VerifyParam
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
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 8 bytes