api2: make tls ciphers updatable
Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
This commit is contained in:
parent
2eba3967b2
commit
f37167aeff
@ -56,6 +56,10 @@ pub enum DeletableProperty {
|
||||
http_proxy,
|
||||
/// Delete the email-from property.
|
||||
email_from,
|
||||
/// Delete the ciphers-tls13 property.
|
||||
ciphers_tls13,
|
||||
/// Delete the ciphers-tls12 property.
|
||||
ciphers_tls12,
|
||||
}
|
||||
|
||||
#[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::ciphers_tls13 => { config.ciphers_tls13 = None; },
|
||||
DeletableProperty::ciphers_tls12 => { config.ciphers_tls12 = 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.ciphers_tls13.is_some() { config.ciphers_tls13 = update.ciphers_tls13; }
|
||||
if update.ciphers_tls12.is_some() { config.ciphers_tls12 = update.ciphers_tls12; }
|
||||
|
||||
crate::config::node::save_config(&config)?;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user