X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/6a4958d3134a3a61c036bc9ccaccc393c2bb99f2..9fa247dc9ba2aa28ae564e96cba5b2b23bcac91b:/apt-pkg/contrib/hashes.cc diff --git a/apt-pkg/contrib/hashes.cc b/apt-pkg/contrib/hashes.cc index 755ad2035..27e617751 100644 --- a/apt-pkg/contrib/hashes.cc +++ b/apt-pkg/contrib/hashes.cc @@ -141,8 +141,8 @@ APT_PURE bool HashString::usable() const /*{{{*/ { return ( (Type != "Checksum-FileSize") && - (Type != "MD5Sum") && - (Type != "SHA1") && + //(Type != "MD5Sum") && + //(Type != "SHA1") && !IsConfigured(Type.c_str(), "Untrusted") ); } @@ -312,6 +312,8 @@ public: // Hashes::Add* - Add the contents of data or FD /*{{{*/ bool Hashes::Add(const unsigned char * const Data, unsigned long long const Size) { + if (Size == 0) + return true; bool Res = true; APT_IGNORE_DEPRECATED_PUSH if ((d->CalcHashes & MD5SUM) == MD5SUM)