cpp: Add WithTofu Keylist Mode

* lang/cpp/src/context.cpp: Handle WithTofu.
* lang/cpp/src/global.h (KeyListMode): Add WithTofu.
* lang/cpp/src/util.h (add_to_gpgme_keylist_mode_t): Handle WithTofu.
This commit is contained in:
Andre Heinecke 2016-08-25 16:17:46 +02:00
parent 053e6e0a7b
commit f311b92cea
3 changed files with 6 additions and 1 deletions

View File

@ -1420,6 +1420,7 @@ std::ostream &operator<<(std::ostream &os, KeyListMode mode)
CHECK(Signatures); CHECK(Signatures);
CHECK(Validate); CHECK(Validate);
CHECK(Ephemeral); CHECK(Ephemeral);
CHECK(WithTofu);
#undef CHECK #undef CHECK
return os << ')'; return os << ')';
} }

View File

@ -61,7 +61,8 @@ enum KeyListMode {
Signatures = 0x4, Signatures = 0x4,
SignatureNotations = 0x8, SignatureNotations = 0x8,
Validate = 0x10, Validate = 0x10,
Ephemeral = 0x20 Ephemeral = 0x20,
WithTofu = 0x40
}; };
enum SignatureMode { NormalSignatureMode, Detached, Clearsigned }; enum SignatureMode { NormalSignatureMode, Detached, Clearsigned };

View File

@ -76,6 +76,9 @@ static inline gpgme_keylist_mode_t add_to_gpgme_keylist_mode_t(unsigned int oldm
if (newmodes & GpgME::Validate) { if (newmodes & GpgME::Validate) {
oldmode |= GPGME_KEYLIST_MODE_VALIDATE; oldmode |= GPGME_KEYLIST_MODE_VALIDATE;
} }
if (newmodes & GpgME::WithTofu) {
oldmode |= GPGME_KEYLIST_MODE_WITH_TOFU;
}
#ifndef NDEBUG #ifndef NDEBUG
if (newmodes & ~(GpgME::Local | GpgME::Extern | GpgME::Signatures | GpgME::SignatureNotations | GpgME::Ephemeral | GpgME::Validate)) { if (newmodes & ~(GpgME::Local | GpgME::Extern | GpgME::Signatures | GpgME::SignatureNotations | GpgME::Ephemeral | GpgME::Validate)) {
//std::cerr << "GpgME::Context: keylist mode must be one of Local, " //std::cerr << "GpgME::Context: keylist mode must be one of Local, "