aboutsummaryrefslogtreecommitdiffstats
path: root/lang/cpp/src
diff options
context:
space:
mode:
authorIngo Klöcker <[email protected]>2023-01-26 10:52:28 +0000
committerIngo Klöcker <[email protected]>2023-01-26 11:01:10 +0000
commit70aaf05a6a3eafd1ba96df71d03334337b1d071d (patch)
tree2d25d98070f9bcd6318a629494662c2d5afe790a /lang/cpp/src
parentqt: Fix comparisons of integer expressions of different signedness (diff)
downloadgpgme-70aaf05a6a3eafd1ba96df71d03334337b1d071d.tar.gz
gpgme-70aaf05a6a3eafd1ba96df71d03334337b1d071d.zip
cpp: Pass ThrowKeyIds and EncryptWrap flags to GpgME
* lang/cpp/src/context.cpp (encryptflags2encryptflags): Convert ThrowKeyIds and EncryptWrap to corresponding gpgme encrypt flags. (operator<<): Add flags to debug stream. -- GnuPG-bug-id: 6359
Diffstat (limited to 'lang/cpp/src')
-rw-r--r--lang/cpp/src/context.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/lang/cpp/src/context.cpp b/lang/cpp/src/context.cpp
index dba958cf..d071c91c 100644
--- a/lang/cpp/src/context.cpp
+++ b/lang/cpp/src/context.cpp
@@ -1335,6 +1335,12 @@ static gpgme_encrypt_flags_t encryptflags2encryptflags(Context::EncryptionFlags
if (flags & Context::Symmetric) {
result |= GPGME_ENCRYPT_SYMMETRIC;
}
+ if (flags & Context::ThrowKeyIds) {
+ result |= GPGME_ENCRYPT_THROW_KEYIDS;
+ }
+ if (flags & Context::EncryptWrap) {
+ result |= GPGME_ENCRYPT_WRAP;
+ }
return static_cast<gpgme_encrypt_flags_t>(result);
}
@@ -1909,6 +1915,8 @@ std::ostream &operator<<(std::ostream &os, Context::EncryptionFlags flags)
CHECK(ExpectSign);
CHECK(NoCompress);
CHECK(Symmetric);
+ CHECK(ThrowKeyIds);
+ CHECK(EncryptWrap);
#undef CHECK
return os << ')';
}