diff options
author | Ingo Klöcker <[email protected]> | 2022-04-27 15:21:04 +0000 |
---|---|---|
committer | Ingo Klöcker <[email protected]> | 2022-04-27 15:21:04 +0000 |
commit | dea872f21ff77cd58bafe0966d89d6331c8d2e07 (patch) | |
tree | 9df3abcc503e3027c998cd0ee105a2496396c91c /lang/cpp/tests/run-getkey.cpp | |
parent | core: Support --locate-external-keys command of gpg (diff) | |
download | gpgme-dea872f21ff77cd58bafe0966d89d6331c8d2e07.tar.gz gpgme-dea872f21ff77cd58bafe0966d89d6331c8d2e07.zip |
cpp: Support new keylist modes
* lang/cpp/src/global.h (ForceExtern, LocateExternal, KeyListModeMask):
New.
* lang/cpp/src/context.cpp (operator<<): Add check.
* lang/cpp/src/util.h (gpgme_keylist_mode_t,
convert_from_gpgme_keylist_mode_t): Handle ForceExtern.
* lang/cpp/tests/run-getkey.cpp (show_usage, main): Add arguments
--force-extern and --locate-external.
* lang/cpp/tests/run-keylist.cpp (show_usage, main): Ditto.
--
GnuPG-bug-id: 5951
Diffstat (limited to 'lang/cpp/tests/run-getkey.cpp')
-rw-r--r-- | lang/cpp/tests/run-getkey.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lang/cpp/tests/run-getkey.cpp b/lang/cpp/tests/run-getkey.cpp index 35b15eb2..67ca281c 100644 --- a/lang/cpp/tests/run-getkey.cpp +++ b/lang/cpp/tests/run-getkey.cpp @@ -60,6 +60,8 @@ show_usage (int ex) " --ephemeral use GPGME_KEYLIST_MODE_EPHEMERAL\n" " --validate use GPGME_KEYLIST_MODE_VALIDATE\n" " --locate use GPGME_KEYLIST_MODE_LOCATE\n" + " --force-extern use GPGME_KEYLIST_MODE_FORCE_EXTERN\n" + " --locate-external use GPGME_KEYLIST_MODE_LOCATE_EXTERNAL\n" , stderr); exit (ex); } @@ -116,6 +118,12 @@ main (int argc, char **argv) } else if (!strcmp (*argv, "--locate")) { argc--; argv++; mode |= KeyListMode::Locate; + } else if (!strcmp (*argv, "--force-extern")) { + argc--; argv++; + mode |= KeyListMode::ForceExtern; + } else if (!strcmp (*argv, "--locate-external")) { + argc--; argv++; + mode |= KeyListMode::LocateExternal; } else if (!strncmp (*argv, "--", 2)) { show_usage (1); } |