gpgme-1-0-branch gpgme/gpgme (ChangeLog gpgme.h verify.c)
cvs user wk
cvs at cvs.gnupg.org
Thu Apr 21 08:55:22 CEST 2005
Date: Thursday, April 21, 2005 @ 09:12:18
Author: wk
Path: /cvs/gpgme/gpgme/gpgme
Tag: gpgme-1-0-branch
Modified: ChangeLog gpgme.h verify.c
(calc_sig_summary): Set the key revoked bit.
-----------+
ChangeLog | 4 ++++
gpgme.h | 2 +-
verify.c | 25 +++++++++++++++++++------
3 files changed, 24 insertions(+), 7 deletions(-)
Index: gpgme/gpgme/ChangeLog
diff -u gpgme/gpgme/ChangeLog:1.386.2.2 gpgme/gpgme/ChangeLog:1.386.2.3
--- gpgme/gpgme/ChangeLog:1.386.2.2 Sat Dec 11 16:50:12 2004
+++ gpgme/gpgme/ChangeLog Thu Apr 21 09:12:18 2005
@@ -1,3 +1,7 @@
+2005-04-21 Werner Koch <wk at g10code.com>
+
+ * verify.c (calc_sig_summary): Set the key revoked bit.
+
2004-12-11 Marcus Brinkmann <marcus at g10code.de>
* util.h [HAVE_CONFIG_H && HAVE_TTYNAME_R] (ttyname_r): Define
Index: gpgme/gpgme/gpgme.h
diff -u gpgme/gpgme/gpgme.h:1.149.2.2 gpgme/gpgme/gpgme.h:1.149.2.3
--- gpgme/gpgme/gpgme.h:1.149.2.2 Tue Dec 28 12:32:50 2004
+++ gpgme/gpgme/gpgme.h Thu Apr 21 09:12:18 2005
@@ -75,7 +75,7 @@
AM_PATH_GPGME macro) check that this header matches the installed
library. Warning: Do not edit the next line. configure will do
that for you! */
-#define GPGME_VERSION "1.0.2"
+#define GPGME_VERSION "1.0.3-cvs"
/* Some opaque data types used by GPGME. */
Index: gpgme/gpgme/verify.c
diff -u gpgme/gpgme/verify.c:1.69.2.1 gpgme/gpgme/verify.c:1.69.2.2
--- gpgme/gpgme/verify.c:1.69.2.1 Tue Dec 7 22:11:53 2004
+++ gpgme/gpgme/verify.c Thu Apr 21 09:12:18 2005
@@ -94,7 +94,8 @@
calc_sig_summary (gpgme_signature_t sig)
{
unsigned long sum = 0;
-
+
+ /* Calculate the red/green flag. */
if (sig->validity == GPGME_VALIDITY_FULL
|| sig->validity == GPGME_VALIDITY_ULTIMATE)
{
@@ -113,11 +114,6 @@
else if (gpg_err_code (sig->status) == GPG_ERR_BAD_SIGNATURE)
sum |= GPGME_SIGSUM_RED;
- if (sig->validity == GPGME_VALIDITY_UNKNOWN)
- {
- if (gpg_err_code (sig->validity_reason) == GPG_ERR_CRL_TOO_OLD)
- sum |= GPGME_SIGSUM_CRL_TOO_OLD;
- }
/* FIXME: handle the case when key and message are expired. */
switch (gpg_err_code (sig->status))
@@ -143,6 +139,23 @@
break;
}
+ /* Now look at the certain reason codes. */
+ switch (gpg_err_code (sig->validity_reason))
+ {
+ case GPG_ERR_CRL_TOO_OLD:
+ if (sig->validity == GPGME_VALIDITY_UNKNOWN)
+ sum |= GPGME_SIGSUM_CRL_TOO_OLD;
+ break;
+
+ case GPG_ERR_CERT_REVOKED:
+ sum |= GPGME_SIGSUM_KEY_REVOKED;
+ break;
+
+ default:
+ break;
+ }
+
+ /* Check other flags. */
if (sig->wrong_key_usage)
sum |= GPGME_SIGSUM_BAD_POLICY;
More information about the Gnupg-commits
mailing list