]> git.proxmox.com Git - proxmox-backup.git/commitdiff
fix #3197: skip fingerprint check when restoring key
authorFabian Grünbichler <f.gruenbichler@proxmox.com>
Wed, 16 Dec 2020 13:41:06 +0000 (14:41 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Thu, 17 Dec 2020 05:37:54 +0000 (06:37 +0100)
when restoring an encrypted key, the original one is obviously not
available to check the fingerprint with.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
src/bin/proxmox-backup-client.rs

index 1c456aab0cb3ee10538e850f3b7b9fb8852bb480..36da624ee0a9114f3960094a31d023c21f1fa7ec 100644 (file)
@@ -1273,10 +1273,15 @@ async fn restore(param: Value) -> Result<Value, Error> {
         true,
     ).await?;
 
+    let (archive_name, archive_type) = parse_archive_type(archive_name);
+
     let (manifest, backup_index_data) = client.download_manifest().await?;
-    manifest.check_fingerprint(crypt_config.as_ref().map(Arc::as_ref))?;
 
-    let (archive_name, archive_type) = parse_archive_type(archive_name);
+    if archive_name == ENCRYPTED_KEY_BLOB_NAME && crypt_config.is_none() {
+        eprintln!("Restoring encrypted key blob without original key - skipping manifest fingerprint check!")
+    } else {
+        manifest.check_fingerprint(crypt_config.as_ref().map(Arc::as_ref))?;
+    }
 
     if archive_name == MANIFEST_BLOB_NAME {
         if let Some(target) = target {