]> git.proxmox.com Git - proxmox-backup.git/commitdiff
mark signed manifests as such
authorFabian Grünbichler <f.gruenbichler@proxmox.com>
Mon, 10 Aug 2020 11:25:09 +0000 (13:25 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Tue, 11 Aug 2020 07:56:53 +0000 (09:56 +0200)
for less-confusing display in the web interface

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
src/api2/admin/datastore.rs
src/backup/manifest.rs

index 81ca02eb63263578301004c9b078849d2730cdc9..fe72ea326883f036588d023d440342d15b9581cd 100644 (file)
@@ -67,7 +67,10 @@ fn read_backup_index(
 
     result.push(BackupContent {
         filename: MANIFEST_BLOB_NAME.to_string(),
-        crypt_mode: Some(CryptMode::None),
+        crypt_mode: match manifest.signature {
+            Some(_) => Some(CryptMode::SignOnly),
+            None => Some(CryptMode::None),
+        },
         size: Some(index_size),
     });
 
index 6af110d1cbb50f8c82ded85732b55ffa88e20711..56f6cf42469c535d43df40d6db8c90bdcd473a9d 100644 (file)
@@ -72,6 +72,7 @@ pub struct BackupManifest {
     files: Vec<FileInfo>,
     #[serde(default="empty_value")] // to be compatible with < 0.8.0 backups
     pub unprotected: Value,
+    pub signature: Option<String>,
 }
 
 #[derive(PartialEq)]
@@ -105,6 +106,7 @@ impl BackupManifest {
             backup_time: snapshot.backup_time().timestamp(),
             files: Vec::new(),
             unprotected: json!({}),
+            signature: None,
         }
     }