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 --- src/context.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/context.h') diff --git a/src/context.h b/src/context.h index 10d297f6..e976ba3f 100644 --- a/src/context.h +++ b/src/context.h @@ -180,6 +180,9 @@ struct gpgme_context /* The optional key origin. */ char *key_origin; + /* The optional import filter. */ + char *import_filter; + /* The operation data hooked into the context. */ ctx_op_data_t op_data; -- cgit v1.2.3