diff --git a/.bleep b/.bleep index d2b050ea2..23752af37 100644 --- a/.bleep +++ b/.bleep @@ -1 +1 @@ -fdc26b8f9eefd902a1e27d4ef1aafc480a6db305 \ No newline at end of file +3eb2a9750ec02867bec91a4069796faae8cd860c \ No newline at end of file diff --git a/pingora-core/src/connectors/tls.rs b/pingora-core/src/connectors/tls/boringssl_openssl/mod.rs similarity index 99% rename from pingora-core/src/connectors/tls.rs rename to pingora-core/src/connectors/tls/boringssl_openssl/mod.rs index 01dd8b399..f8568e71c 100644 --- a/pingora-core/src/connectors/tls.rs +++ b/pingora-core/src/connectors/tls/boringssl_openssl/mod.rs @@ -16,7 +16,7 @@ use log::debug; use pingora_error::{Error, ErrorType::*, OrErr, Result}; use std::sync::{Arc, Once}; -use super::ConnectorOptions; +use crate::connectors::ConnectorOptions; use crate::protocols::tls::client::handshake; use crate::protocols::tls::SslStream; use crate::protocols::IO; diff --git a/pingora-core/src/connectors/tls/mod.rs b/pingora-core/src/connectors/tls/mod.rs new file mode 100644 index 000000000..2a4d4695f --- /dev/null +++ b/pingora-core/src/connectors/tls/mod.rs @@ -0,0 +1,5 @@ +#[cfg(feature = "some_tls")] +mod boringssl_openssl; + +#[cfg(feature = "some_tls")] +pub use boringssl_openssl::*; diff --git a/pingora-core/src/listeners/tls.rs b/pingora-core/src/listeners/tls/boringssl_openssl/mod.rs similarity index 100% rename from pingora-core/src/listeners/tls.rs rename to pingora-core/src/listeners/tls/boringssl_openssl/mod.rs diff --git a/pingora-core/src/listeners/tls/mod.rs b/pingora-core/src/listeners/tls/mod.rs new file mode 100644 index 000000000..2a4d4695f --- /dev/null +++ b/pingora-core/src/listeners/tls/mod.rs @@ -0,0 +1,5 @@ +#[cfg(feature = "some_tls")] +mod boringssl_openssl; + +#[cfg(feature = "some_tls")] +pub use boringssl_openssl::*; diff --git a/pingora-core/src/protocols/tls/client.rs b/pingora-core/src/protocols/tls/boringssl_openssl/client.rs similarity index 99% rename from pingora-core/src/protocols/tls/client.rs rename to pingora-core/src/protocols/tls/boringssl_openssl/client.rs index 9edf29b2a..34ca78b57 100644 --- a/pingora-core/src/protocols/tls/client.rs +++ b/pingora-core/src/protocols/tls/boringssl_openssl/client.rs @@ -14,8 +14,8 @@ //! TLS client specific implementation -use super::SslStream; use crate::protocols::raw_connect::ProxyDigest; +use crate::protocols::tls::SslStream; use crate::protocols::{ GetProxyDigest, GetSocketDigest, GetTimingDigest, SocketDigest, TimingDigest, IO, }; diff --git a/pingora-core/src/protocols/tls/boringssl_openssl/mod.rs b/pingora-core/src/protocols/tls/boringssl_openssl/mod.rs new file mode 100644 index 000000000..c07f47e0f --- /dev/null +++ b/pingora-core/src/protocols/tls/boringssl_openssl/mod.rs @@ -0,0 +1,2 @@ +pub mod client; +pub mod server; diff --git a/pingora-core/src/protocols/tls/server.rs b/pingora-core/src/protocols/tls/boringssl_openssl/server.rs similarity index 99% rename from pingora-core/src/protocols/tls/server.rs rename to pingora-core/src/protocols/tls/boringssl_openssl/server.rs index 1da1d45b7..b7f2f6d2a 100644 --- a/pingora-core/src/protocols/tls/server.rs +++ b/pingora-core/src/protocols/tls/boringssl_openssl/server.rs @@ -14,7 +14,7 @@ //! TLS server specific implementation -use super::SslStream; +use crate::protocols::tls::SslStream; use crate::protocols::{Shutdown, IO}; use crate::tls::ext; use crate::tls::ext::ssl_from_acceptor; diff --git a/pingora-core/src/protocols/tls/mod.rs b/pingora-core/src/protocols/tls/mod.rs index b1edf23cb..ca353c5b5 100644 --- a/pingora-core/src/protocols/tls/mod.rs +++ b/pingora-core/src/protocols/tls/mod.rs @@ -14,9 +14,13 @@ //! The TLS layer implementations -pub mod client; pub mod digest; -pub mod server; + +#[cfg(feature = "some_tls")] +mod boringssl_openssl; + +#[cfg(feature = "some_tls")] +pub use boringssl_openssl::*; #[cfg(not(feature = "some_tls"))] pub mod dummy_tls;