cpp: Add legacy_cipher_nomdc

* lang/cpp/src/decryptionresult.cpp, lang/cpp/src/decryptionresult.h
(DecryptionResult::isLegacyCipherNoMDC): New.

--
This commit is contained in:
Andre Heinecke 2018-06-01 10:58:24 +02:00
parent 662604c5bc
commit d46768c960
No known key found for this signature in database
GPG Key ID: 2978E9D40CBABA5C
2 changed files with 8 additions and 0 deletions

View File

@ -165,6 +165,11 @@ const char *GpgME::DecryptionResult::symkeyAlgo() const
return d ? d->res.symkey_algo : nullptr; return d ? d->res.symkey_algo : nullptr;
} }
bool GpgME::DecryptionResult::isLegacyCipherNoMDC() const
{
return d && d->res.legacy_cipher_nomdc;
}
class GpgME::DecryptionResult::Recipient::Private : public _gpgme_recipient class GpgME::DecryptionResult::Recipient::Private : public _gpgme_recipient
{ {
public: public:
@ -241,6 +246,7 @@ std::ostream &GpgME::operator<<(std::ostream &os, const DecryptionResult &result
<< "\n unsupportedAlgorithm: " << protect(result.unsupportedAlgorithm()) << "\n unsupportedAlgorithm: " << protect(result.unsupportedAlgorithm())
<< "\n isWrongKeyUsage: " << result.isWrongKeyUsage() << "\n isWrongKeyUsage: " << result.isWrongKeyUsage()
<< "\n isDeVs " << result.isDeVs() << "\n isDeVs " << result.isDeVs()
<< "\n legacyCipherNoMDC " << result.isLegacyCipherNoMDC()
<< "\n symkeyAlgo: " << protect(result.symkeyAlgo()) << "\n symkeyAlgo: " << protect(result.symkeyAlgo())
<< "\n recipients:\n"; << "\n recipients:\n";
const std::vector<DecryptionResult::Recipient> recipients = result.recipients(); const std::vector<DecryptionResult::Recipient> recipients = result.recipients();

View File

@ -87,6 +87,8 @@ public:
Recipient recipient(unsigned int idx) const; Recipient recipient(unsigned int idx) const;
std::vector<Recipient> recipients() const; std::vector<Recipient> recipients() const;
bool isLegacyCipherNoMDC() const;
private: private:
class Private; class Private;
void init(gpgme_ctx_t ctx); void init(gpgme_ctx_t ctx);