Home GnuPG
Diffusion GnuPG b4f1159a5bd7

gpgconf: Rewrite the gpgconf-comp module.

Description

gpgconf: Rewrite the gpgconf-comp module.

* tools/gpgconf.h (gc_component_t): Change type to ...
(gc_component_id_t): this.
(GC_COMPONENT_ANY): New, so that we can use that in gpgconf-comp.c
directly.
* tools/gpgconf-comp.c: Major rework.

The primary reason for this rework is to support the global options.
A second reason is to clean up the code and simplify it so that we do
not anymore need to maintain a list of options in the components _and_
in gpgconf-comp.c.

What we do now is to

  1. Read the option tables directly from the components using the new generic --dump-option-table option. This includes the header (group) descriptions.
  2. Read the default values from the components as before using --gpgconf-list and update gpgconf's internal tables with that info.
  3. Read the options using gpgrt_argparser in the same way as we do this in the components.

The changes also do away with the second level notion of backends;
they were only used for dirmngr's extra dirmngr_ldapservers.conf file.
We intend to remove that file and replace it with a regular option so
that it will be similar on how OpenPGP keyservers are specified.

The whole thing will currently be slower than before (in particular on
Windows) but we can optimize that by keeping a cached version of the
option tables and the default values in a per homedir cache file.

There is also some work planned to remove most of the data returned by
--gpgconf-list. What can also be done is to replace the internal
tables, which list the gpgconf maintainable options, by a configuration
file so that admins are able to maintain the list of these options.

  • GnuPG-bug-id: T4788
  • Signed-off-by: Werner Koch <wk@gnupg.org>

Details

Provenance
wernerAuthored on Mar 12 2020, 10:16 AM
Parents
rG4c43fabbb012: dirmngr: Re-group the options in the --help output.
Branches
Unknown
Tags
Unknown
Tasks
T4788: System wide configuration of the GnuPG system