refactor: move tls_helpers to server-common

This commit is contained in:
Wez Furlong
2023-07-20 13:18:38 -07:00
parent d473204d81
commit 40cbc2348d
8 changed files with 9 additions and 7 deletions
Generated
+3 -2
View File
@@ -2269,6 +2269,9 @@ dependencies = [
"mod-redis",
"mod-sqlite",
"once_cell",
"rcgen",
"rustls 0.20.8",
"rustls-pemfile",
"serde_json",
"throttle",
"tokio",
@@ -2367,10 +2370,8 @@ dependencies = [
"ppp",
"prometheus",
"rand 0.8.5",
"rcgen",
"rfc5321",
"rustls 0.20.8",
"rustls-pemfile",
"self_cell",
"serde",
"serde_json",
+3
View File
@@ -24,6 +24,9 @@ mod-memoize = {path="../mod-memoize"}
mod-redis = {path="../mod-redis"}
mod-sqlite = {path="../mod-sqlite"}
once_cell = "1.17"
rcgen = "0.10"
rustls = "0.20"
rustls-pemfile = "1.0"
serde_json = "1.0"
throttle = {path="../throttle"}
tokio = {version="1.25", features=["full", "tracing"]}
+1
View File
@@ -4,6 +4,7 @@ use mlua::{Function, Lua, LuaSerdeExt, Value};
use mod_redis::RedisConnKey;
pub mod diagnostic_logging;
pub mod tls_helpers;
pub fn register(lua: &Lua) -> anyhow::Result<()> {
for func in [
-2
View File
@@ -49,10 +49,8 @@ once_cell = "1.17"
ppp = "2.2"
prometheus = "0.13"
rand = "0.8"
rcgen = "0.10"
rfc5321 = {path="../rfc5321"}
rustls = "0.20"
rustls-pemfile = "1.0"
serde = {version="1.0", features=["derive"]}
humantime-serde = "1.1"
self_cell = "1.0"
+1 -1
View File
@@ -154,7 +154,7 @@ impl HttpListenerParams {
}
async fn tls_config(&self) -> anyhow::Result<RustlsConfig> {
let config = crate::tls_helpers::make_server_config(
let config = kumo_server_common::tls_helpers::make_server_config(
&self.hostname,
&self.tls_private_key,
&self.tls_certificate,
-1
View File
@@ -22,7 +22,6 @@ mod ready_queue;
mod smtp_dispatcher;
mod smtp_server;
mod spool;
mod tls_helpers;
/// KumoMTA Daemon.
///
+1 -1
View File
@@ -208,7 +208,7 @@ impl EsmtpListenerParams {
return Ok(TlsAcceptor::from(config.clone()));
}
let config = crate::tls_helpers::make_server_config(
let config = kumo_server_common::tls_helpers::make_server_config(
&self.hostname,
&self.tls_private_key,
&self.tls_certificate,