diff options
author | Michael Vogt <michael.vogt@ubuntu.com> | 2007-08-03 15:01:05 +0200 |
---|---|---|
committer | Michael Vogt <michael.vogt@ubuntu.com> | 2007-08-03 15:01:05 +0200 |
commit | 7fc9db7c75948504393971681054c5dbea137c5d (patch) | |
tree | c0c188462ce8f5313f97a6c0ae35a25bef47d239 /apt-pkg/indexcopy.cc | |
parent | 5b28c8040795b53a4df54f33e57976720558ed32 (diff) | |
parent | c3279b9d100fb62f412267512458b58dda40f95b (diff) |
* apt-inst/contrib/extracttar.cc:
- fix fd leak for zero size files (thanks to Bill Broadley for
reporting this bug)
* apt-pkg/acquire-item.cc:
- remove zero size files on I-M-S hit
* methods/https.cc:
- only send LastModified if we actually have one
- send range request with if-range
- delete failed downloads
* apt-pkg/deb/dpkgpm.{cc,h}:
- merged dpkg-log branch, this lets you specify a
Dir::Log::Terminal file to log dpkg output to
(ABI break)
* merged apt--sha256 branch to fully support the new
sha256 checksums in the Packages and Release files
(ABI break)
* Applied patch from Aurelien Jarno <aurel32@debian.org> to fix wrong
directory downloading on non-linux architectures (closes: #435597)
Diffstat (limited to 'apt-pkg/indexcopy.cc')
-rw-r--r-- | apt-pkg/indexcopy.cc | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/apt-pkg/indexcopy.cc b/apt-pkg/indexcopy.cc index c9dded134..b30777d8d 100644 --- 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; } - 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; - cout << "Expected MD5sum: " << Record->MD5Hash << endl; - cout << "got: " << MD5 << endl << endl; + cout << "Expected Hash " << Record->Hash.toStr() << endl; } return true; |