<feed xmlns='http://www.w3.org/2005/Atom'>
<title>apt/apt-pkg/contrib/hashes.cc, branch 2.9.14</title>
<subtitle>Debians commandline package manager</subtitle>
<id>https://git.kalnischkies.de/apt/atom?h=2.9.14</id>
<link rel='self' href='https://git.kalnischkies.de/apt/atom?h=2.9.14'/>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/'/>
<updated>2024-11-14T17:23:34Z</updated>
<entry>
<title>apt-pkg/contrib/hashes.cc, apt-pkg/contrib/hashes.h: APT::StringView -&gt; std::string_view in private interface. Take std::string_view instead of std::string const&amp; for HashString::HashString (not reused) [#if APT_PKG_ABI &gt; 600]</title>
<updated>2024-11-14T17:23:34Z</updated>
<author>
<name>наб</name>
<email>nabijaczleweli@nabijaczleweli.xyz</email>
</author>
<published>2024-11-12T16:59:17Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=de6ec4aca77d0a56e30d08dbc12661bdda0c6e69'/>
<id>urn:sha1:de6ec4aca77d0a56e30d08dbc12661bdda0c6e69</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Turn char[APT_BUFFER_SIZE] buffers into std::array&lt;char, APT_BUFFER_SIZE&gt;</title>
<updated>2024-11-11T14:52:43Z</updated>
<author>
<name>наб</name>
<email>nabijaczleweli@nabijaczleweli.xyz</email>
</author>
<published>2024-11-11T14:23:46Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=e59793e29ecb47c63b72de4f9d1e6d044a0ff6f2'/>
<id>urn:sha1:e59793e29ecb47c63b72de4f9d1e6d044a0ff6f2</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Modernize standard library includes</title>
<updated>2024-02-20T12:49:04Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>julian.klode@canonical.com</email>
</author>
<published>2024-02-20T12:43:08Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=40a75722c43ae24cb9a99d6730a3b25b65819c49'/>
<id>urn:sha1:40a75722c43ae24cb9a99d6730a3b25b65819c49</id>
<content type='text'>
This was automated with sed and git-clang-format, and then I had to
fix up the top of policy.cc by hand as git-clang-format accidentally
indented it by two spaces.
</content>
</entry>
<entry>
<title>Revert "Do not fail on systems running in FIPSmode."</title>
<updated>2023-10-04T12:52:29Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>julian.klode@canonical.com</email>
</author>
<published>2023-10-04T12:52:29Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=b92934a1904cd6dd1dfdab283d27cd34ca2dbe44'/>
<id>urn:sha1:b92934a1904cd6dd1dfdab283d27cd34ca2dbe44</id>
<content type='text'>
This reverts commit 668451def296afeb0c358a7d80ff39dc546defab.
</content>
</entry>
<entry>
<title>Do not fail on systems running in FIPSmode.</title>
<updated>2023-05-29T12:28:20Z</updated>
<author>
<name>A. Maitland Bottoms</name>
<email>bottoms@debian.org</email>
</author>
<published>2023-05-29T12:28:20Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=668451def296afeb0c358a7d80ff39dc546defab'/>
<id>urn:sha1:668451def296afeb0c358a7d80ff39dc546defab</id>
<content type='text'>
Initialize using gcrypt's GCRYCTL_NO_FIPS_MODE, available since
gcrypt version 1.10.0, otherwise apt aborts on FIPS enabled systems.
</content>
</entry>
<entry>
<title>Parse Checksum fields via pkgTagSection::Key, too</title>
<updated>2022-04-01T12:16:19Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2022-04-01T09:37:26Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=05fae6fae95d8ef6690f3d56863e3bb6a44d424c'/>
<id>urn:sha1:05fae6fae95d8ef6690f3d56863e3bb6a44d424c</id>
<content type='text'>
We abstract hashes a fair bit to be able to add new ones eventually,
which lead us to building the field names on the fly. We can do better
through by keeping a central place for these names, too, which even
helps in reducing code as we don't need the MD5 → Files dance anymore.
</content>
</entry>
<entry>
<title>HexDigest: Silence -Wstringop-overflow</title>
<updated>2020-12-04T22:16:04Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>julian.klode@canonical.com</email>
</author>
<published>2020-12-04T22:16:04Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=d63772845a28a08ea9c812ad8ac281cf9e0ae12a'/>
<id>urn:sha1:d63772845a28a08ea9c812ad8ac281cf9e0ae12a</id>
<content type='text'>
The compiler does not know that the size is small and thinks we might
be doing a stack buffer overflow of the vla:

    Add APT_ASSUME macro and silence -Wstringop-overflow in HexDigest()

    The compiler does not know that the size of a hash is at most 512 bit,
    so tell it that it is.

    ../apt-pkg/contrib/hashes.cc: In function ‘std::string HexDigest(gcry_md_hd_t, int)’:
    ../apt-pkg/contrib/hashes.cc:415:21: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
      415 |    Result[(Size)*2] = 0;
          |    ~~~~~~~~~~~~~~~~~^~~
    ../apt-pkg/contrib/hashes.cc:414:9: note: at offset [-9223372036854775808, 9223372036854775807] to an object with size at most 4294967295 declared here
      414 |    char Result[((Size)*2) + 1];
          |         ^~~~~~

Fix this by adding a simple assertion. This generates an extra two
instructions in the normal code path, so it's not exactly super costly.
</content>
</entry>
<entry>
<title>Initialize libgcrypt on first use</title>
<updated>2020-02-25T18:07:15Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>julian.klode@canonical.com</email>
</author>
<published>2020-02-25T18:03:12Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=65b77c941780c8e1819f527879b0b8e2642839dd'/>
<id>urn:sha1:65b77c941780c8e1819f527879b0b8e2642839dd</id>
<content type='text'>
This is not supposed to be done this way, but frankly, since we
abstract away the backend, there's not much else we can do here.

Closes: #949074
</content>
</entry>
<entry>
<title>Remove code tagged APT_PKG_590, add some missing includes</title>
<updated>2020-02-18T11:48:38Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>julian.klode@canonical.com</email>
</author>
<published>2020-02-18T11:48:38Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=e8016805b87bead8eb3dff0d0559c5d9590b721b'/>
<id>urn:sha1:e8016805b87bead8eb3dff0d0559c5d9590b721b</id>
<content type='text'>
Remove all code scheduled to be removed after 5.90, and fix
files to include files they previously got from hashes.h
including more headers.
</content>
</entry>
<entry>
<title>Convert users of {MD5,SHA1,SHA256,SHA512}Summation to use Hashes</title>
<updated>2020-01-14T12:10:36Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>julian.klode@canonical.com</email>
</author>
<published>2020-01-07T19:36:53Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=79de3008ebfc6b4a5dd32e9de1d19788da0b885d'/>
<id>urn:sha1:79de3008ebfc6b4a5dd32e9de1d19788da0b885d</id>
<content type='text'>
This makes use of the a function GetHashString() that returns
the specific hash string. We also need to implement another overload
of Add() for signed chars with sizes, so the existing users do not
require reinterpret_cast everywhere.
</content>
</entry>
</feed>
