diff --git a/src/api2/config/remote.rs b/src/api2/config/remote.rs index 509343f2..ad9a5ae5 100644 --- a/src/api2/config/remote.rs +++ b/src/api2/config/remote.rs @@ -50,6 +50,10 @@ pub fn list_remotes( password: { schema: remote::REMOTE_PASSWORD_SCHEMA, }, + fingerprint: { + optional: true, + schema: CERT_FINGERPRINT_SHA256_SCHEMA, + }, }, }, )] @@ -118,6 +122,10 @@ pub fn read_remote(name: String) -> Result { optional: true, schema: remote::REMOTE_PASSWORD_SCHEMA, }, + fingerprint: { + optional: true, + schema: CERT_FINGERPRINT_SHA256_SCHEMA, + }, digest: { optional: true, schema: PROXMOX_CONFIG_DIGEST_SCHEMA, @@ -132,6 +140,7 @@ pub fn update_remote( host: Option, userid: Option, password: Option, + fingerprint: Option, digest: Option, ) -> Result<(), Error> { @@ -158,6 +167,9 @@ pub fn update_remote( if let Some(userid) = userid { data.userid = userid; } if let Some(password) = password { data.password = password; } + // fixme: howto delete a fingeprint? + if let Some(fingerprint) = fingerprint { data.fingerprint = Some(fingerprint); } + config.set_data(&name, "remote", &data)?; remote::save_config(&config)?; diff --git a/src/bin/proxmox-backup-manager.rs b/src/bin/proxmox-backup-manager.rs index 283e293d..0dac2c16 100644 --- a/src/bin/proxmox-backup-manager.rs +++ b/src/bin/proxmox-backup-manager.rs @@ -476,7 +476,9 @@ pub fn complete_remote_datastore_name(_arg: &str, param: &HashMap, } fn init() -> SectionConfig {