aquatic_http glommio: modify tls config and file parsing

This commit is contained in:
Joakim Frostegård 2021-10-26 19:38:37 +02:00
parent 02735ba2ff
commit 7fd2d4c42e
3 changed files with 42 additions and 35 deletions

View file

@ -1,4 +1,4 @@
use std::net::SocketAddr;
use std::{net::SocketAddr, path::PathBuf};
use aquatic_common::access_list::AccessListConfig;
use serde::{Deserialize, Serialize};
@ -37,6 +37,8 @@ pub struct TlsConfig {
pub use_tls: bool,
pub tls_pkcs12_path: String,
pub tls_pkcs12_password: String,
pub tls_certificate_path: PathBuf,
pub tls_private_key_path: PathBuf,
}
#[derive(Clone, Debug, Serialize, Deserialize)]
@ -182,6 +184,8 @@ impl Default for TlsConfig {
use_tls: false,
tls_pkcs12_path: "".into(),
tls_pkcs12_password: "".into(),
tls_certificate_path: "".into(),
tls_private_key_path: "".into(),
}
}
}