[pbs-devel] [PATCH proxmox-backup v2 3/3] api2: make cipher-suites updatable

Hannes Laimer h.laimer at proxmox.com
Tue Jan 4 12:48:26 CET 2022


Signed-off-by: Hannes Laimer <h.laimer at proxmox.com>
---
 src/api2/node/config.rs | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/api2/node/config.rs b/src/api2/node/config.rs
index 3f060981..adb39ac2 100644
--- a/src/api2/node/config.rs
+++ b/src/api2/node/config.rs
@@ -56,6 +56,10 @@ pub enum DeletableProperty {
     http_proxy,
     /// Delete the email-from property.
     email_from,
+    /// Delete the cipher-suites-tls3 property.
+    cipher_suites_tls3,
+    /// Delete the cipher-suites-tls2 property.
+    cipher_suites_tls2,
 }
 
 #[api(
@@ -113,6 +117,8 @@ pub fn update_node_config(
                 DeletableProperty::acmedomain4 => { config.acmedomain4 = None; },
                 DeletableProperty::http_proxy => { config.http_proxy = None; },
                 DeletableProperty::email_from => { config.email_from = None; },
+                DeletableProperty::cipher_suites_tls3 => { config.cipher_suites_tls3 = None; },
+                DeletableProperty::cipher_suites_tls2 => { config.cipher_suites_tls2 = None; },
             }
         }
     }
@@ -125,6 +131,8 @@ pub fn update_node_config(
     if update.acmedomain4.is_some() { config.acmedomain4 = update.acmedomain4; }
     if update.http_proxy.is_some() { config.http_proxy = update.http_proxy; }
     if update.email_from.is_some() { config.email_from = update.email_from; }
+    if update.cipher_suites_tls3.is_some() { config.cipher_suites_tls3 = update.cipher_suites_tls3; }
+    if update.cipher_suites_tls2.is_some() { config.cipher_suites_tls2 = update.cipher_suites_tls2; }
 
     crate::config::node::save_config(&config)?;
 
-- 
2.30.2






More information about the pbs-devel mailing list