[−][src]Struct tokio_libtls::prelude::TlsConfigBuilder
TlsConfigBuilder
for TlsConfig
.
Example
let mut config = TlsConfigBuilder::new() .keypair_mem(cert, key, None) .ticket_key(1, &ticket_key1) .ticket_key(2, &ticket_key2) .protocols(TLS_PROTOCOLS_ALL) .ecdhecurves("X25519") .alpn("h2") .build()?;
Methods
impl TlsConfigBuilder
[src]
pub fn new() -> TlsConfigBuilder
[src]
pub fn build(&self) -> Result<TlsConfig, TlsError>
[src]
pub fn client(&self) -> Result<Tls, TlsError>
[src]
pub fn server(&self) -> Result<Tls, TlsError>
[src]
pub fn alpn(&mut self, alpn: &str) -> &mut TlsConfigBuilder
[src]
pub fn ca_file<P>(&mut self, path: P) -> &mut TlsConfigBuilder where
P: AsRef<Path>,
[src]
P: AsRef<Path>,
pub fn ca_path<P>(&mut self, path: P) -> &mut TlsConfigBuilder where
P: AsRef<Path>,
[src]
P: AsRef<Path>,
pub fn ca_mem(&mut self, mem: &[u8]) -> &mut TlsConfigBuilder
[src]
pub fn ciphers(&mut self, ciphers: &str) -> &mut TlsConfigBuilder
[src]
pub fn crl_file<P>(&mut self, path: P) -> &mut TlsConfigBuilder where
P: AsRef<Path>,
[src]
P: AsRef<Path>,
pub fn crl_mem(&mut self, mem: &[u8]) -> &mut TlsConfigBuilder
[src]
pub fn dheparams(&mut self, dheparams: &str) -> &mut TlsConfigBuilder
[src]
Set the parameters of an Diffie-Hellman Ephemeral (DHE) key exchange.
See also
pub fn ecdhecurves(&mut self, ecdhecurves: &str) -> &mut TlsConfigBuilder
[src]
Set the curves of an Elliptic Curve Diffie-Hellman Ephemeral (ECDHE) key exchange.
See also
pub fn keypair_file<P>(
&mut self,
cert: P,
key: P,
ocsp_staple: Option<P>
) -> &mut TlsConfigBuilder where
P: AsRef<Path>,
[src]
&mut self,
cert: P,
key: P,
ocsp_staple: Option<P>
) -> &mut TlsConfigBuilder where
P: AsRef<Path>,
Add additional files of a public and private key pair and OCSP staple.
See also
pub fn keypair_mem(
&mut self,
cert: &[u8],
key: &[u8],
ocsp_staple: Option<&[u8]>
) -> &mut TlsConfigBuilder
[src]
&mut self,
cert: &[u8],
key: &[u8],
ocsp_staple: Option<&[u8]>
) -> &mut TlsConfigBuilder
Add an additional public and private key pair and OCSP staple from memory.
See also
pub fn noverifycert(&mut self) -> &mut TlsConfigBuilder
[src]
pub fn noverifyname(&mut self) -> &mut TlsConfigBuilder
[src]
pub fn noverifytime(&mut self) -> &mut TlsConfigBuilder
[src]
pub fn protocols(&mut self, protocols: u32) -> &mut TlsConfigBuilder
[src]
pub fn session_fd(&mut self, fd: i32) -> &mut TlsConfigBuilder
[src]
pub fn session_id(&mut self, id: &[u8]) -> &mut TlsConfigBuilder
[src]
pub fn session_lifetime(&mut self, lifetime: usize) -> &mut TlsConfigBuilder
[src]
pub fn ticket_key(&mut self, keyrev: u32, key: &[u8]) -> &mut TlsConfigBuilder
[src]
pub fn verify(&mut self) -> &mut TlsConfigBuilder
[src]
pub fn verify_client(&mut self) -> &mut TlsConfigBuilder
[src]
pub fn verify_client_optional(&mut self) -> &mut TlsConfigBuilder
[src]
pub fn verify_depth(&mut self, depth: usize) -> &mut TlsConfigBuilder
[src]
Trait Implementations
impl Debug for TlsConfigBuilder
[src]
impl Clone for TlsConfigBuilder
[src]
fn clone(&self) -> TlsConfigBuilder
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Default for TlsConfigBuilder
[src]
fn default() -> TlsConfigBuilder
[src]
Auto Trait Implementations
impl Send for TlsConfigBuilder
impl Unpin for TlsConfigBuilder
impl Sync for TlsConfigBuilder
impl UnwindSafe for TlsConfigBuilder
impl RefUnwindSafe for TlsConfigBuilder
Blanket Implementations
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
ⓘImportant traits for &'_ mut Ffn borrow_mut(&mut self) -> &mut T
[src]
ⓘImportant traits for &'_ mut F
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,