projects
/
apt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
* apt-inst/contrib/extracttar.cc:
[apt.git]
/
apt-pkg
/
indexcopy.cc
diff --git
a/apt-pkg/indexcopy.cc
b/apt-pkg/indexcopy.cc
index c9dded1347a2d3d9bfbb3a930f2c187fa06ed86c..b30777d8d28939e20a2493cc24a9dd7136ad652b 100644
(file)
--- a/
apt-pkg/indexcopy.cc
+++ b/
apt-pkg/indexcopy.cc
@@
-528,23
+528,16
@@
bool SigVerify::Verify(string prefix, string file, indexRecords *MetaIndex)
return false;
}
return false;
}
- MD5Summation sum;
- FileFd Fd(prefix+file, FileFd::ReadOnly);
- sum.AddFD(Fd.Fd(), Fd.Size());
- Fd.Close();
- string MD5 = (string)sum.Result();
-
- if (Record->MD5Hash != MD5)
+ if (!Record->Hash.VerifyFile(prefix+file))
{
{
- _error->Warning("
MD5
mismatch for: %s",file.c_str());
+ _error->Warning("
Hash
mismatch for: %s",file.c_str());
return false;
}
if(_config->FindB("Debug::aptcdrom",false))
{
cout << "File: " << prefix+file << endl;
return false;
}
if(_config->FindB("Debug::aptcdrom",false))
{
cout << "File: " << prefix+file << endl;
- cout << "Expected MD5sum: " << Record->MD5Hash << endl;
- cout << "got: " << MD5 << endl << endl;
+ cout << "Expected Hash " << Record->Hash.toStr() << endl;
}
return true;
}
return true;