[git] GPGME - branch, master, updated. gpgme-1.11.1-45-g00b027a

by Andre Heinecke cvs at cvs.gnupg.org
Fri Jun 1 11:11:10 CEST 2018


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GnuPG Made Easy".

The branch, master has been updated
       via  00b027af86f33782933c6200fe1ffe40e85f4346 (commit)
       via  d46768c96082b4fd076506d7d3f0c03e61c59d51 (commit)
      from  662604c5bcb4e03d3c9ecc670d4f320a2418ebb3 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 00b027af86f33782933c6200fe1ffe40e85f4346
Author: Andre Heinecke <aheinecke at intevation.de>
Date:   Fri Jun 1 11:08:12 2018 +0200

    cpp: Add gpgme_(get)set_ctx_flag
    
    * NEWS: Mention API extensions.
    * lang/cpp/src/context.cpp, lang/cpp/src/context.h
    (Context::setFlag, Context::getFlag): New.

diff --git a/NEWS b/NEWS
index 4eb3dbe..e70b9a9 100644
--- a/NEWS
+++ b/NEWS
@@ -8,9 +8,12 @@ Noteworthy changes in version 1.11.2 (unreleased)
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  gpgme_decrypt_result_t           EXTENDED: New field legacy_cipher_nomdc.
  gpgme_set_ctx_flag               EXTENDED: New flag 'ignore-mdc-error'.
- cpp: DecryptionResult::sessionKey     NEW.
- cpp: DecryptionResult::symkeyAlgo     NEW.
- cpp: Data::rewind                     NEW.
+ cpp: DecryptionResult::sessionKey          NEW.
+ cpp: DecryptionResult::symkeyAlgo          NEW.
+ cpp: DecryptionResult::isLegacyCipherNoMDC New.
+ cpp: Data::rewind                          NEW.
+ cpp: Context::setFlag                      NEW.
+ cpp: Context::getFlag                      NEW.
 
 
 Noteworthy changes in version 1.11.1 (2018-04-20)
diff --git a/lang/cpp/src/context.cpp b/lang/cpp/src/context.cpp
index 135e4d5..8fde84a 100644
--- a/lang/cpp/src/context.cpp
+++ b/lang/cpp/src/context.cpp
@@ -1478,6 +1478,16 @@ Error Context::startCreateSubkey(const Key &k, const char *algo,
                  k.impl(), algo, reserved, expires, flags));
 }
 
+Error Context::setFlag(const char *name, const char *value)
+{
+  return Error(d->lasterr = gpgme_set_ctx_flag(d->ctx, name, value));
+}
+
+const char *Context::getFlag(const char *name) const
+{
+  return gpgme_get_ctx_flag(d->ctx, name);
+}
+
 // Engine Spawn stuff
 Error Context::spawn(const char *file, const char *argv[],
                      Data &input, Data &output, Data &err,
diff --git a/lang/cpp/src/context.h b/lang/cpp/src/context.h
index aff8e49..8cccff5 100644
--- a/lang/cpp/src/context.h
+++ b/lang/cpp/src/context.h
@@ -86,6 +86,9 @@ public:
     void setOffline(bool useOfflineMode);
     bool offline() const;
 
+    const char *getFlag(const char *name) const;
+    Error setFlag(const char *name, const char *value);
+
     enum CertificateInclusion {
         DefaultCertificates = -256,
         AllCertificatesExceptRoot = -2,
@@ -453,6 +456,7 @@ public:
     {
         return d;
     }
+
 private:
     // Helper functions that need to be context because they rely
     // on the "Friendlyness" of context to access the gpgme types.

commit d46768c96082b4fd076506d7d3f0c03e61c59d51
Author: Andre Heinecke <aheinecke at intevation.de>
Date:   Fri Jun 1 10:58:24 2018 +0200

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

diff --git a/lang/cpp/src/decryptionresult.cpp b/lang/cpp/src/decryptionresult.cpp
index 17524db..de58921 100644
--- a/lang/cpp/src/decryptionresult.cpp
+++ b/lang/cpp/src/decryptionresult.cpp
@@ -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();
diff --git a/lang/cpp/src/decryptionresult.h b/lang/cpp/src/decryptionresult.h
index c270223..e4d542d 100644
--- a/lang/cpp/src/decryptionresult.h
+++ b/lang/cpp/src/decryptionresult.h
@@ -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);

-----------------------------------------------------------------------

Summary of changes:
 NEWS                              |  9 ++++++---
 lang/cpp/src/context.cpp          | 10 ++++++++++
 lang/cpp/src/context.h            |  4 ++++
 lang/cpp/src/decryptionresult.cpp |  6 ++++++
 lang/cpp/src/decryptionresult.h   |  2 ++
 5 files changed, 28 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
GnuPG Made Easy
http://git.gnupg.org




More information about the Gnupg-commits mailing list