pub trait Tls: Send + Sync {
// Required method
fn wrap(
&self,
socket: TcpStream,
host: &str,
roots: Option<&Path>,
) -> Result<Box<dyn Stream>>;
}Expand description
Wraps a connected socket in TLS, verifying the server’s certificate chain against roots (a PEM
file) or built-in roots, and its name as host. ironwork’s own build has no implementation, so
that it keeps no dependencies; the build in tls/ supplies one.
Required Methods§
fn wrap( &self, socket: TcpStream, host: &str, roots: Option<&Path>, ) -> Result<Box<dyn Stream>>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".