pub struct Config<'c> { /* private fields */ }
Implementations§
source§impl<'c> Config<'c>
impl<'c> Config<'c>
pub fn new(e: Endpoint, t: Transport, p: Preset) -> Self
pub fn set_endpoint(&mut self, e: Endpoint)
pub fn set_transport(&mut self, t: Transport)
pub fn set_authmode(&mut self, am: AuthMode)
pub fn read_timeout(&self) -> u32
pub fn set_read_timeout(&mut self, t: u32)
pub fn set_ciphersuites(&mut self, list: &'c [c_int])
pub fn set_ciphersuites_for_version( &mut self, list: &'c [c_int], major: c_int, minor: c_int )
pub fn set_curves(&mut self, list: &'c [ecp_group_id])
pub fn set_min_version(&mut self, version: Version) -> Result<()>
pub fn set_max_version(&mut self, version: Version) -> Result<()>
pub fn set_cert_profile(&mut self, p: &'c Profile)
sourcepub fn set_dh_params(&mut self, params: &[u8]) -> Result<()>
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
pub fn set_ca_list<C: Into<&'c mut LinkedCertificate>>( &mut self, list: Option<C>, crl: Option<&'c mut Crl> )
pub fn push_cert<C: Into<&'c mut LinkedCertificate>>( &mut self, chain: C, key: &'c mut Pk ) -> Result<()>
pub fn certs(&'c self) -> KeyCertIter<'c> ⓘ
sourcepub fn set_session_tickets_callback<F: TicketCallback>(&mut self, cb: &'c mut F)
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.
sourcepub fn set_session_tickets(&mut self, u: UseSessionTickets)
pub fn set_session_tickets(&mut self, u: UseSessionTickets)
Client only: whether to remember and use session tickets
sourcepub fn set_ffdh_min_bitlen(&mut self, bitlen: c_uint)
pub fn set_ffdh_min_bitlen(&mut self, bitlen: c_uint)
Client only: minimal FFDH group size
pub fn set_sni_callback<F: FnMut(&mut HandshakeContext<'_>, &[u8]) -> StdResult<(), ()>>( &mut self, cb: &'c mut F )
pub fn set_verify_callback<F>(&mut self, cb: &'c mut F)where F: FnMut(&mut LinkedCertificate, i32, &mut VerifyError) -> Result<()>,
pub fn set_ca_callback<F>(&mut self, cb: &'c mut F)where F: FnMut(&LinkedCertificate, &mut ForeignOwnedCertListBuilder) -> Result<()>,
sourcepub fn set_alpn_protocols(
&mut self,
protocols: &'c NullTerminatedStrList<'c>
) -> Result<()>
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
).