diff options
| -rw-r--r-- | NEWS | 9 | ||||
| -rw-r--r-- | lang/cpp/src/context.cpp | 10 | ||||
| -rw-r--r-- | lang/cpp/src/context.h | 4 | 
3 files changed, 20 insertions, 3 deletions
@@ -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 135e4d56..8fde84a5 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 aff8e49a..8cccff5c 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.  | 
