[svn] gpgme - r1244 - in trunk: . doc gpgme

svn author wk cvs at cvs.gnupg.org
Tue Aug 7 17:22:21 CEST 2007


Author: wk
Date: 2007-08-07 17:21:50 +0200 (Tue, 07 Aug 2007)
New Revision: 1244

Modified:
   trunk/NEWS
   trunk/doc/ChangeLog
   trunk/doc/gpgme.texi
   trunk/gpgme/ChangeLog
   trunk/gpgme/gpgme.h
   trunk/gpgme/verify.c
Log:
Add new signature_t member chain_model.


Modified: trunk/NEWS
===================================================================
--- trunk/NEWS	2007-08-02 14:59:01 UTC (rev 1243)
+++ trunk/NEWS	2007-08-07 15:21:50 UTC (rev 1244)
@@ -2,7 +2,11 @@
 ------------------------------------------------
 
 
+ * Interface changes relative to the 1.1.1 release:
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ gpgme_signature_t               EXTENDED: New field chain_model.
 
+
 Noteworthy changes in version 1.1.5 (2007-07-09)
 ------------------------------------------------
 

Modified: trunk/doc/ChangeLog
===================================================================
--- trunk/doc/ChangeLog	2007-08-02 14:59:01 UTC (rev 1243)
+++ trunk/doc/ChangeLog	2007-08-07 15:21:50 UTC (rev 1244)
@@ -1,3 +1,7 @@
+2007-08-07  Werner Koch  <wk at g10code.com>
+
+	* gpgme.texi (Verify): Describe chain_model.
+
 2007-07-12  Werner Koch  <wk at g10code.com>
 
 	* gpgme.texi (Library Version Check): Add remark that the socket

Modified: trunk/doc/gpgme.texi
===================================================================
--- trunk/doc/gpgme.texi	2007-08-02 14:59:01 UTC (rev 1243)
+++ trunk/doc/gpgme.texi	2007-08-07 15:21:50 UTC (rev 1244)
@@ -4076,6 +4076,16 @@
 Depending on the configuration of the engine, this metric may also be
 reflected by the validity of the signature.
 
+ at item unsigned int chain_model : 1
+This is true if the validity of the signature has been checked using the
+chain model.  In the chain model the time the signature has been created
+must be within the validity period of the certificate and the time the
+certificate itself has been created must be within the validity period
+of the issuing certificate.  In contrast the default validation model
+checks the validity of signature as well at the entire certificate chain
+at the current time.
+
+
 @item gpgme_validity_t validity
 The validity of the signature.
 

Modified: trunk/gpgme/ChangeLog
===================================================================
--- trunk/gpgme/ChangeLog	2007-08-02 14:59:01 UTC (rev 1243)
+++ trunk/gpgme/ChangeLog	2007-08-07 15:21:50 UTC (rev 1244)
@@ -1,3 +1,8 @@
+2007-08-07  Werner Koch  <wk at g10code.com>
+
+	* gpgme.h (struct _gpgme_signature): Add member CHAIN_MODEL.
+	* verify.c (parse_trust): Set Chain_MODEL.
+
 2007-08-02  Werner Koch  <wk at g10code.com>
 
 	* w32-glib-io.c (_gpgme_io_spawn): Use DETACHED_PROCESS flag.
@@ -12,7 +17,7 @@
 
 2007-07-17  Marcus Brinkmann  <marcus at g10code.de>
 
-	* debug.c:;5B Include <errno.h> and "debug.h".
+	* debug.c: Include <errno.h> and "debug.h".
 	(_gpgme_debug): Save and restore ERRNO.
 	(TOHEX): New macro.
 	(_gpgme_debug_buffer): New function.

Modified: trunk/gpgme/gpgme.h
===================================================================
--- trunk/gpgme/gpgme.h	2007-08-02 14:59:01 UTC (rev 1243)
+++ trunk/gpgme/gpgme.h	2007-08-07 15:21:50 UTC (rev 1244)
@@ -1,6 +1,6 @@
 /* gpgme.h - Public interface to GnuPG Made Easy.
    Copyright (C) 2000 Werner Koch (dd9jn)
-   Copyright (C) 2001, 2002, 2003, 2004, 2005 g10 Code GmbH
+   Copyright (C) 2001, 2002, 2003, 2004, 2005, 2007 g10 Code GmbH
 
    This file is part of GPGME.
  
@@ -1323,8 +1323,11 @@
   /* PKA status: 0 = not available, 1 = bad, 2 = okay, 3 = RFU. */
   unsigned int pka_trust : 2;
 
+  /* Validity has been verified using the chain model. */
+  unsigned int chain_model : 1;
+
   /* Internal to GPGME, do not use.  */
-  int _unused : 29;
+  int _unused : 28;
 
   gpgme_validity_t validity;
   gpgme_error_t validity_reason;

Modified: trunk/gpgme/verify.c
===================================================================
--- trunk/gpgme/verify.c	2007-08-02 14:59:01 UTC (rev 1243)
+++ trunk/gpgme/verify.c	2007-08-07 15:21:50 UTC (rev 1244)
@@ -541,10 +541,21 @@
       break;
     }
 
+  sig->validity_reason = 0;
+  sig->chain_model = 0;
   if (*args)
-    sig->validity_reason = _gpgme_map_gnupg_error (args);
-  else
-    sig->validity_reason = 0;
+    {
+      sig->validity_reason = _gpgme_map_gnupg_error (args);
+      while (*args && *args != ' ')
+        args++;
+      if (*args)
+        {
+          while (*args == ' ')
+            args++;
+          if (!strncmp (args, "cm", 2) && (args[2] == ' ' || !args[2]))
+            sig->chain_model = 1;
+        }
+    }
 
   return 0;
 }




More information about the Gnupg-commits mailing list