pub struct CertificateTypePreferences {
pub client_types: CertificateTypeList,
pub server_types: CertificateTypeList,
pub require_extensions: bool,
pub fallback_client: CertificateType,
pub fallback_server: CertificateType,
}Expand description
Certificate type negotiation preferences and state
Fields§
§client_types: CertificateTypeListClient certificate type preferences (what types we support for client auth)
server_types: CertificateTypeListServer certificate type preferences (what types we support for server auth)
require_extensions: boolWhether to require certificate type extensions (strict mode)
fallback_client: CertificateTypeDefault fallback certificate types if negotiation fails
fallback_server: CertificateTypeImplementations§
Source§impl CertificateTypePreferences
impl CertificateTypePreferences
Sourcepub fn prefer_raw_public_key() -> Self
pub fn prefer_raw_public_key() -> Self
Create preferences favoring Raw Public Keys
Sourcepub fn raw_public_key_only() -> Self
pub fn raw_public_key_only() -> Self
Create preferences for Raw Public Key only
Sourcepub fn negotiate(
&self,
remote_client_types: Option<&CertificateTypeList>,
remote_server_types: Option<&CertificateTypeList>,
) -> Result<NegotiationResult, TlsExtensionError>
pub fn negotiate( &self, remote_client_types: Option<&CertificateTypeList>, remote_server_types: Option<&CertificateTypeList>, ) -> Result<NegotiationResult, TlsExtensionError>
Negotiate certificate types with remote peer preferences
Trait Implementations§
Source§impl Clone for CertificateTypePreferences
impl Clone for CertificateTypePreferences
Source§fn clone(&self) -> CertificateTypePreferences
fn clone(&self) -> CertificateTypePreferences
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CertificateTypePreferences
impl Debug for CertificateTypePreferences
Source§impl Default for CertificateTypePreferences
impl Default for CertificateTypePreferences
Source§impl Hash for CertificateTypePreferences
Hash implementation for CertificateTypePreferences
impl Hash for CertificateTypePreferences
Hash implementation for CertificateTypePreferences
impl Eq for CertificateTypePreferences
impl StructuralPartialEq for CertificateTypePreferences
Auto Trait Implementations§
impl Freeze for CertificateTypePreferences
impl RefUnwindSafe for CertificateTypePreferences
impl Send for CertificateTypePreferences
impl Sync for CertificateTypePreferences
impl Unpin for CertificateTypePreferences
impl UnwindSafe for CertificateTypePreferences
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.