monoio_native_tls/
lib.rs

1mod client;
2mod error;
3mod server;
4mod stream;
5mod utils;
6
7pub use client::TlsConnector;
8pub use error::TlsError;
9pub use server::TlsAcceptor;
10pub use stream::TlsStream;
11
12#[cfg(feature = "qat")]
13mod ffi;
14
15pub fn init() {
16    #[cfg(feature = "qat")]
17    static INIT_ONCE: std::sync::Once = std::sync::Once::new();
18    #[cfg(feature = "qat")]
19    const LKCF_ENGINE: &[u8] = b"lkcf-engine\0";
20
21    #[cfg(feature = "qat")]
22    INIT_ONCE.call_once(|| {
23        ffi::init_openssl_engine(unsafe {
24            std::ffi::CStr::from_bytes_with_nul_unchecked(LKCF_ENGINE)
25        })
26    });
27}