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>
This commit is contained in:
Dan McGee 2011-04-23 11:39:51 -05:00
parent 1d7ad5d24b
commit b7b3fc2386
1 changed files with 7 additions and 1 deletions

View File

@ -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;
}