Set GPGME_SIGSUM_KEY_REVOKED also for gpg.

* src/verify.c (calc_sig_summary): Handle GPG_ERR_CERT_REVOKED.

--

parse_new_sig() handles a revoked key by setting sig->status to
GPG_ERR_CERT_REVOKED, but then later calc_sig_summary() expects that
code in sig->validity_reason.

Additional comments added by wk.
This commit is contained in:
Matthew Barnes 2015-03-18 17:20:55 -04:00 committed by Werner Koch
parent 0d28a69616
commit 87d713ff41
No known key found for this signature in database
GPG Key ID: E3FDFF218E45B72B

View File

@ -195,6 +195,10 @@ calc_sig_summary (gpgme_signature_t sig)
sum |= GPGME_SIGSUM_KEY_MISSING; sum |= GPGME_SIGSUM_KEY_MISSING;
break; break;
case GPG_ERR_CERT_REVOKED:
sum |= GPGME_SIGSUM_KEY_REVOKED;
break;
case GPG_ERR_BAD_SIGNATURE: case GPG_ERR_BAD_SIGNATURE:
case GPG_ERR_NO_ERROR: case GPG_ERR_NO_ERROR:
break; break;
@ -213,6 +217,9 @@ calc_sig_summary (gpgme_signature_t sig)
break; break;
case GPG_ERR_CERT_REVOKED: case GPG_ERR_CERT_REVOKED:
/* Note that this is a second way to set this flag. It may also
have been set due to a sig->status of STATUS_REVKEYSIG from
parse_new_sig. */
sum |= GPGME_SIGSUM_KEY_REVOKED; sum |= GPGME_SIGSUM_KEY_REVOKED;
break; break;