tiny_http/ssl.rs
1//! Modules providing SSL/TLS implementations. For backwards compatibility, OpenSSL is the default
2//! implementation, but Rustls is highly recommended as a pure Rust alternative.
3//!
4//! In order to simplify the swappable implementations these SSL/TLS modules adhere to an implicit
5//! trait contract and specific implementations are re-exported as [`SslContextImpl`] and [`SslStream`].
6//! The concrete type of these aliases will depend on which module you enable in `Cargo.toml`.
7
8#[cfg(feature = "ssl-openssl")]
9pub(crate) mod openssl;
10#[cfg(feature = "ssl-openssl")]
11pub(crate) use self::openssl::OpenSslContext as SslContextImpl;
12#[cfg(feature = "ssl-openssl")]
13pub(crate) use self::openssl::SplitOpenSslStream as SslStream;
14
15#[cfg(feature = "ssl-rustls")]
16pub(crate) mod rustls;
17#[cfg(feature = "ssl-rustls")]
18pub(crate) use self::rustls::RustlsContext as SslContextImpl;
19#[cfg(feature = "ssl-rustls")]
20pub(crate) use self::rustls::RustlsStream as SslStream;