From 50298bd107b0e2c2cfd3b633db7cf25e4804c574 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Sun, 2 Feb 2025 16:24:21 +0000 Subject: [PATCH] key: Print correct error code when verification fails Signed-off-by: Michael Tremer --- src/pakfire/key.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pakfire/key.c b/src/pakfire/key.c index ac1c90c4..18226b97 100644 --- a/src/pakfire/key.c +++ b/src/pakfire/key.c @@ -1038,14 +1038,14 @@ int pakfire_key_verify(struct pakfire_key* key, FILE* f, // Read the signature r = pakfire_key_read_signature(key, &signature, f); if (r < 0) { - ERROR(key->ctx, "Could not read signature: %m\n"); + ERROR(key->ctx, "Could not read signature: %s\n", strerror(-r)); return r; } // Verify signature r = pakfire_key_verify_signature(key, &signature, data, length); if (r < 0) { - ERROR(key->ctx, "Could not verify signature: %m\n"); + ERROR(key->ctx, "Could not verify signature: %s\n", strerror(-r)); return r; } -- 2.47.3