[pbs-devel] [PATCH proxmox-backup 2/3] proxy: use ssl cipher-suites from config if set
Hannes Laimer
h.laimer at proxmox.com
Thu Dec 16 17:31:08 CET 2021
Signed-off-by: Hannes Laimer <h.laimer at proxmox.com>
---
src/bin/proxmox-backup-proxy.rs | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/bin/proxmox-backup-proxy.rs b/src/bin/proxmox-backup-proxy.rs
index 07a53687..b9cabcb1 100644
--- a/src/bin/proxmox-backup-proxy.rs
+++ b/src/bin/proxmox-backup-proxy.rs
@@ -343,7 +343,13 @@ fn make_tls_acceptor() -> Result<SslAcceptor, Error> {
let key_path = configdir!("/proxy.key");
let cert_path = configdir!("/proxy.pem");
+ let (config, _) = proxmox_backup::config::node::config()?;
+ let cipher_suites = config.cipher_suites;
+
let mut acceptor = SslAcceptor::mozilla_intermediate_v5(SslMethod::tls()).unwrap();
+ if let Some(cipher_suites) = cipher_suites.as_deref() {
+ acceptor.set_cipher_list(cipher_suites)?;
+ }
acceptor.set_private_key_file(key_path, SslFiletype::PEM)
.map_err(|err| format_err!("unable to read proxy key {} - {}", key_path, err))?;
acceptor.set_certificate_chain_file(cert_path)
--
2.30.2
More information about the pbs-devel
mailing list