Commit Graph

12 Commits

Author SHA1 Message Date
Ingo Klöcker
90eb80134b
cpp: Add information about revocation keys to Key
* lang/cpp/src/gpgmefw.h (gpgme_revocation_key_t): New forward
declaration.
* lang/cpp/src/key.cpp, lang/cpp/src/key.h (class Key): New methods
revocationKey, numRevocationKeys, revocationKeys.
(class RevocationKey): New.
(swap): New overload for RevocationKey.
(operator<<): New overload for RevocationKey.
* lang/cpp/src/key.cpp (operator<<): Add information about revocation
keys to the output stream for Key.

* lang/cpp/tests/run-keylist.cpp (main): Don't output Key if nextKey
failed, e.g. at the end of the key listing.
--

GnuPG-bug-id: 7118
2024-05-21 16:38:59 +02:00
Ingo Klöcker
85c7a94d63
cpp,tests: Launch dirmngr with gpg-conf
* lang/cpp/tests/run-wkdlookup.cpp (main): Replace backslashes with
forward slashes in homedir returned by GpgME::dirInfo. Use "gpgconf
--launch dirmngr" to start dirmngr.
--

With this change the same code as by QGpgMEWKDLookupJob is again used to
launch dirmngr. It also fixes the bad example of starting dirmngr
without the help of gpgconf.

GnuPG-bug-id: 6833
2024-01-09 11:22:43 +01:00
Ingo Klöcker
bd448c9cbf
cpp,doc: Fix typos in API documentation and source code comments
--

Anonymous contribution

Signed-off-by: Ingo Klöcker <dev@ingo-kloecker.de>
2023-10-13 09:21:47 +02:00
Ingo Klöcker
7a2a3f317b
cpp: Remove unused include
--
2023-08-15 11:50:28 +02:00
Ingo Klöcker
e029fd2735 cpp,tests: Actually parse the --with-secret option
* lang/cpp/tests/run-keylist.cpp (main): Handle --with-secret option.
Print error for unknown option.
--

The --with-secret option was already listed in the help. Now it also
works.

GnuPG-bug-id: 5965
2022-05-05 17:24:59 +02:00
Ingo Klöcker
359906c8bc cpp,tests: Verify that requested keylist mode is used
* lang/cpp/tests/run-getkey.cpp, lang/cpp/tests/run-keylist.cpp (main):
Check used keylist mode.
--

Since Context::setKeyListMode() does not return the error returned by
gpgme, we need to verify explicitly that the keylist mode was set
successfully.

GnuPG-bug-id: 5951
2022-04-28 10:33:23 +02:00
Ingo Klöcker
dea872f21f 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
2022-04-27 17:21:04 +02:00
Ingo Klöcker
f3177d3ee0 cpp,tests: Add test runner for doing a WKD lookup without import
* lang/cpp/tests/Makefile.am (run_wkdlookup_SOURCES, programs_unix):
New.
(noinst_PROGRAMS): Add $(programs_unix).
* lang/cpp/tests/run-wkdlookup.cpp: New.
--

This test runner is a prototype for doing a WKD lookup without implicit
import of the found key(s).

Building this test runner is disabled on Windows because it may not
work there. Feel free to enable it on Windows if the test runner works
there.

GnuPG-bug-id: 5728
2021-12-10 12:51:36 +01:00
NIIBE Yutaka
66bcb8acb2 build: With LD_LIBRARY_PATH defined, use --disable-new-dtags.
* configure.ac (LDADD_FOR_TESTS_KLUDGE): New for --disable-new-dtags.
* tests/Makefile.am (LDADD): Use LDADD_FOR_TESTS_KLUDGE.
* lang/cpp/tests/Makefile.am, lang/qt/tests/Makefile.am: Likewise.
* tests/gpg/Makefile.am, tests/gpgsm/Makefile.am: Likewise.
* tests/json/Makefile.am, tests/opassuan/Makefile.am: Likewise.

--

GnuPG-bug-id: 4298
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
2019-01-16 10:59:25 +09:00
Andre Heinecke
62c736ba76
cpp,tests: Add another test runner
* lang/cpp/tests/run-verify.cpp: New.
* lang/cpp/tests/Makefile.am: Update accordingly.

--
Add another test runner which helps to find problems on windows.
2018-10-29 15:36:45 +01:00
Daniel Kahn Gillmor
2f12427e41 doc: use https:// for www.gnu.org
--

Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
2018-10-18 00:28:51 -04:00
Andre Heinecke
9f85f4967e
cpp: Add first manual tests
* lang/cpp/Makefile.am: Add tests subdir.
* lang/cpp/tests/Makefile.am: New.
* lang/cpp/tests/README,
lang/cpp/tests/run-getkey.cpp,
lang/cpp/tests/run-keylist.cpp: New.
* configure.ac: Configure tests makefile.

--
The autotests for c++ live in lang/qt/tests these
tests are more for manual experiments to validate some
functionality.
2018-10-09 11:24:18 +02:00