mirror of
https://github.com/aphrody-labs/apt.git
synced 2026-10-13 22:01:23 +00:00
Build a real package, publish it with apt-ftparchive using only SHA3-256 and then only SHA3-512, and run the client against it over http. In each case apt update accepts the repository without a weak security warning, and show, install, download and source all work. A corrupted package or index file fails with a hash mismatch, and marking the SHA3 type untrusted makes apt reject the repository. With by-hash enabled, apt fetches from the SHA3 directory when that is the only hash offered and also when SHA256 is offered next to it. If such an archive has no SHA3 by-hash files, the update still succeeds by fetching the plain path. Finally, with both families published, corrupt only the SHA3-256 digests in Release. The update must fail although every SHA256 digest still matches.