From 7d9027ef780b98012450a9747aa6873954e24571 Mon Sep 17 00:00:00 2001 From: Duncan Mac-Vicar P Date: Thu, 23 Aug 2007 22:38:44 +0000 Subject: [PATCH] - Check that the signature exists before checking --- zypp/FileChecker.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/zypp/FileChecker.cc b/zypp/FileChecker.cc index 5368eb1..15bfa21 100644 --- a/zypp/FileChecker.cc +++ b/zypp/FileChecker.cc @@ -103,6 +103,12 @@ namespace zypp void SignatureFileChecker::operator()(const Pathname &file ) const { ZYpp::Ptr z = getZYpp(); + + if ( ! PathInfo(_signature).isExist()) + { + ZYPP_THROW(FileCheckException("Signature " + _signature.asString() + " not found.")); + } + MIL << "checking " << file << " file validity using digital signature.." << endl; bool valid = z->keyRing()->verifyFileSignatureWorkflow( file, string(), _signature); if (!valid) -- 2.7.4