From d35d44efaf72f90ee4f92af8382c4bcb9982da3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ingo=20Kl=C3=B6cker?= Date: Tue, 14 Dec 2021 15:44:37 +0100 Subject: core: Allow setting import filters when importing keys * src/context.h (struct gpgme_context): New field import_filter. * src/engine-backend.h (struct engine_ops): Add arg import_filter to field 'import'. * src/engine-gpg.c (gpg_import): Add arg import_filter and pass option --import-filter with argument value to gpg. Adjust all callers. * src/engine-gpgsm.c (gpgsm_import): Add dummy arg import_filter. * src/gpgme.c (gpgme_release): Free 'import_filter'. (gpgme_set_ctx_flag, gpgme_get_ctx_flag): New flag "import-filter". * tests/run-import.c (main): Add option --import-filter. -- This makes the --import-filter option available in the GPGME API for key imports. GnuPG-bug-id: 5739 --- doc/gpgme.texi | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'doc') diff --git a/doc/gpgme.texi b/doc/gpgme.texi index c37141a0..cc8ff5e5 100644 --- a/doc/gpgme.texi +++ b/doc/gpgme.texi @@ -3207,6 +3207,12 @@ The string given in @var{value} is passed to the GnuPG engine to set the origin of imported keys. Valid values are documented in the GnuPG manual and the gpg man page under the option @option{--key-origin}. +@item "import-filter" +@since{1.16.1} +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}. + @end table This function returns @code{0} on success. -- cgit v1.2.3