From b7b3fc23869475d3d1729de802935b98594d1677 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Sat, 23 Apr 2011 11:39:51 -0500 Subject: 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 --- lib/libalpm/signing.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'lib/libalpm') 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; } -- cgit v1.2.3-70-g09d2