diff options
author | Ingo Klöcker <[email protected]> | 2024-05-21 14:32:23 +0000 |
---|---|---|
committer | Ingo Klöcker <[email protected]> | 2024-05-21 14:38:59 +0000 |
commit | 90eb80134b2d7720b187a6b7fd16f40f23cf1022 (patch) | |
tree | 30b1f0beccb29477c96ea52ae95b01fb62a4feae /lang/cpp/tests/run-keylist.cpp | |
parent | json: Add information about revocation keys to key list result (diff) | |
download | gpgme-90eb80134b2d7720b187a6b7fd16f40f23cf1022.tar.gz gpgme-90eb80134b2d7720b187a6b7fd16f40f23cf1022.zip |
cpp: Add information about revocation keys to Keyikloecker/t7118-revkeys
* 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
Diffstat (limited to 'lang/cpp/tests/run-keylist.cpp')
-rw-r--r-- | lang/cpp/tests/run-keylist.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lang/cpp/tests/run-keylist.cpp b/lang/cpp/tests/run-keylist.cpp index 9e7d763c..b46a815a 100644 --- a/lang/cpp/tests/run-keylist.cpp +++ b/lang/cpp/tests/run-keylist.cpp @@ -160,7 +160,10 @@ main (int argc, char **argv) std::stringstream ss; do { key = ctx->nextKey(err); - ss << key << "\n\n"; + if (!err) + { + ss << key << "\n\n"; + } } while (!err && !key.isNull()); std::cout << ss.str(); |