[git] GPGME - branch, master, updated. gpgme-1.8.0-120-g18b7906

by Andre Heinecke cvs at cvs.gnupg.org
Fri Mar 24 17:25:04 CET 2017


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  18b7906078cf08962c54c1e711cf2d91a24fd4e5 (commit)
      from  5493164f8665fabf795f3b34a7084770a38ae940 (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 18b7906078cf08962c54c1e711cf2d91a24fd4e5
Author: Andre Heinecke <aheinecke at intevation.de>
Date:   Fri Mar 24 17:24:04 2017 +0100

    cpp: Respect decrypt flags in new functions
    
    * lang/cpp/src/context.cpp: Respect directly provided flags
    in the new decrypt functions.
    
    --
    Overlooked in the initial commit. Also fixed the according
    unused variable warnings.

diff --git a/lang/cpp/src/context.cpp b/lang/cpp/src/context.cpp
index c20e5a9..77962d8 100644
--- a/lang/cpp/src/context.cpp
+++ b/lang/cpp/src/context.cpp
@@ -915,7 +915,7 @@ DecryptionResult Context::decrypt(const Data &cipherText, Data &plainText, const
     d->lastop = Private::Decrypt;
     const Data::Private *const cdp = cipherText.impl();
     Data::Private *const pdp = plainText.impl();
-    d->lasterr = gpgme_op_decrypt_ext(d->ctx, static_cast<gpgme_decrypt_flags_t> (d->decryptFlags), cdp ? cdp->data : 0, pdp ? pdp->data : 0);
+    d->lasterr = gpgme_op_decrypt_ext(d->ctx, static_cast<gpgme_decrypt_flags_t> (d->decryptFlags | flags), cdp ? cdp->data : 0, pdp ? pdp->data : 0);
     return DecryptionResult(d->ctx, Error(d->lasterr));
 }
 
@@ -929,7 +929,7 @@ Error Context::startDecryption(const Data &cipherText, Data &plainText, const De
     d->lastop = Private::Decrypt;
     const Data::Private *const cdp = cipherText.impl();
     Data::Private *const pdp = plainText.impl();
-    return Error(d->lasterr = gpgme_op_decrypt_ext_start(d->ctx, static_cast<gpgme_decrypt_flags_t> (d->decryptFlags),
+    return Error(d->lasterr = gpgme_op_decrypt_ext_start(d->ctx, static_cast<gpgme_decrypt_flags_t> (d->decryptFlags | flags),
                  cdp ? cdp->data : 0, pdp ? pdp->data : 0));
 }
 
@@ -995,7 +995,7 @@ std::pair<DecryptionResult, VerificationResult> Context::decryptAndVerify(const
     d->lastop = Private::DecryptAndVerify;
     const Data::Private *const cdp = cipherText.impl();
     Data::Private *const pdp = plainText.impl();
-    d->lasterr = gpgme_op_decrypt_ext(d->ctx, static_cast<gpgme_decrypt_flags_t> (d->decryptFlags | DecryptVerify),
+    d->lasterr = gpgme_op_decrypt_ext(d->ctx, static_cast<gpgme_decrypt_flags_t> (d->decryptFlags | flags | DecryptVerify),
                                       cdp ? cdp->data : 0, pdp ? pdp->data : 0);
     return std::make_pair(DecryptionResult(d->ctx, Error(d->lasterr)),
                           VerificationResult(d->ctx, Error(d->lasterr)));
@@ -1011,7 +1011,7 @@ Error Context::startCombinedDecryptionAndVerification(const Data &cipherText, Da
     d->lastop = Private::DecryptAndVerify;
     const Data::Private *const cdp = cipherText.impl();
     Data::Private *const pdp = plainText.impl();
-    return Error(d->lasterr = gpgme_op_decrypt_ext_start(d->ctx, static_cast<gpgme_decrypt_flags_t> (d->decryptFlags | DecryptVerify), cdp ? cdp->data : 0, pdp ? pdp->data : 0));
+    return Error(d->lasterr = gpgme_op_decrypt_ext_start(d->ctx, static_cast<gpgme_decrypt_flags_t> (d->decryptFlags | flags | DecryptVerify), cdp ? cdp->data : 0, pdp ? pdp->data : 0));
 }
 
 Error Context::startCombinedDecryptionAndVerification(const Data &cipherText, Data &plainText)

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

Summary of changes:
 lang/cpp/src/context.cpp | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)


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




More information about the Gnupg-commits mailing list