- Check that the signature exists before checking
authorDuncan Mac-Vicar P <dmacvicar@suse.de>
Thu, 23 Aug 2007 22:38:44 +0000 (22:38 +0000)
committerDuncan Mac-Vicar P <dmacvicar@suse.de>
Thu, 23 Aug 2007 22:38:44 +0000 (22:38 +0000)
zypp/FileChecker.cc

index 5368eb13db7738e6573ef572e4f6315eaae271ff..15bfa21007605129656adb851ba9339f8c2b190f 100644 (file)
@@ -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)