Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib/libalpm/signing.c
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-04-23 11:39:51 -0500
committerDan McGee <dan@archlinux.org>2011-04-24 10:50:06 -0500
commitb7b3fc23869475d3d1729de802935b98594d1677 (patch)
tree8f12c936b318d36c52037a101da3e3157b693a69 /lib/libalpm/signing.c
parent1d7ad5d24bd7487d70b98197d4dd3477ff75f513 (diff)
signing: add more detail to unexpected signature count error
Do a quick loop and count of the returned data so we can show how many signatures were parsed and read. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm/signing.c')
-rw-r--r--lib/libalpm/signing.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/libalpm/signing.c b/lib/libalpm/signing.c
index 0abf34f1..867e0a58 100644
--- a/lib/libalpm/signing.c
+++ b/lib/libalpm/signing.c
@@ -293,7 +293,13 @@ int _alpm_gpgme_checksig(const char *path, const char *base64_sig)
result = gpgme_op_verify_result(ctx);
gpgsig = result->signatures;
if(!gpgsig || gpgsig->next) {
- _alpm_log(PM_LOG_ERROR, _("Unexpected number of signatures\n"));
+ int count = 0;
+ while(gpgsig) {
+ count++;
+ gpgsig = gpgsig->next;
+ }
+ _alpm_log(PM_LOG_ERROR, _("Unexpected number of signatures (%d)\n"),
+ count);
ret = -1;
goto error;
}