aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorYuchen Wu <[email protected]>2024-06-17 15:13:37 -0700
committerEdward Wang <[email protected]>2024-06-28 12:34:25 -0700
commitc0b23c67361a8e6b844103127a4e11507f567033 (patch)
tree4a21403f73100ab900842005799122a9d6226767
parent648a6ad0554442be5f9c8d396a66843552156d1f (diff)
downloadpingora-c0b23c67361a8e6b844103127a4e11507f567033.tar.gz
pingora-c0b23c67361a8e6b844103127a4e11507f567033.zip
Expose a few more TLS APIs
-rw-r--r--.bleep2
-rw-r--r--pingora-core/src/listeners/tls.rs9
-rw-r--r--pingora-openssl/src/lib.rs1
3 files changed, 11 insertions, 1 deletions
diff --git a/.bleep b/.bleep
index 84aa635..dc07897 100644
--- a/.bleep
+++ b/.bleep
@@ -1 +1 @@
-f70d8b77a4085cbe11b9559317f6d6e7e49914db \ No newline at end of file
+f87e46c90fe2f84c2ce90ac1def9f4400ae45f24 \ No newline at end of file
diff --git a/pingora-core/src/listeners/tls.rs b/pingora-core/src/listeners/tls.rs
index 655346f..1dd63d4 100644
--- a/pingora-core/src/listeners/tls.rs
+++ b/pingora-core/src/listeners/tls.rs
@@ -38,6 +38,15 @@ pub struct TlsSettings {
callbacks: Option<TlsAcceptCallbacks>,
}
+impl From<SslAcceptorBuilder> for TlsSettings {
+ fn from(settings: SslAcceptorBuilder) -> Self {
+ TlsSettings {
+ accept_builder: settings,
+ callbacks: None,
+ }
+ }
+}
+
impl Deref for TlsSettings {
type Target = SslAcceptorBuilder;
diff --git a/pingora-openssl/src/lib.rs b/pingora-openssl/src/lib.rs
index 25f7cb7..7d52d68 100644
--- a/pingora-openssl/src/lib.rs
+++ b/pingora-openssl/src/lib.rs
@@ -25,6 +25,7 @@ pub use tokio_openssl as tokio_ssl;
pub mod ext;
// export commonly used libs
+pub use ssl_lib::dh;
pub use ssl_lib::error;
pub use ssl_lib::hash;
pub use ssl_lib::nid;