aboutsummaryrefslogtreecommitdiffstats
path: root/lang/cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lang/cpp')
-rw-r--r--lang/cpp/src/context.cpp4
-rw-r--r--lang/cpp/src/context.h3
2 files changed, 6 insertions, 1 deletions
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<gpgme_encrypt_flags_t>(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 << ')';
}
diff --git a/lang/cpp/src/context.h b/lang/cpp/src/context.h
index 7bd1b03d..3c3544d2 100644
--- a/lang/cpp/src/context.h
+++ b/lang/cpp/src/context.h
@@ -447,7 +447,8 @@ public:
NoCompress = 16,
Symmetric = 32,
ThrowKeyIds = 64,
- EncryptWrap = 128
+ EncryptWrap = 128,
+ WantAddress = 256,
};
EncryptionResult encrypt(const std::vector<Key> &recipients, const Data &plainText, Data &cipherText, EncryptionFlags flags);
GpgME::Error encryptSymmetrically(const Data &plainText, Data &cipherText);