#include <apt-pkg/aptconfiguration.h>
#include <apt-pkg/configuration.h>
#include <apt-pkg/tagfile.h>
-#include <apt-pkg/indexrecords.h>
+#include <apt-pkg/metaindex.h>
#include <apt-pkg/cdrom.h>
#include <apt-pkg/gpgv.h>
#include <apt-pkg/hashes.h>
+#include <apt-pkg/debmetaindex.h>
#include <iostream>
#include <sstream>
}
/*}}}*/
// SigVerify::Verify - Verify a files md5sum against its metaindex /*{{{*/
-bool SigVerify::Verify(string prefix, string file, indexRecords *MetaIndex)
+bool SigVerify::Verify(string prefix, string file, metaIndex *MetaIndex)
{
- const indexRecords::checkSum *Record = MetaIndex->Lookup(file);
+ const metaIndex::checkSum *Record = MetaIndex->Lookup(file);
bool const Debug = _config->FindB("Debug::aptcdrom",false);
// we skip non-existing files in the verifcation of the Release file
// Read all Release files
for (vector<string>::iterator I = SigList.begin(); I != SigList.end(); ++I)
- {
+ {
if(Debug)
cout << "Signature verify for: " << *I << endl;
- indexRecords *MetaIndex = new indexRecords;
+ metaIndex *MetaIndex = new debReleaseIndex("","");
string prefix = *I;
string const releasegpg = *I+"Release.gpg";
}
// Open the Release file and add it to the MetaIndex
- if(!MetaIndex->Load(release))
+ std::string ErrorText;
+ if(MetaIndex->Load(release, &ErrorText) == false)
{
- _error->Error("%s",MetaIndex->ErrorText.c_str());
+ _error->Error("%s", ErrorText.c_str());
return false;
}
-
+
// go over the Indexfiles and see if they verify
// if so, remove them from our copy of the lists
vector<string> keys = MetaIndex->MetaKeys();