Struct mbedtls::ssl::config::Config

source ·
pub struct Config<'c> { /* private fields */ }

Implementations§

source§

impl<'c> Config<'c>

source

pub fn new(e: Endpoint, t: Transport, p: Preset) -> Self

source

pub fn set_endpoint(&mut self, e: Endpoint)

source

pub fn set_transport(&mut self, t: Transport)

source

pub fn set_authmode(&mut self, am: AuthMode)

source

pub fn read_timeout(&self) -> u32

source

pub fn set_read_timeout(&mut self, t: u32)

source

pub fn set_ciphersuites(&mut self, list: &'c [c_int])

source

pub fn set_ciphersuites_for_version( &mut self, list: &'c [c_int], major: c_int, minor: c_int )

source

pub fn set_curves(&mut self, list: &'c [ecp_group_id])

source

pub fn set_min_version(&mut self, version: Version) -> Result<()>

source

pub fn set_max_version(&mut self, version: Version) -> Result<()>

source

pub fn set_cert_profile(&mut self, p: &'c Profile)

source

pub fn set_dh_params(&mut self, params: &[u8]) -> Result<()>

Takes both DER and PEM forms of FFDH parameters in DHParams format.

When calling on PEM-encoded data, params must be NULL-terminated

source

pub fn set_ca_list<C: Into<&'c mut LinkedCertificate>>( &mut self, list: Option<C>, crl: Option<&'c mut Crl> )

source

pub fn push_cert<C: Into<&'c mut LinkedCertificate>>( &mut self, chain: C, key: &'c mut Pk ) -> Result<()>

source

pub fn certs(&'c self) -> KeyCertIter<'c>

source

pub fn set_session_tickets_callback<F: TicketCallback>(&mut self, cb: &'c mut F)

Server only: configure callback to use for generating/interpreting session tickets.

source

pub fn set_session_tickets(&mut self, u: UseSessionTickets)

Client only: whether to remember and use session tickets

source

pub fn set_ffdh_min_bitlen(&mut self, bitlen: c_uint)

Client only: minimal FFDH group size

source

pub fn set_sni_callback<F: FnMut(&mut HandshakeContext<'_>, &[u8]) -> StdResult<(), ()>>( &mut self, cb: &'c mut F )

source

pub fn set_verify_callback<F>(&mut self, cb: &'c mut F)where F: FnMut(&mut LinkedCertificate, i32, &mut VerifyError) -> Result<()>,

source

pub fn set_ca_callback<F>(&mut self, cb: &'c mut F)where F: FnMut(&LinkedCertificate, &mut ForeignOwnedCertListBuilder) -> Result<()>,

source

pub fn set_alpn_protocols( &mut self, protocols: &'c NullTerminatedStrList<'c> ) -> Result<()>

Set the supported Application Layer Protocols.

Each protocol name in the list must also be terminated with a null character (\0).

source§

impl<'c> Config<'c>

source

pub fn set_rng<F: Random>(&mut self, f: Option<&'c mut F>)

source§

impl<'c> Config<'c>

source

pub fn set_dbg<F: DbgCallback>(&mut self, f: Option<&'c mut F>)

Trait Implementations§

source§

impl<'c> Drop for Config<'c>

source§

fn drop(&mut self)

Executes the destructor for this type. Read more
source§

impl<'q, 'c> Into<*const ssl_config> for &'q Config<'c>

source§

fn into(self) -> *const ssl_config

Converts this type into the (usually inferred) input type.
source§

impl<'q, 'c> Into<*mut ssl_config> for &'q mut Config<'c>

source§

fn into(self) -> *mut ssl_config

Converts this type into the (usually inferred) input type.

Auto Trait Implementations§

§

impl<'c> RefUnwindSafe for Config<'c>

§

impl<'c> !Send for Config<'c>

§

impl<'c> !Sync for Config<'c>

§

impl<'c> Unpin for Config<'c>

§

impl<'c> UnwindSafe for Config<'c>

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.