aboutsummaryrefslogtreecommitdiffstats
path: root/tools/gpgconf.h
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2016-12-16 15:00:15 +0000
committerWerner Koch <[email protected]>2016-12-16 15:05:02 +0000
commit76cd64a5baf6057b199c01f7999b327f1f4a87bc (patch)
tree9975cc64b46a26afe4a69ed9c9dcc5a3ded771d9 /tools/gpgconf.h
parentgpgconf: Fix --apply-defaults. (diff)
downloadgnupg-76cd64a5baf6057b199c01f7999b327f1f4a87bc.tar.gz
gnupg-76cd64a5baf6057b199c01f7999b327f1f4a87bc.zip
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 <[email protected]>
Diffstat (limited to 'tools/gpgconf.h')
-rw-r--r--tools/gpgconf.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/gpgconf.h b/tools/gpgconf.h
index e99042fe1..39d34b6d0 100644
--- a/tools/gpgconf.h
+++ b/tools/gpgconf.h
@@ -72,7 +72,8 @@ void gc_component_retrieve_options (int component);
void gc_component_list_options (int component, estream_t out);
/* Read the modifications from IN and apply them. */
-void gc_component_change_options (int component, estream_t in, estream_t out);
+void gc_component_change_options (int component, estream_t in, estream_t out,
+ int verbatim);
/* Check the options of a single component. Returns 0 if everything
is OK. */
@@ -83,5 +84,8 @@ int gc_component_check_options (int component, estream_t out,
int gc_process_gpgconf_conf (const char *fname, int update, int defaults,
estream_t listfp);
+/* Apply a profile. */
+gpg_error_t gc_apply_profile (const char *fname);
+
#endif /*GPGCONF_H*/