[svn] gpgme - r1414 - in trunk: doc src tests
svn author wk
cvs at cvs.gnupg.org
Tue Nov 3 21:27:35 CET 2009
Author: wk
Date: 2009-11-03 21:27:35 +0100 (Tue, 03 Nov 2009)
New Revision: 1414
Modified:
trunk/doc/gpgme.texi
trunk/src/ChangeLog
trunk/src/gpgme.h.in
trunk/src/verify.c
trunk/tests/ChangeLog
trunk/tests/run-sign.c
trunk/tests/run-support.h
Log:
Prepare for a new protocol.
Comment clarification.
Modified: trunk/src/ChangeLog
===================================================================
--- trunk/src/ChangeLog 2009-11-03 19:15:35 UTC (rev 1413)
+++ trunk/src/ChangeLog 2009-11-03 20:27:35 UTC (rev 1414)
@@ -1,3 +1,7 @@
+2009-11-03 Werner Koch <wk at g10code.com>
+
+ * gpgme.h.in (GPGME_PROTOCOL_UISERVER): New.
+
2009-11-03 Marcus Brinkmann <marcus at g10code.de>
* Makefile.am (main_sources): Change g13.c to vfs-mount.c. Add
Modified: trunk/tests/ChangeLog
===================================================================
--- trunk/tests/ChangeLog 2009-11-03 19:15:35 UTC (rev 1413)
+++ trunk/tests/ChangeLog 2009-11-03 20:27:35 UTC (rev 1414)
@@ -1,3 +1,9 @@
+2009-11-03 Werner Koch <wk at g10code.com>
+
+ * run-support.h (fail_if_err): Include program name.
+
+ * run-sign.c (main): Add option --uiserver.
+
2009-10-26 Marcus Brinkmann <marcus at g10code.de>
* opassuan/t-command.c: Update to new interface.
Modified: trunk/doc/gpgme.texi
===================================================================
--- trunk/doc/gpgme.texi 2009-11-03 19:15:35 UTC (rev 1413)
+++ trunk/doc/gpgme.texi 2009-11-03 20:27:35 UTC (rev 1414)
@@ -766,6 +766,15 @@
@item GPGME_PROTOCOL_CMS
This specifies the Cryptographic Message Syntax.
+ at item GPGME_PROTOCOL_ASSUAN
+Under development. Please ask on @email{gnupg-devel@@gnupg.org} for help.
+
+ at item GPGME_PROTOCOL_G13
+Under development. Please ask on @email{gnupg-devel@@gnupg.org} for help.
+
+ at item GPGME_PROTOCOL_UISERVER
+Under development. Please ask on @email{gnupg-devel@@gnupg.org} for help.
+
@item GPGME_PROTOCOL_UNKNOWN
Reserved for future extension. You may use this to indicate that the
used protocol is not known to the application. Currently,
Modified: trunk/src/gpgme.h.in
===================================================================
--- trunk/src/gpgme.h.in 2009-11-03 19:15:35 UTC (rev 1413)
+++ trunk/src/gpgme.h.in 2009-11-03 20:27:35 UTC (rev 1414)
@@ -325,6 +325,7 @@
GPGME_PROTOCOL_GPGCONF = 2, /* Special code for gpgconf. */
GPGME_PROTOCOL_ASSUAN = 3, /* Low-level access to an Assuan server. */
GPGME_PROTOCOL_G13 = 4,
+ GPGME_PROTOCOL_UISERVER= 5,
GPGME_PROTOCOL_UNKNOWN = 255
}
gpgme_protocol_t;
Modified: trunk/src/verify.c
===================================================================
--- trunk/src/verify.c 2009-11-03 19:15:35 UTC (rev 1413)
+++ trunk/src/verify.c 2009-11-03 20:27:35 UTC (rev 1414)
@@ -201,7 +201,7 @@
sum |= GPGME_SIGSUM_BAD_POLICY;
/* Set the valid flag when the signature is unquestionable
- valid. */
+ valid. (The test is identical to if(sum == GPGME_SIGSUM_GREEN)). */
if ((sum & GPGME_SIGSUM_GREEN) && !(sum & ~GPGME_SIGSUM_GREEN))
sum |= GPGME_SIGSUM_VALID;
Modified: trunk/tests/run-sign.c
===================================================================
--- trunk/tests/run-sign.c 2009-11-03 19:15:35 UTC (rev 1413)
+++ trunk/tests/run-sign.c 2009-11-03 20:27:35 UTC (rev 1414)
@@ -69,6 +69,7 @@
" --verbose run in verbose mode\n"
" --openpgp use the OpenPGP protocol (default)\n"
" --cms use the CMS protocol\n"
+ " --uiserver use the UI server\n"
" --key NAME use key NAME for signing\n"
, stderr);
exit (ex);
@@ -115,6 +116,11 @@
protocol = GPGME_PROTOCOL_CMS;
argc--; argv++;
}
+ else if (!strcmp (*argv, "--uiserver"))
+ {
+ protocol = GPGME_PROTOCOL_UISERVER;
+ argc--; argv++;
+ }
else if (!strcmp (*argv, "--key"))
{
argc--; argv++;
@@ -131,6 +137,12 @@
if (argc != 1)
show_usage (1);
+ if (key_string && protocol == GPGME_PROTOCOL_UISERVER)
+ {
+ fprintf (stderr, PGM ": ignoring --key in UI-server mode\n");
+ key_string = NULL;
+ }
+
init_gpgme (protocol);
err = gpgme_new (&ctx);
@@ -141,12 +153,10 @@
if (key_string)
{
gpgme_key_t akey;
-
+
err = gpgme_get_key (ctx, key_string, &akey, 1);
if (err)
{
- fprintf (stderr, PGM ": error getting key `%s': %s\n",
- key_string, gpg_strerror (err));
exit (1);
}
err = gpgme_signers_add (ctx, akey);
Modified: trunk/tests/run-support.h
===================================================================
--- trunk/tests/run-support.h 2009-11-03 19:15:35 UTC (rev 1413)
+++ trunk/tests/run-support.h 2009-11-03 20:27:35 UTC (rev 1414)
@@ -38,7 +38,7 @@
{ \
if (err) \
{ \
- fprintf (stderr, "%s:%d: %s: %s\n", \
+ fprintf (stderr, PGM": file %s line %d: <%s> %s\n", \
__FILE__, __LINE__, gpgme_strsource (err), \
gpgme_strerror (err)); \
exit (1); \
More information about the Gnupg-commits
mailing list