]> git.sur5r.net Git - bacula/bacula/commitdiff
Don't attempt signature validation on non-files
authorLandon Fuller <landonf@opendarwin.org>
Sun, 19 Feb 2006 21:28:49 +0000 (21:28 +0000)
committerLandon Fuller <landonf@opendarwin.org>
Sun, 19 Feb 2006 21:28:49 +0000 (21:28 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@2791 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/src/filed/restore.c

index b89c2b0581f61a605cf11dff5d6c0ca49228e88f..4aed75c9b6f41d4e278fc7b0ff0b962ad8e899eb 100644 (file)
@@ -536,19 +536,21 @@ void do_restore(JCR *jcr)
          cipher_ctx = NULL;
       }
       set_attributes(jcr, attr, &bfd);
+
+      /* Verify the cryptographic signature on the last file, if any */
+      if (jcr->pki_sign) {
+         if (sig) {
+            // Failure is reported in verify_signature() ...
+            verify_signature(jcr, sig);
+         } else {
+            Jmsg1(jcr, M_ERROR, 0, _("Missing cryptographic signature for %s\n"), jcr->last_fname);
+         }
+      }
    }
+
    if (is_bopen(&bfd)) {
       bclose(&bfd);
    }
-   /* Verify the cryptographic signature on the last file, if any */
-   if (jcr->pki_sign) {
-      if (sig) {
-         // Failure is reported in verify_signature() ...
-         verify_signature(jcr, sig);
-      } else {
-         Jmsg1(jcr, M_ERROR, 0, _("Missing cryptographic signature for %s\n"), jcr->last_fname);
-      }
-   }
 
    set_jcr_job_status(jcr, JS_Terminated);
    goto ok_out;