[svn] GnuPG - r4701 - trunk/tools
svn author marcus
cvs at cvs.gnupg.org
Wed Feb 27 18:32:48 CET 2008
Author: marcus
Date: 2008-02-27 18:32:47 +0100 (Wed, 27 Feb 2008)
New Revision: 4701
Modified:
trunk/tools/ChangeLog
trunk/tools/gpgconf-comp.c
Log:
2008-02-27 Marcus Brinkmann <marcus at g10code.de>
* gpgconf-comp.c (option_check_validity): For now, error out on
empty strings.
(enum): Add GC_ARG_TYPE_PUB_KEY and GC_ARG_TYPE_SEC_KEY.
Modified: trunk/tools/ChangeLog
===================================================================
--- trunk/tools/ChangeLog 2008-02-27 17:31:47 UTC (rev 4700)
+++ trunk/tools/ChangeLog 2008-02-27 17:32:47 UTC (rev 4701)
@@ -1,3 +1,9 @@
+2008-02-27 Marcus Brinkmann <marcus at g10code.de>
+
+ * gpgconf-comp.c (option_check_validity): For now, error out on
+ empty strings.
+ (enum): Add GC_ARG_TYPE_PUB_KEY and GC_ARG_TYPE_SEC_KEY.
+
2008-02-01 Marcus Brinkmann <marcus at g10code.de>
* gpgconf-comp.c (gc_component_list_options): Fix memcpy.
Modified: trunk/tools/gpgconf-comp.c
===================================================================
--- trunk/tools/gpgconf-comp.c 2008-02-27 17:31:47 UTC (rev 4700)
+++ trunk/tools/gpgconf-comp.c 2008-02-27 17:32:47 UTC (rev 4701)
@@ -228,6 +228,12 @@
/* A 40 character fingerprint. */
GC_ARG_TYPE_KEY_FPR = 34,
+ /* A user ID or key ID or fingerprint for a certificate. */
+ GC_ARG_TYPE_PUB_KEY = 35,
+
+ /* A user ID or key ID or fingerprint for a certificate with a key. */
+ GC_ARG_TYPE_SEC_KEY = 36,
+
/* ADD NEW COMPLEX TYPE ENTRIES HERE. */
/* The number of the above entries. */
@@ -273,6 +279,8 @@
{ GC_ARG_TYPE_STRING, "pathname" },
{ GC_ARG_TYPE_STRING, "ldap server" },
{ GC_ARG_TYPE_STRING, "key fpr" },
+ { GC_ARG_TYPE_STRING, "pub key" },
+ { GC_ARG_TYPE_STRING, "sec key" },
};
@@ -2059,6 +2067,15 @@
if (*arg != '"')
gc_error (1, 0, "string argument for option %s must begin "
"with a quote (\") character", option->name);
+
+ /* FIXME: We do not allow empty string arguments for now, as
+ we do not quote arguments in configuration files, and
+ thus no argument is indistinguishable from the empty
+ string. */
+ if (arg[1] == '\0' || arg[1] == ',')
+ gc_error (1, 0, "empty string argument for option %s is "
+ "currently not allowed. Please report this!",
+ option->name);
}
else if (gc_arg_type[option->arg_type].fallback == GC_ARG_TYPE_INT32)
{
More information about the Gnupg-commits
mailing list