fluvio_future/openssl/
mod.rs

1mod acceptor;
2mod async_to_sync_wrapper;
3mod certificate;
4mod connector;
5mod handshake;
6mod stream;
7
8#[cfg(test)]
9mod test;
10
11pub use acceptor::{TlsAcceptor, TlsAcceptorBuilder};
12pub use certificate::Certificate;
13pub use connector::{
14    TlsAnonymousConnector, TlsConnector, TlsConnectorBuilder, TlsDomainConnector, certs,
15};
16pub use openssl::ssl::SslVerifyMode;
17pub use stream::TlsStream;
18
19pub type DefaultServerTlsStream = TlsStream<crate::net::TcpStream>;
20pub type DefaultClientTlsStream = TlsStream<crate::net::TcpStream>;
21
22mod split {
23
24    use futures_util::AsyncReadExt;
25
26    use super::*;
27    use crate::net::{BoxReadConnection, BoxWriteConnection, SplitConnection};
28
29    impl SplitConnection for TlsStream<crate::net::TcpStream> {
30        fn split_connection(self) -> (BoxWriteConnection, BoxReadConnection) {
31            let (read, write) = self.split();
32            (Box::new(write), Box::new(read))
33        }
34    }
35}