[svn] gpgme - r1148 - in trunk: . gpgme
svn author wk
cvs at cvs.gnupg.org
Tue Jan 3 19:31:49 CET 2006
Author: wk
Date: 2006-01-03 19:31:48 +0100 (Tue, 03 Jan 2006)
New Revision: 1148
Modified:
trunk/NEWS
trunk/configure.ac
trunk/gpgme/ChangeLog
trunk/gpgme/gpgme.h
trunk/gpgme/verify.c
Log:
Added PKA stuff
Modified: trunk/NEWS
===================================================================
--- trunk/NEWS 2006-01-03 14:20:12 UTC (rev 1147)
+++ trunk/NEWS 2006-01-03 18:31:48 UTC (rev 1148)
@@ -21,9 +21,8 @@
* New status codes GPGME_PKA_TRUST_GOOD and GPGME_PKA_TRUST_BAD.
They are analyzed by the verify handlers and made available in the
- new PKA_TRUST field of the signature result structure.
+ new PKA_TRUST and PKA_ADDRESS fields of the signature result structure.
-
* Interface changes relative to the 1.1.0 release:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gpgme_key_sig_t EXTENDED: New field notations.
@@ -32,6 +31,7 @@
GPGME_STATUS_PKA_TRUST_BAD NEW
GPGME_STATUS_PKA_TRUST_GOOD NEW
gpgme_signature_t EXTENDED: New field pka_trust.
+gpgme_signature_t EXTENDED: New field pka_address.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Modified: trunk/configure.ac
===================================================================
--- trunk/configure.ac 2006-01-03 14:20:12 UTC (rev 1147)
+++ trunk/configure.ac 2006-01-03 18:31:48 UTC (rev 1148)
@@ -25,7 +25,7 @@
# Version number: Remember to change it immediately *after* a release.
# Make sure to run "svn up" before a "make dist".
-AC_INIT(gpgme, 1.2.0-cvs, [bug-gpgme at gnupg.org])
+AC_INIT(gpgme, 1.1.1-cvs, [bug-gpgme at gnupg.org])
# LT Version numbers, remember to change them just *before* a release.
# (Code changed: REVISION++)
# (Interfaces added/removed/changed: CURRENT++, REVISION=0)
Modified: trunk/gpgme/ChangeLog
===================================================================
--- trunk/gpgme/ChangeLog 2006-01-03 14:20:12 UTC (rev 1147)
+++ trunk/gpgme/ChangeLog 2006-01-03 18:31:48 UTC (rev 1148)
@@ -8,11 +8,17 @@
* w32-glib-io.c (find_channel): Set channel to unbuffered.
(_gpgme_io_select): Fix debug output.
+2005-12-23 Werner Koch <wk at g10code.com>
+
+ * gpgme.h (struct _gpgme_signature): Append field PKA_ADDRESS.
+ * verify.c (release_op_data, _gpgme_verify_status_handler): Set
+ this field.
+
2005-12-20 Werner Koch <wk at g10code.com>
* gpgme.h (gpgme_status_code_t): Added GPGME_STATUS_PKA_TRUST_BAD
and GPGME_STATUS_PKA_TRUST_GOOD.
- (gpgme_signature_t): New field pka_trust.
+ (struct _gpgme_signature): New field pka_trust.
* verify.c (_gpgme_verify_status_handler): Set pka_trust.
2005-12-06 Werner Koch <wk at g10code.com>
Modified: trunk/gpgme/gpgme.h
===================================================================
--- trunk/gpgme/gpgme.h 2006-01-03 14:20:12 UTC (rev 1147)
+++ trunk/gpgme/gpgme.h 2006-01-03 18:31:48 UTC (rev 1148)
@@ -72,7 +72,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.2.0-cvs"
+#define GPGME_VERSION "1.1.1-cvs"
@@ -1020,11 +1020,11 @@
gpgme_error_t gpgme_data_set_encoding (gpgme_data_t dh,
gpgme_data_encoding_t enc);
-/* Get the filename associated with the data object with handle DH, or
+/* Get the file name associated with the data object with handle DH, or
NULL if there is none. */
char *gpgme_data_get_file_name (gpgme_data_t dh);
-/* Set the filename associated with the data object with handle DH to
+/* Set the file name associated with the data object with handle DH to
FILE_NAME. */
gpgme_error_t gpgme_data_set_file_name (gpgme_data_t dh,
const char *file_name);
@@ -1334,6 +1334,9 @@
/* The hash algorithm used to create the signature. */
gpgme_hash_algo_t hash_algo;
+
+ /* The mailbox from the PKA information or NULL. */
+ char *pka_address;
};
typedef struct _gpgme_signature *gpgme_signature_t;
Modified: trunk/gpgme/verify.c
===================================================================
--- trunk/gpgme/verify.c 2006-01-03 14:20:12 UTC (rev 1147)
+++ trunk/gpgme/verify.c 2006-01-03 18:31:48 UTC (rev 1148)
@@ -64,6 +64,8 @@
if (sig->fpr)
free (sig->fpr);
+ if (sig->pka_address)
+ free (sig->pka_address);
free (sig);
sig = next;
}
@@ -588,6 +590,7 @@
void *hook;
op_data_t opd;
gpgme_signature_t sig;
+ char *end;
err = _gpgme_op_data_lookup (ctx, OPDATA_VERIFY, &hook, -1, NULL);
opd = hook;
@@ -654,10 +657,15 @@
case GPGME_STATUS_PKA_TRUST_BAD:
case GPGME_STATUS_PKA_TRUST_GOOD:
opd->only_newsig_seen = 0;
- if (sig && !sig->pka_trust)
- sig->pka_trust = code == GPGME_STATUS_PKA_TRUST_GOOD? 2 : 1;
- /* FIXME: We should set the mailbox which is the argument to
- these status codes into a new field. */
+ /* Check that we only get one of these status codes per
+ signature; if not the crypto backend misbehaves. */
+ if (!sig || sig->pka_trust || sig->pka_address)
+ return gpg_error (GPG_ERR_INV_ENGINE);
+ sig->pka_trust = code == GPGME_STATUS_PKA_TRUST_GOOD? 2 : 1;
+ end = strchr (args, ' ');
+ if (end)
+ *end = 0;
+ sig->pka_address = strdup (args);
break;
case GPGME_STATUS_ERROR:
More information about the Gnupg-commits
mailing list