diff options
Diffstat (limited to 'ftparchive/writer.cc')
-rw-r--r-- | ftparchive/writer.cc | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/ftparchive/writer.cc b/ftparchive/writer.cc index eb8938b95..c43e8f4b4 100644 --- a/ftparchive/writer.cc +++ b/ftparchive/writer.cc @@ -64,6 +64,7 @@ FTWScanner::FTWScanner(string const &Arch): Arch(Arch) DoMD5 = _config->FindB("APT::FTPArchive::MD5",true); DoSHA1 = _config->FindB("APT::FTPArchive::SHA1",true); DoSHA256 = _config->FindB("APT::FTPArchive::SHA256",true); + DoSHA512 = _config->FindB("APT::FTPArchive::SHA512",true); } /*}}}*/ // FTWScanner::Scanner - FTW Scanner /*{{{*/ @@ -1060,10 +1061,12 @@ bool ReleaseWriter::DoPackage(string FileName) CheckSums[NewFileName].SHA256 = SHA256.Result(); } - SHA256Summation SHA512; - SHA256.AddFD(fd.Fd(), fd.Size()); - CheckSums[NewFileName].SHA512 = SHA512.Result(); - + if (DoSHA512 == true) + { + SHA512Summation SHA512; + SHA512.AddFD(fd.Fd(), fd.Size()); + CheckSums[NewFileName].SHA512 = SHA512.Result(); + } fd.Close(); return true; |