cpp: Add legacy_cipher_nomdc
authorAndre Heinecke <aheinecke@intevation.de>
Fri, 1 Jun 2018 08:58:24 +0000 (10:58 +0200)
committerAndre Heinecke <aheinecke@intevation.de>
Fri, 1 Jun 2018 08:58:24 +0000 (10:58 +0200)
* lang/cpp/src/decryptionresult.cpp, lang/cpp/src/decryptionresult.h
(DecryptionResult::isLegacyCipherNoMDC): New.

--

lang/cpp/src/decryptionresult.cpp
lang/cpp/src/decryptionresult.h

index 17524db..de58921 100644 (file)
@@ -165,6 +165,11 @@ const char *GpgME::DecryptionResult::symkeyAlgo() const
   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
 {
 public:
@@ -241,6 +246,7 @@ std::ostream &GpgME::operator<<(std::ostream &os, const DecryptionResult &result
            << "\n unsupportedAlgorithm: " << protect(result.unsupportedAlgorithm())
            << "\n isWrongKeyUsage:      " << result.isWrongKeyUsage()
            << "\n isDeVs                " << result.isDeVs()
+           << "\n legacyCipherNoMDC     " << result.isLegacyCipherNoMDC()
            << "\n symkeyAlgo:           " << protect(result.symkeyAlgo())
            << "\n recipients:\n";
         const std::vector<DecryptionResult::Recipient> recipients = result.recipients();
index c270223..e4d542d 100644 (file)
@@ -87,6 +87,8 @@ public:
     Recipient recipient(unsigned int idx) const;
     std::vector<Recipient> recipients() const;
 
+    bool isLegacyCipherNoMDC() const;
+
 private:
     class Private;
     void init(gpgme_ctx_t ctx);