Struct Tls
pub struct Tls { /* private fields */ }Expand description
Certificates for TLS 1.3: this side’s chain and key, and the CA that signs the other side’s certificate.
Implementations§
§impl Tls
impl Tls
pub fn from_pem_files(
cert: Option<&Path>,
key: Option<&Path>,
ca: Option<&Path>,
) -> Result<Self>
pub fn from_pem_files( cert: Option<&Path>, key: Option<&Path>, ca: Option<&Path>, ) -> Result<Self>
Loads PEM files: cert holds this side’s chain (leaf first), key
its private key (PKCS#8, PKCS#1 or SEC1), ca one or more trusted
CA certificates.
pub fn from_pem(
cert: Option<&[u8]>,
key: Option<&[u8]>,
ca: Option<&[u8]>,
) -> Result<Self>
pub fn from_pem( cert: Option<&[u8]>, key: Option<&[u8]>, ca: Option<&[u8]>, ) -> Result<Self>
Like from_pem_files, from PEM text.
pub fn with_server_name(self, name: impl Into<String>) -> Self
pub fn with_server_name(self, name: impl Into<String>) -> Self
The name a connecting side verifies in the listener’s certificate, instead of the host part of the address it dialled.
Trait Implementations§
Auto Trait Implementations§
impl Forget for Tls
impl Freeze for Tls
impl Move for Tls
impl RefUnwindSafe for Tls
impl Send for Tls
impl Sync for Tls
impl Unpin for Tls
impl UnsafeUnpin for Tls
impl UnwindSafe for Tls
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