summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-08-25 17:41:47 -0500
committerDan McGee <dan@archlinux.org>2011-08-25 17:41:47 -0500
commit5a07b75b225cbc731fbfb915a9c9edf0c300ccc4 (patch)
tree323f99b9612f53cb126471ad1d74050a5b323d91
parentbe72e100159e6cd50ac64e3639f8e4f98218ccae (diff)
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 <dan@archlinux.org>
-rw-r--r--lib/libalpm/signing.c37
1 files changed, 16 insertions, 21 deletions
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;