diff options
author | Kevin Guthrie <[email protected]> | 2024-08-18 11:30:51 -0400 |
---|---|---|
committer | Yuchen Wu <[email protected]> | 2024-08-30 11:18:18 -0700 |
commit | e564cd535a19876b1918be3a40bbfed467e1ab25 (patch) | |
tree | 1678c5d4182c4649ce7b1664f78fc9e0abad3819 | |
parent | 4f45792d801b237ee80cc63941a71ea5840bdf3c (diff) | |
download | pingora-e564cd535a19876b1918be3a40bbfed467e1ab25.tar.gz pingora-e564cd535a19876b1918be3a40bbfed467e1ab25.zip |
Refactor `boringssl_openssl` into submodules in preparation for rustls integration
-rw-r--r-- | .bleep | 2 | ||||
-rw-r--r-- | pingora-core/src/connectors/tls/boringssl_openssl/mod.rs (renamed from pingora-core/src/connectors/tls.rs) | 2 | ||||
-rw-r--r-- | pingora-core/src/connectors/tls/mod.rs | 5 | ||||
-rw-r--r-- | pingora-core/src/listeners/tls/boringssl_openssl/mod.rs (renamed from pingora-core/src/listeners/tls.rs) | 0 | ||||
-rw-r--r-- | pingora-core/src/listeners/tls/mod.rs | 5 | ||||
-rw-r--r-- | pingora-core/src/protocols/tls/boringssl_openssl/client.rs (renamed from pingora-core/src/protocols/tls/client.rs) | 2 | ||||
-rw-r--r-- | pingora-core/src/protocols/tls/boringssl_openssl/mod.rs | 2 | ||||
-rw-r--r-- | pingora-core/src/protocols/tls/boringssl_openssl/server.rs (renamed from pingora-core/src/protocols/tls/server.rs) | 2 | ||||
-rw-r--r-- | pingora-core/src/protocols/tls/mod.rs | 8 |
9 files changed, 22 insertions, 6 deletions
@@ -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 index 01dd8b3..f8568e7 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 0000000..2a4d469 --- /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 index 55a7139..55a7139 100644 --- a/pingora-core/src/listeners/tls.rs +++ b/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 0000000..2a4d469 --- /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 index 9edf29b..34ca78b 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 0000000..c07f47e --- /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 index 1da1d45..b7f2f6d 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 b1edf23..ca353c5 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; |