[−][src]Struct libtls::config::Builder
Builder
for Config
.
Example
let mut config = Builder::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 Builder
[src]
pub fn new() -> Self
[src]
pub fn build(&self) -> Result<Config>
[src]
pub fn client(&self) -> Result<Tls>
[src]
pub fn server(&self) -> Result<Tls>
[src]
pub fn alpn(&mut self, alpn: &str) -> &mut Self
[src]
pub fn ca_file<P: AsRef<Path>>(&mut self, path: P) -> &mut Self
[src]
pub fn ca_path<P: AsRef<Path>>(&mut self, path: P) -> &mut Self
[src]
pub fn ca_mem(&mut self, mem: &[u8]) -> &mut Self
[src]
pub fn ciphers(&mut self, ciphers: &str) -> &mut Self
[src]
pub fn crl_file<P: AsRef<Path>>(&mut self, path: P) -> &mut Self
[src]
pub fn crl_mem(&mut self, mem: &[u8]) -> &mut Self
[src]
pub fn dheparams(&mut self, dheparams: &str) -> &mut Self
[src]
Set the parameters of an Diffie-Hellman Ephemeral (DHE) key exchange.
See also
pub fn ecdhecurves(&mut self, ecdhecurves: &str) -> &mut Self
[src]
Set the curves of an Elliptic Curve Diffie-Hellman Ephemeral (ECDHE) key exchange.
See also
pub fn keypair_file<P: AsRef<Path>>(
&mut self,
cert: P,
key: P,
ocsp_staple: Option<P>
) -> &mut Self
[src]
&mut self,
cert: P,
key: P,
ocsp_staple: Option<P>
) -> &mut Self
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 Self
[src]
&mut self,
cert: &[u8],
key: &[u8],
ocsp_staple: Option<&[u8]>
) -> &mut Self
Add an additional public and private key pair and OCSP staple from memory.
See also
pub fn noverifycert(&mut self) -> &mut Self
[src]
pub fn noverifyname(&mut self) -> &mut Self
[src]
pub fn noverifytime(&mut self) -> &mut Self
[src]
pub fn protocols(&mut self, protocols: u32) -> &mut Self
[src]
pub fn session_fd(&mut self, fd: RawFd) -> &mut Self
[src]
pub fn session_id(&mut self, id: &[u8]) -> &mut Self
[src]
pub fn session_lifetime(&mut self, lifetime: usize) -> &mut Self
[src]
pub fn ticket_key(&mut self, keyrev: u32, key: &[u8]) -> &mut Self
[src]
pub fn verify(&mut self) -> &mut Self
[src]
pub fn verify_client(&mut self) -> &mut Self
[src]
pub fn verify_client_optional(&mut self) -> &mut Self
[src]
pub fn verify_depth(&mut self, depth: usize) -> &mut Self
[src]
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Builder
impl Send for Builder
impl Sync for Builder
impl Unpin for Builder
impl UnwindSafe for Builder
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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> 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>,