From bdd1db9d6798e595690c1cbcfe497af71e108492 Mon Sep 17 00:00:00 2001 From: Landon Fuller Date: Sun, 19 Feb 2006 21:28:49 +0000 Subject: [PATCH] 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 --- bacula/src/filed/restore.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) 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; -- 2.39.5