gpgconf: Make WoT settings configurable by gpgconf.
authorDamien Goutte-Gattat <dgouttegattat@incenp.org>
Mon, 21 Aug 2017 14:48:11 +0000 (16:48 +0200)
committerJustus Winter <justus@g10code.com>
Mon, 21 Aug 2017 14:50:01 +0000 (16:50 +0200)
* tools/gpgconf-comp.c (gc_options_gpg): Add max-cert-depth,
completes-needed, and marginals-needed options.
* g10/gpg.c (gpgconf_list): Likewise.
--

Some tests to come for the PGP trust model will need to manipulate
these parameters.

Signed-off-by: Damien Goutte-Gattat <dgouttegattat@incenp.org>
g10/gpg.c
tools/gpgconf-comp.c

index c9fa7ae..31b1fca 100644 (file)
--- a/g10/gpg.c
+++ b/g10/gpg.c
@@ -1860,6 +1860,9 @@ gpgconf_list (const char *configfile)
   es_printf ("default-new-key-algo:%lu:\n", GC_OPT_FLAG_NONE);
   es_printf ("trust-model:%lu:\n", GC_OPT_FLAG_NONE);
   es_printf ("disable-dirmngr:%lu:\n", GC_OPT_FLAG_NONE);
+  es_printf ("max-cert-depth:%lu:\n", GC_OPT_FLAG_NONE);
+  es_printf ("completes-needed:%lu:\n", GC_OPT_FLAG_NONE);
+  es_printf ("marginals-needed:%lu:\n", GC_OPT_FLAG_NONE);
 
   /* The next one is an info only item and should match the macros at
      the top of keygen.c  */
index b066dad..e9d4ca8 100644 (file)
@@ -762,6 +762,18 @@ static gc_option_t gc_options_gpg[] =
    { "disable-dirmngr", GC_OPT_FLAG_NONE, GC_LEVEL_EXPERT,
      "gnupg", N_("disable all access to the dirmngr"),
      GC_ARG_TYPE_NONE, GC_BACKEND_GPG },
+   { "max-cert-depth",
+     GC_OPT_FLAG_NONE, GC_LEVEL_INVISIBLE,
+     NULL, NULL,
+     GC_ARG_TYPE_UINT32, GC_BACKEND_GPG },
+   { "completes-needed",
+     GC_OPT_FLAG_NONE, GC_LEVEL_INVISIBLE,
+     NULL, NULL,
+     GC_ARG_TYPE_UINT32, GC_BACKEND_GPG },
+   { "marginals-needed",
+     GC_OPT_FLAG_NONE, GC_LEVEL_INVISIBLE,
+     NULL, NULL,
+     GC_ARG_TYPE_UINT32, GC_BACKEND_GPG },
 
 
    GC_OPTION_NULL