From 5a07b75b225cbc731fbfb915a9c9edf0c300ccc4 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Thu, 25 Aug 2011 17:41:47 -0500 Subject: Always process validity value returned by gpgme Don't force 'never'; you should be checking both the status and validity anyway. Signed-off-by: Dan McGee --- lib/libalpm/signing.c | 37 ++++++++++++++++--------------------- 1 file changed, 16 insertions(+), 21 deletions(-) (limited to 'lib/libalpm') diff --git a/lib/libalpm/signing.c b/lib/libalpm/signing.c index f63ac2f6..b21b6c46 100644 --- a/lib/libalpm/signing.c +++ b/lib/libalpm/signing.c @@ -360,27 +360,22 @@ int _alpm_gpgme_checksig(alpm_handle_t *handle, const char *path, break; } - if(status == ALPM_SIGSTATUS_VALID - || status == ALPM_SIGSTATUS_KEY_EXPIRED) { - switch(gpgsig->validity) { - case GPGME_VALIDITY_ULTIMATE: - case GPGME_VALIDITY_FULL: - validity = ALPM_SIGVALIDITY_FULL; - break; - case GPGME_VALIDITY_MARGINAL: - validity = ALPM_SIGVALIDITY_MARGINAL; - break; - case GPGME_VALIDITY_NEVER: - validity = ALPM_SIGVALIDITY_NEVER; - break; - case GPGME_VALIDITY_UNKNOWN: - case GPGME_VALIDITY_UNDEFINED: - default: - validity = ALPM_SIGVALIDITY_UNKNOWN; - break; - } - } else { - validity = ALPM_SIGVALIDITY_NEVER; + switch(gpgsig->validity) { + case GPGME_VALIDITY_ULTIMATE: + case GPGME_VALIDITY_FULL: + validity = ALPM_SIGVALIDITY_FULL; + break; + case GPGME_VALIDITY_MARGINAL: + validity = ALPM_SIGVALIDITY_MARGINAL; + break; + case GPGME_VALIDITY_NEVER: + validity = ALPM_SIGVALIDITY_NEVER; + break; + case GPGME_VALIDITY_UNKNOWN: + case GPGME_VALIDITY_UNDEFINED: + default: + validity = ALPM_SIGVALIDITY_UNKNOWN; + break; } result->status[sigcount] = status; -- cgit v1.2.3-70-g09d2