From: Landon Fuller Date: Sun, 19 Feb 2006 21:28:49 +0000 (+0000) Subject: Don't attempt signature validation on non-files X-Git-Tag: Release-1.38.6~20 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=bdd1db9d6798e595690c1cbcfe497af71e108492;p=bacula%2Fbacula Don't attempt signature validation on non-files git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@2791 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/bacula/src/filed/restore.c b/bacula/src/filed/restore.c index b89c2b0581..4aed75c9b6 100644 --- a/bacula/src/filed/restore.c +++ b/bacula/src/filed/restore.c @@ -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;