Struct openssl::ssl::SslVerifyMode
source · [−]pub struct SslVerifyMode { /* private fields */ }
Expand description
Options controling the behavior of certificate verification.
Implementations
sourceimpl SslVerifyMode
impl SslVerifyMode
sourcepub const PEER: SslVerifyMode = SslVerifyMode{bits: ffi::SSL_VERIFY_PEER,}
pub const PEER: SslVerifyMode = SslVerifyMode{bits: ffi::SSL_VERIFY_PEER,}
Verifies that the peer’s certificate is trusted.
On the server side, this will cause OpenSSL to request a certificate from the client.
sourcepub const NONE: SslVerifyMode = SslVerifyMode{bits: ffi::SSL_VERIFY_NONE,}
pub const NONE: SslVerifyMode = SslVerifyMode{bits: ffi::SSL_VERIFY_NONE,}
Disables verification of the peer’s certificate.
On the server side, this will cause OpenSSL to not request a certificate from the client. On the client side, the certificate will be checked for validity, but the negotiation will continue regardless of the result of that check.
sourcepub const FAIL_IF_NO_PEER_CERT: SslVerifyMode = SslVerifyMode{bits: ffi::SSL_VERIFY_FAIL_IF_NO_PEER_CERT,}
pub const FAIL_IF_NO_PEER_CERT: SslVerifyMode = SslVerifyMode{bits: ffi::SSL_VERIFY_FAIL_IF_NO_PEER_CERT,}
On the server side, abort the handshake if the client did not send a certificate.
This should be paired with SSL_VERIFY_PEER
. It has no effect on the client side.
sourcepub const fn empty() -> SslVerifyMode
pub const fn empty() -> SslVerifyMode
Returns an empty set of flags
sourcepub const fn all() -> SslVerifyMode
pub const fn all() -> SslVerifyMode
Returns the set containing all flags.
sourcepub fn from_bits(bits: i32) -> Option<SslVerifyMode>
pub fn from_bits(bits: i32) -> Option<SslVerifyMode>
Convert from underlying bit representation, unless that representation contains bits that do not correspond to a flag.
sourcepub const fn from_bits_truncate(bits: i32) -> SslVerifyMode
pub const fn from_bits_truncate(bits: i32) -> SslVerifyMode
Convert from underlying bit representation, dropping any bits that do not correspond to flags.
sourcepub const unsafe fn from_bits_unchecked(bits: i32) -> SslVerifyMode
pub const unsafe fn from_bits_unchecked(bits: i32) -> SslVerifyMode
Convert from underlying bit representation, preserving all bits (even those not corresponding to a defined flag).
sourcepub const fn intersects(&self, other: SslVerifyMode) -> bool
pub const fn intersects(&self, other: SslVerifyMode) -> bool
Returns true
if there are flags common to both self
and other
.
sourcepub const fn contains(&self, other: SslVerifyMode) -> bool
pub const fn contains(&self, other: SslVerifyMode) -> bool
Returns true
all of the flags in other
are contained within self
.
sourcepub fn insert(&mut self, other: SslVerifyMode)
pub fn insert(&mut self, other: SslVerifyMode)
Inserts the specified flags in-place.
sourcepub fn remove(&mut self, other: SslVerifyMode)
pub fn remove(&mut self, other: SslVerifyMode)
Removes the specified flags in-place.
sourcepub fn toggle(&mut self, other: SslVerifyMode)
pub fn toggle(&mut self, other: SslVerifyMode)
Toggles the specified flags in-place.
sourcepub fn set(&mut self, other: SslVerifyMode, value: bool)
pub fn set(&mut self, other: SslVerifyMode, value: bool)
Inserts or removes the specified flags depending on the passed value.
Trait Implementations
sourceimpl Binary for SslVerifyMode
impl Binary for SslVerifyMode
sourceimpl BitAnd<SslVerifyMode> for SslVerifyMode
impl BitAnd<SslVerifyMode> for SslVerifyMode
sourcefn bitand(self, other: SslVerifyMode) -> SslVerifyMode
fn bitand(self, other: SslVerifyMode) -> SslVerifyMode
Returns the intersection between the two sets of flags.
type Output = SslVerifyMode
type Output = SslVerifyMode
The resulting type after applying the &
operator.
sourceimpl BitAndAssign<SslVerifyMode> for SslVerifyMode
impl BitAndAssign<SslVerifyMode> for SslVerifyMode
sourcefn bitand_assign(&mut self, other: SslVerifyMode)
fn bitand_assign(&mut self, other: SslVerifyMode)
Disables all flags disabled in the set.
sourceimpl BitOr<SslVerifyMode> for SslVerifyMode
impl BitOr<SslVerifyMode> for SslVerifyMode
sourcefn bitor(self, other: SslVerifyMode) -> SslVerifyMode
fn bitor(self, other: SslVerifyMode) -> SslVerifyMode
Returns the union of the two sets of flags.
type Output = SslVerifyMode
type Output = SslVerifyMode
The resulting type after applying the |
operator.
sourceimpl BitOrAssign<SslVerifyMode> for SslVerifyMode
impl BitOrAssign<SslVerifyMode> for SslVerifyMode
sourcefn bitor_assign(&mut self, other: SslVerifyMode)
fn bitor_assign(&mut self, other: SslVerifyMode)
Adds the set of flags.
sourceimpl BitXor<SslVerifyMode> for SslVerifyMode
impl BitXor<SslVerifyMode> for SslVerifyMode
sourcefn bitxor(self, other: SslVerifyMode) -> SslVerifyMode
fn bitxor(self, other: SslVerifyMode) -> SslVerifyMode
Returns the left flags, but with all the right flags toggled.
type Output = SslVerifyMode
type Output = SslVerifyMode
The resulting type after applying the ^
operator.
sourceimpl BitXorAssign<SslVerifyMode> for SslVerifyMode
impl BitXorAssign<SslVerifyMode> for SslVerifyMode
sourcefn bitxor_assign(&mut self, other: SslVerifyMode)
fn bitxor_assign(&mut self, other: SslVerifyMode)
Toggles the set of flags.
sourceimpl Clone for SslVerifyMode
impl Clone for SslVerifyMode
sourcefn clone(&self) -> SslVerifyMode
fn clone(&self) -> SslVerifyMode
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for SslVerifyMode
impl Debug for SslVerifyMode
sourceimpl Extend<SslVerifyMode> for SslVerifyMode
impl Extend<SslVerifyMode> for SslVerifyMode
sourcefn extend<T: IntoIterator<Item = SslVerifyMode>>(&mut self, iterator: T)
fn extend<T: IntoIterator<Item = SslVerifyMode>>(&mut self, iterator: T)
Extends a collection with the contents of an iterator. Read more
sourcefn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
extend_one
)Extends a collection with exactly one element.
sourcefn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one
)Reserves capacity in a collection for the given number of additional elements. Read more
sourceimpl FromIterator<SslVerifyMode> for SslVerifyMode
impl FromIterator<SslVerifyMode> for SslVerifyMode
sourcefn from_iter<T: IntoIterator<Item = SslVerifyMode>>(
iterator: T
) -> SslVerifyMode
fn from_iter<T: IntoIterator<Item = SslVerifyMode>>(
iterator: T
) -> SslVerifyMode
Creates a value from an iterator. Read more
sourceimpl Hash for SslVerifyMode
impl Hash for SslVerifyMode
sourceimpl LowerHex for SslVerifyMode
impl LowerHex for SslVerifyMode
sourceimpl Not for SslVerifyMode
impl Not for SslVerifyMode
sourcefn not(self) -> SslVerifyMode
fn not(self) -> SslVerifyMode
Returns the complement of this set of flags.
type Output = SslVerifyMode
type Output = SslVerifyMode
The resulting type after applying the !
operator.
sourceimpl Octal for SslVerifyMode
impl Octal for SslVerifyMode
sourceimpl Ord for SslVerifyMode
impl Ord for SslVerifyMode
sourceimpl PartialEq<SslVerifyMode> for SslVerifyMode
impl PartialEq<SslVerifyMode> for SslVerifyMode
sourcefn eq(&self, other: &SslVerifyMode) -> bool
fn eq(&self, other: &SslVerifyMode) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &SslVerifyMode) -> bool
fn ne(&self, other: &SslVerifyMode) -> bool
This method tests for !=
.
sourceimpl PartialOrd<SslVerifyMode> for SslVerifyMode
impl PartialOrd<SslVerifyMode> for SslVerifyMode
sourcefn partial_cmp(&self, other: &SslVerifyMode) -> Option<Ordering>
fn partial_cmp(&self, other: &SslVerifyMode) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourceimpl Sub<SslVerifyMode> for SslVerifyMode
impl Sub<SslVerifyMode> for SslVerifyMode
sourcefn sub(self, other: SslVerifyMode) -> SslVerifyMode
fn sub(self, other: SslVerifyMode) -> SslVerifyMode
Returns the set difference of the two sets of flags.
type Output = SslVerifyMode
type Output = SslVerifyMode
The resulting type after applying the -
operator.
sourceimpl SubAssign<SslVerifyMode> for SslVerifyMode
impl SubAssign<SslVerifyMode> for SslVerifyMode
sourcefn sub_assign(&mut self, other: SslVerifyMode)
fn sub_assign(&mut self, other: SslVerifyMode)
Disables all flags enabled in the set.
sourceimpl UpperHex for SslVerifyMode
impl UpperHex for SslVerifyMode
impl Copy for SslVerifyMode
impl Eq for SslVerifyMode
impl StructuralEq for SslVerifyMode
impl StructuralPartialEq for SslVerifyMode
Auto Trait Implementations
impl RefUnwindSafe for SslVerifyMode
impl Send for SslVerifyMode
impl Sync for SslVerifyMode
impl Unpin for SslVerifyMode
impl UnwindSafe for SslVerifyMode
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more