]> git.ipfire.org Git - pakfire.git/commitdiff
repo: Only use a few stronger digests for metadata
authorMichael Tremer <michael.tremer@ipfire.org>
Sun, 2 Feb 2025 14:53:47 +0000 (14:53 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Sun, 2 Feb 2025 14:53:47 +0000 (14:53 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/pakfire/repo.c

index fce57b686e8bb23f343d9d4bc37437bb43e6c561..9dab5588244a46ecfef22fadac46e952f4d58891 100644 (file)
@@ -50,6 +50,8 @@
 #include <pakfire/util.h>
 #include <pakfire/xfer.h>
 
+#define METADATA_DIGESTS PAKFIRE_DIGEST_SHA3_512|PAKFIRE_DIGEST_BLAKE2B512
+
 // Refresh mirror lists once every 6 hours
 #define REFRESH_AGE_MIRRORLIST                 6 * 3600
 
@@ -1982,7 +1984,7 @@ static int pakfire_repo_metadata_add_file(struct pakfire_repo* self,
                goto ERROR;
 
        // Compute the database digests
-       r = pakfire_digests_compute_from_path(self->ctx, &digests, PAKFIRE_DIGESTS_ALL, path);
+       r = pakfire_digests_compute_from_path(self->ctx, &digests, METADATA_DIGESTS, path);
        if (r < 0) {
                ERROR(self->ctx, "Failed to compute file digests: %s\n", strerror(-r));
                goto ERROR;