gpgconf: New command --apply-profile.
authorWerner Koch <wk@gnupg.org>
Fri, 16 Dec 2016 15:00:15 +0000 (16:00 +0100)
committerWerner Koch <wk@gnupg.org>
Fri, 16 Dec 2016 15:05:02 +0000 (16:05 +0100)
commit76cd64a5baf6057b199c01f7999b327f1f4a87bc
tree9975cc64b46a26afe4a69ed9c9dcc5a3ded771d9
parent6ca3c28da46873416822bf6ab7893db6c56a49d6
gpgconf: New command --apply-profile.

* tools/gpgconf.c (aApplyProfile): New.
(opts): New command --apply-profile.
(main): Implement that command.
* tools/gpgconf-comp.c (option_check_validity): Add arg VERBATIM.
(change_options_program): Ditto.
(change_one_value): Ditto.
(gc_component_change_options): Ditto.
(gc_apply_profile): New.

--

Here is an example for a profile

--8<---------------cut here---------------start------------->8---
# foo.prf - Sample profile

[gpg]
compliance de-vs
default-new-key-algo brainpoolP256r1+brainpoolP256r1

[gpgsm]
enable-crl-checks

[gpg-agent]
default-cache-ttl 900
max-cache-ttl [] 3600
no-allow-mark-trusted
no-allow-external-cache
enforce-passphrase-constraints
min-passphrase-len 9
min-passphrase-nonalpha 0

[dirmngr]
keyserver hkp://keys.gnupg.net
allow-ocsp
--8<---------------cut here---------------end--------------->8---

Note that flags inside of brackets are allowed after the option name.
The only defined flag for now is "[default]".  In case the value
starts with a bracket, it is possible to insert "[]" as a nop-flag.

Signed-off-by: Werner Koch <wk@gnupg.org>
doc/Makefile.am
doc/examples/gpgconf.conf
doc/tools.texi
tools/gpgconf-comp.c
tools/gpgconf.c
tools/gpgconf.h