From 3e31f648e513bed0029b09104d416d25fca08868 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ingo=20Kl=C3=B6cker?= Date: Thu, 26 Jan 2023 11:59:50 +0100 Subject: cpp: Support all encryption flags * lang/cpp/src/context.h (WantAddress): New flag. * lang/cpp/src/context.cpp (encryptflags2encryptflags): Convert WantAddress to corresponding gpgme encrypt flags. (operator<<): Add new flag to debug stream. -- GnuPG-bug-id: 6359 --- lang/cpp/src/context.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lang/cpp/src/context.cpp') diff --git a/lang/cpp/src/context.cpp b/lang/cpp/src/context.cpp index d071c91c..120c7c70 100644 --- a/lang/cpp/src/context.cpp +++ b/lang/cpp/src/context.cpp @@ -1341,6 +1341,9 @@ static gpgme_encrypt_flags_t encryptflags2encryptflags(Context::EncryptionFlags if (flags & Context::EncryptWrap) { result |= GPGME_ENCRYPT_WRAP; } + if (flags & Context::WantAddress) { + result |= GPGME_ENCRYPT_WANT_ADDRESS; + } return static_cast(result); } @@ -1917,6 +1920,7 @@ std::ostream &operator<<(std::ostream &os, Context::EncryptionFlags flags) CHECK(Symmetric); CHECK(ThrowKeyIds); CHECK(EncryptWrap); + CHECK(WantAddress); #undef CHECK return os << ')'; } -- cgit v1.2.3