From 3b9815bd8ad723445128ae99883be0072ae389a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ingo=20Kl=C3=B6cker?= Date: Wed, 12 Jun 2024 10:45:11 +0200 Subject: core: Allow setting import options when importing keys * src/context.h (struct gpgme_context): New field import_options. * src/engine-backend.h (struct engine_ops): Add arg import_options to field 'import'. * src/engine-gpg.c (gpg_import): Add arg import_options and pass option --import-options with argument value to gpg. * src/engine-gpgsm.c (gpgsm_import): Add dummy arg import_options. * src/engine.c (_gpgme_engine_op_import): Add arg import_options and pass option to import function of engine. * src/engine.h (_gpgme_engine_op_import): Add arg import_options. * src/gpgme.c (gpgme_release): Free 'import_options'. (gpgme_set_ctx_flag, gpgme_get_ctx_flag): New flag "import-options". * src/import.c (_gpgme_op_import_start, _gpgme_op_import_keys_start, _gpgme_op_receive_keys_start): Pass import options stored in context to _gpgme_engine_op_import. * tests/run-import.c (show_usage, main): Add option --import-options. -- This makes the --import-options option available in the GPGME API for key imports. GnuPG-bug-id: 7152 --- doc/gpgme.texi | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'doc') diff --git a/doc/gpgme.texi b/doc/gpgme.texi index 45dc9e9b..b2bf6f8c 100644 --- a/doc/gpgme.texi +++ b/doc/gpgme.texi @@ -3279,6 +3279,12 @@ The string given in @var{value} is passed to the GnuPG engine to use as filter when importing keys. Valid values are documented in the GnuPG manual and the gpg man page under the option @option{--import-filter}. +@item "import-options" +@since{1.24.0} +The string given in @var{value} is passed to the GnuPG engine to use as +options when importing keys. Valid values are documented in the GnuPG +manual and the gpg man page under the option @option{--import-options}. + @item "no-auto-check-trustdb" @since{1.19.0} Setting the @var{value} to "1" forces the GPG backend to disable the -- cgit v1.2.3