diff --git a/proxmox-rest-server/src/connection.rs b/proxmox-rest-server/src/connection.rs index a154182f..7681f00c 100644 --- a/proxmox-rest-server/src/connection.rs +++ b/proxmox-rest-server/src/connection.rs @@ -34,13 +34,16 @@ enum Tls { /// A builder for an `SslAcceptor` which can be configured either with certificates (or path to PEM /// files), or otherwise builds a self-signed certificate on the fly (mostly useful during /// development). +#[derive(Default)] pub struct TlsAcceptorBuilder { tls: Option, + cipher_suites: Option, + cipher_list: Option, } impl TlsAcceptorBuilder { pub fn new() -> Self { - Self { tls: None } + Self::default() } pub fn certificate(mut self, key: PKey, cert: X509) -> Self { @@ -57,6 +60,16 @@ impl TlsAcceptorBuilder { self } + pub fn cipher_suites(mut self, suites: String) -> Self { + self.cipher_suites = Some(suites); + self + } + + pub fn cipher_list(mut self, list: String) -> Self { + self.cipher_list = Some(list); + self + } + pub fn build(self) -> Result { let mut acceptor = SslAcceptor::mozilla_intermediate_v5(SslMethod::tls()).unwrap();