Commit Graph

10 Commits

Author SHA1 Message Date
Ingo Klöcker
150a2f9e4e
tests: Support offline mode in run-import
* tests/run-import.c (show_usage): New option --offline.
(main): Parse new option. Set offline mode accordingly.
--

This allows testing gpgme_op_import with (and without) offline mode.

GnuPG-bug-id: 6648
2023-08-14 14:04:44 +02:00
Ingo Klöcker
d35d44efaf 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
2021-12-14 15:44:37 +01:00
Ingo Klöcker
60880adafa core: Allow specifiying a key origin when importing keys
* src/context.h (struct gpgme_context): New field key_origin.
* src/engine-backend.h (struct engine_ops): Add arg key_origin to
field 'import'.
* src/engine-gpg.c (gpg_import): Add arg key_origin and pass option
--key-origin with argument value to gpg. Adjust all callers.
* src/engine-gpgsm.c (gpgsm_import): Add dummy arg key_origin.
* src/gpgme.c (gpgme_release): Free 'key_origin'.
(gpgme_set_ctx_flag, gpgme_get_ctx_flag): New flag "key-origin".

* tests/run-import.c (main): Add option --key-origin.
* tests/gpg/t-import.c (main): Set and verify key origin.
--

This makes the --key-origin option available in the GPGME API for
key imports.

GnuPG-bug-id: 5733
2021-12-13 16:52:23 +01:00
Andre Heinecke
4746c5c9e2
tests: Add cms mode to run-import
* tests/run-import.c (show_usage): Add doc for cms / openpgp.
(main): Handle protocol.
2019-05-02 10:26:44 +02:00
Werner Koch
b159b2eddd
tests: Let run-verify print the de-vs flag.
* tests/run-verify.c (print_result): Chack is_de_vs.
* tests/run-import.c (main): Fix bad parameter for format string.

Signed-off-by: Werner Koch <wk@gnupg.org>
2019-02-28 14:01:47 +01:00
Andre Heinecke
ce327f994a
tests: Add diagnostic example to run-import.c
* tests/run-import.c (main): Show diagnostics in verbose mode.
2019-01-15 08:36:26 +01:00
Werner Koch
8d91c0f4cd
Add SPDX identifiers to most source files
--

Signed-off-by: Werner Koch <wk@gnupg.org>
2018-11-16 13:27:33 +01:00
Werner Koch
7f5f26fd66
doc: Replace http: by https: in core source files.
--

Signed-off-by: Werner Koch <wk@gnupg.org>
2016-11-16 13:27:00 +01:00
Werner Koch
139e798c87 Remove all trailing whitespace from source files
--
Command used:  sed -i 's,[ \t]*$,,' FILE
2012-09-25 15:29:49 +02:00
Werner Koch
43427b0c91 Move gpg test programs to the top test directory. 2009-07-07 14:17:39 +00:00