From: Duncan Mac-Vicar P Date: Thu, 23 Aug 2007 22:38:44 +0000 (+0000) Subject: - Check that the signature exists before checking X-Git-Tag: BASE-SuSE-Linux-10_3-Branch~217 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7d9027ef780b98012450a9747aa6873954e24571;p=platform%2Fupstream%2Flibzypp.git - Check that the signature exists before checking --- 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)