aboutsummaryrefslogtreecommitdiffstats
path: root/lang/cpp/src/context.cpp (follow)
Commit message (Collapse)AuthorAgeFilesLines
* cpp,qt: Remove C++ and Qt bindingsIngo Klöcker2025-02-031-2138/+0
| | | | | | | | | | | | | | | | | * README: Update. * configure.ac: Remove checks, variables and file generations related to the C++/Qt bindings. Remove cpp and qt* from available_languages and default_languages. * lang/Makefile.am (DIST_SUBDIRS): Remove cpp and qt. * lang/cpp, lang/qt: Remove. * m4/ax_check_compile_flag.m4, m4/ax_cxx_compile_stdcxx.m4, m4/ax_gcc_func_attribute.m4, m4/pkg.m4, m4/qt5.m4, m4/qt6.m4: Remove. -- The C++ and Qt bindings have been moved to separate Git repositories: gpgmepp and gpgmeqt. GnuPG-bug-id: 7262
* cpp: Add support for setting owner trust and for disabling keysIngo Klöcker2024-08-061-0/+45
| | | | | | | | | | * lang/cpp/src/context.cpp, lang/cpp/src/context.h (class Context): Add member functions setOwnerTrust, startSetOwnerTrust, setKeyEnabled, startSetKeyEnabled. * lang/cpp/src/context.cpp (owner_trust_to_string): New. -- GnuPG-bug-id: 7239
* cpp: Deprecate Error::asString and update usersIngo Klöcker2024-07-051-1/+1
| | | | | | | | | | | | | * lang/cpp/src/error.h (Error::asString): Mark as deprecated. * lang/cpp/src/context.cpp (operator<<), lang/cpp/src/editinteractor.cpp (edit_interactor_callback_impl), lang/cpp/tests/run-getkey.cpp (main), lang/cpp/tests/run-keylist.cpp (main), lang/cpp/tests/run-wkdlookup.cpp (main): Use Error::asStdString instead of Error::asString. -- GnuPG-bug-id: 7188
* cpp: Add safer member function returning text describing an errorIngo Klöcker2024-07-051-0/+7
| | | | | | | | | | | | | | | * lang/cpp/src/error.h, lang/cpp/src/context.cpp (class Error): New member function asStdString. -- Unlike asString the new function doesn't cache the value returned by gpgme_strerror_r. This ensures that on Windows the UTF-8 encoded text is returned for the main thread even if the function was called before for another thread. For other threads asStdString will still return the natively encoded error description until UTF-8 encoded error descriptions can be enabled for all threads (T7185). GnuPG-bug-id: 7188
* cpp: Remove commented out and disabled codeIngo Klöcker2024-06-101-4/+0
| | | | | | * lang/cpp/src/configuration.cpp: Remove disabled, abandoned code. * lang/cpp/src/context.cpp: Remove commented out, obsolete code. --
* qt,cpp: Implement adding ADSKs to existing keysTobias Fella2024-05-221-0/+10
| | | | | | | | * lang/cpp/src/context.cpp: Add functions for adding ADSKs. * lang/cpp/src/context.h: Ditto. * lang/qt/src/qgpgmequickjob.cpp: Add implementation of ADSK job. * lang/qt/src/qgpgmequickjob.h: Ditto. * lang/qt/src/quickjob.h: Add job for adding ADSKs.
* cpp: Support new flags for direct signing/encryption of filesIngo Klöcker2023-12-191-0/+8
| | | | | | | | | | | | | | | * lang/cpp/src/context.h (enum EncryptionFlags): Add constant EncryptFile. * lang/cpp/src/global.h (enum SignatureMode): Add constant SignFile. * lang/cpp/src/context.cpp (sigflags2sigflags): Handle new flag SignFile. (encryptflags2encryptflags): Handle new flag EncryptFile. (operator<<): Add new flags to the corresponding debug streams. * lang/cpp/src/signingresult.cpp (CreatedSignature::mode): Handle new flag SignFile (even if it cannot occur). -- GnuPG-bug-id: 6550
* doc,cpp: Treat GPG_ERR_FULLY_CANCELED as canceledIngo Klöcker2023-06-011-1/+1
| | | | | | | | | | | | | | * doc/gpgme.texi (GPG_ERR_FULLY_CANCELED): New. * lang/cpp/src/context.cpp (Error::isCanceled): Also return true for GPG_ERR_FULLY_CANCELED. -- For internal purposes, GnuPG sometimes uses the error code GPG_ERR_FULLY_CANCELED instead of GPG_ERR_CANCELED. From a user perspective both values mean the same thing and should therefore be treated identically. GnuPG-bug-id: 6510
* cpp: Return successful verification for signed but not encrypted dataIngo Klöcker2023-02-021-7/+15
| | | | | | | | | | | | | | | | | | | | * lang/cpp/src/context.cpp (Context::decrypt): Use decryptionResult(). (Context::verifyDetachedSignature, Context::verifyOpaqueSignature): Use verificationResult(). (Context::verificationResult): Ignore "no data" error for signed but not encrypted data. (Context::decryptAndVerify): Use decryptionResult() and verificationResult(). -- gpgme's decrypt operations set the error to GPG_ERR_NO_DATA if no encrypted data was found. It makes sense to use this error for the encryption result, but it doesn't make sense to use it also for the verfication result if signed data was found. This way using the combined decrypt-verify operations on data that may be encrypted and/or signed doesn't produce confusing results. GnuPG-bug-id: 6342
* cpp: Fix debug output of SignatureModeIngo Klöcker2023-01-311-1/+9
| | | | | | | | | | * lang/cpp/src/context.cpp (operator<<): Treat signature mode as combination of a 2-bit flag and a 1-bit flag. -- This fixes the output for normal signature mode. GnuPG-bug-id: 6342
* Merge branch 'ikloecker/t6342-gpgtar' into masterWerner Koch2023-01-311-14/+22
|\ | | | | | | | | | | | | | | -- Solved conflicts: NEWS lang/cpp/src/context.cpp lang/cpp/src/context.h
| * cpp: Support new archive signing flagIngo Klöcker2023-01-301-14/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lang/cpp/src/global.h (enum SignatureMode): Add constant SignArchive. * lang/cpp/src/context.cpp (sigmode2sigmode): Rename to sigflags2sigflags (sigflags2sigflags): ... and rename argument mode to flags and treat it as flags. Adjust the callers. (operator<<): Change local CHECK macro to handle flags. Add new flag to debug stream. * lang/cpp/src/signingresult.cpp (CreatedSignature::mode): Handle new flags (even if it cannot occur currently). -- GnuPG-bug-id: 6342
| * cpp: Support new archive encryption flagIngo Klöcker2023-01-271-0/+4
| | | | | | | | | | | | | | | | | | | | * lang/cpp/src/context.h (EncryptArchive): New flag. * lang/cpp/src/context.cpp (encryptflags2encryptflags): Convert EncryptArchive to corresponding gpgme encrypt flags. (operator<<): Add new flag to debug stream. -- GnuPG-bug-id: 6342
* | cpp: Support all encryption flagsIngo Klöcker2023-01-261-0/+4
| | | | | | | | | | | | | | | | | | | | * lang/cpp/src/context.h (WantAddress): New flag. * lang/cpp/src/context.cpp (encryptflags2encryptflags): Convert WantAddress to corresponding gpgme encrypt flags. (operator<<): Add new flag to debug stream. -- GnuPG-bug-id: 6359
* | cpp: Pass ThrowKeyIds and EncryptWrap flags to GpgMEIngo Klöcker2023-01-261-0/+8
|/ | | | | | | | | * lang/cpp/src/context.cpp (encryptflags2encryptflags): Convert ThrowKeyIds and EncryptWrap to corresponding gpgme encrypt flags. (operator<<): Add flags to debug stream. -- GnuPG-bug-id: 6359
* cpp: Add support for gpgme_op_set_uid_flagIngo Klöcker2022-08-091-0/+10
| | | | | | | | * lang/cpp/src/context.cpp, lang/cpp/src/context.h (Context::setPrimaryUid, Context::startSetPrimaryUid): New. -- GnuPG-bug-id: 5938
* cpp: Allow retrieving import result of key listing with locate modeIngo Klöcker2022-05-041-3/+9
| | | | | | | | | | | | | * lang/cpp/src/context_p.h (enum Context::Private::Operation): Add value KeyListWithImport. * lang/cpp/src/context.cpp (Context::startKeyListing, Context::nextKey): Set lastop to KeyListWithImport if keylist mode includes Locate. -- Adding Import to lastop for keylist operations that perform a locate allows retrieving the import result with Context::importResult. GnuPG-bug-id: 5951
* cpp: Add RAII class for saving/restoring the key list modeIngo Klöcker2022-05-021-0/+13
| | | | | | | | | | | | * lang/cpp/src/context.h, lang/cpp/src/context.cpp (class Context): Add nested class KeyListModeSaver. -- This RAII-style class can be used to save the currently used key list mode in case it needs to be changed temporarily. On destruction, it will restore the key list mode that was active at construction time. GnuPG-bug-id: 5951
* cpp: Support new keylist modesIngo Klöcker2022-04-271-0/+1
| | | | | | | | | | | | | | * lang/cpp/src/global.h (ForceExtern, LocateExternal, KeyListModeMask): New. * lang/cpp/src/context.cpp (operator<<): Add check. * lang/cpp/src/util.h (gpgme_keylist_mode_t, convert_from_gpgme_keylist_mode_t): Handle ForceExtern. * lang/cpp/tests/run-getkey.cpp (show_usage, main): Add arguments --force-extern and --locate-external. * lang/cpp/tests/run-keylist.cpp (show_usage, main): Ditto. -- GnuPG-bug-id: 5951
* cpp: Put local helper function into unnamed namespaceIngo Klöcker2022-03-281-0/+2
| | | | | | | lang/cpp/src/context.cpp (to_auditlog_flags): Wrap in unnamed namespace. -- GnuPG-bug-id: 5906
* cpp: Allow import of keys given by key idsIngo Klöcker2022-02-031-0/+17
| | | | | | | | | * lang/cpp/src/context.h (class Context): Add overloads of member functions importKeys and startKeyImport * lang/cpp/src/context.cpp (class Context): ... and implement them. -- GnuPG-bug-id: 5808
* cpp: Allow export of secret subkeysIngo Klöcker2022-01-041-4/+24
| | | | | | | | | | | | | | | * lang/cpp/src/context.h (enum Context::ExportMode): Add value ExportSecretSubkey. (class Context): Add member functions exportSecretSubkeys and startSecretSubkeyExport. * lang/cpp/src/context.cpp (Context::exportPublicKeys, Context::startPublicKeyExport): Return error if ExportSecretSubkey mode flag is set. (Context::exportSecretSubkeys, Context::startSecretSubkeyExport): Implement. -- GnuPG-bug-id: 5757
* cpp: Allow export of secret keysIngo Klöcker2022-01-041-9/+72
| | | | | | | | | | | | | | | | | | | | * lang/cpp/src/context.h (class Context): New member functions exportSecretKeys, startSecretKeyExport, exportKeys, startKeyExport. (Context::exportPublicKeys, Context::startPublicKeyExport): Rename argument flags/export_mode to mode. * lang/cpp/src/context.cpp (Context::exportPublicKeys): Return error if ExportSecret mode flag is set. Call exportKeys(). (Context::startPublicKeyExport): Return error if ExportSecret mode flag is set. Call startKeyExport(). (Context::exportSecretKeys, Context::startSecretKeyExport, Context::exportKeys, Context::startKeyExport): Implement. -- This adds export functions for secret key exports and generic export functions that can be used for any key export supported by gpgme_op_export[_ext][_start]. GnuPG-bug-id: 5757
* cpp: Remove obsolete workaroundIngo Klöcker2022-01-041-18/+0
| | | | | | | | | | | | | * lang/cpp/src/context.cpp (Context::startKeyListing, Context::exportPublicKeys, Context::startPublicKeyExport): Remove workaround. -- gpgme_op_keylist_ext[_start] supports GPGME_KEYLIST_MODE_EXTERN since a long time. And the export doesn't use a keylisting (anymore), so that the keylisting mode is irrelevant for the export. GnuPG-bug-id: 5757
* cpp: Return engine info for engine used by the contextIngo Klöcker2021-12-071-1/+1
| | | | | | | | | | | | | | lang/cpp/src/context.cpp (Context::engineInfo()): Return engine info for protocol of context. -- This change also fixes Context::setEngineFileName() and Context::setEngineHomeDirectory() which overwrote home dir resp. file name of the engine info for the protocol of context with the corresponding value of the "first" engine info (i.e. engine info for gpg) instead of keeping the current home dir resp. file name. GnuPG-bug-id: 5722
* cpp: Factor out common code of GpgME::engineInfo() overloadsIngo Klöcker2021-12-071-28/+26
| | | | | | | | | | * lang/cpp/src/context.cpp (get_engine_info, get_static_engine_info): New. (GpgME::engineInfo(GpgME::Protocol), GpgME::engineInfo(GpgME::Engine)): Use get_static_engine_info(). -- GnuPG-bug-id: 5722
* cpp: Add support for gpgme_op_revsigIngo Klöcker2020-10-291-12/+52
| | | | | | | | | | | | * lang/cpp/src/context.cpp, lang/cpp/src/context.h (Context::revokeSignature, Context::startRevokeSignature): New. * lang/cpp/src/context.cpp (getLFSeparatedListOfStrings, getLFSeparatedListOfUserIds): New. (getLFSeparatedListOfFingerprintsFromSubkeys): Extracted second part of function to getLFSeparatedListOfStrings. -- GnuPG-bug-id: 5094
* cpp: Add support for gpgme_cancelIngo Klöcker2020-10-231-0/+5
| | | | | | | | | | | | | * lang/cpp/src/context.cpp, lang/cpp/context.h (Context::cancelPendingOperationImmediately): New. * NEWS: Mention added API -- This allows immediate canceling of running operations, e.g. when a thread with a long running operation (like SCD DEVINFO --watch) is going to be terminated (on application shutdown). GnuPG-bug-id: 5066
* cpp: Add keylist mode WithSecretIngo Klöcker2020-09-071-0/+1
| | | | | | | | | | * lang/cpp/src/global.h (WithSecret): New. * lang/cpp/src/context.cpp (operator<<): Handle WithSecret. * lang/cpp/src/util.h (add_to_gpgme_keylist_mode_t, convert_from_gpgme_keylist_mode_t): Ditto. -- GnuPG-bug-id: 4794
* cpp: Make private helper a file staticIngo Klöcker2020-08-101-1/+1
| | | | | | | | | * lang/cpp/src/context.h, lang/cpp/src/context.cpp (Context::getLFSeparatedListOfFingerprintsFromSubkeys): Remove from Context; make it a static function instead -- GnuPG-bug-id: 5003
* cpp: Add support for gpgme_op_setexpireIngo Klöcker2020-08-041-0/+57
| | | | | | | | | | | | | | | | * lang/cpp/src/context.cpp (Context::setExpire, Context::startSetExpire): New. (Context::getLFSeparatedListOfFingerprintsFromSubkeys): New helper. * lang/cpp/src/context.h (Context::SetExpireFlags): New enum. (Context::setExpire, Context::startSetExpire): Add prototypes. (Context::getLFSeparatedListOfFingerprintsFromSubkeys): Add as private helper. -- GnuPG-bug-id: 5003
* qt, cpp: Support export modesAndre Heinecke2020-07-161-10/+32
| | | | | | | | | | | | | * lang/cpp/context.cpp, lang/cpp/context.h (Context::startPublicKeyExport, Context::exportPublicKeys): Extend with flags paramenter. (Context::ExportMode): New. * lang/qt/src/exportjob.h (ExportJob::setExportMode): New. * lang/qt/src/qgpgmeexportjob.cpp, lang/qt/src/qgpgmeexportjob.h: Update accordingly. -- This adds the C++ and Qt API for export modes.
* core: New keylist mode GPGME_KEYLIST_MODE_WITH_KEYGRIP.Werner Koch2020-07-151-0/+1
| | | | | | | | | | | | | | | | * src/gpgme.h.in (GPGME_KEYLIST_MODE_WITH_KEYGRIP): New. * src/gpgme-json.c (op_keylist): New flag "keygrip". * src/engine-gpg.c (gpg_keylist_build_options): Pass the options. * lang/cpp/src/global.h (WithKeygrip): New. * lang/cpp/src/context.cpp: Add check. * lang/cpp/src/key.cpp (Key::update): Handle WithKeygrip. * lang/cpp/src/verificationresult.cpp: Ditto. * lang/cpp/src/util.h (add_to_gpgme_keylist_mode_t): Ditto. -- GnuPG-bug-id: 4939 Signed-off-by: Werner Koch <[email protected]>
* cpp: Add wrapper for gpgme_set_global_flagAndre Heinecke2019-04-241-0/+5
| | | | | | | | * lang/cpp/src/context.cpp (setGlobalFlag): New. * lang/cpp/src/global.h (setGlobalFlag): Export it. -- GnuPG-Bug-Id: T4471
* cpp: Fix Error::hasSystemErrorAndre Heinecke2019-03-131-1/+1
| | | | | | | | | * lang/cpp/src/context.cpp (Error::hasSystemError): Invert logic to do what it says. -- This is safe because according to codesearch it is only used in QGpgME
* qt,cpp: Consistently use nullptr and overrideAndre Heinecke2018-12-031-69/+70
| | | | | | | | | | | | | | | * lang/cpp/src/Makefile.am, lang/qt/src/Makefile.am (AM_CPPFLAGS): Add suggest-override and zero-as-null-pointer-constant warnings. * lang/cpp/src/*, lang/qt/src/*: Consistenly use nullptr and override. -- This was especially important for the headers so that downstream users of GpgME++ or QGpgME do not get flooded by warnings if they have these warnings enabled. It also improves compiler errors/warnings in case of accidental mistakes.
* cpp: Add some convenience functionsAndre Heinecke2018-10-251-0/+5
| | | | | | | | | | | | | | | | * lang/cpp/src/context.cpp (Context::create): New. * lang/cpp/src/context.h: Update accordingly. * lang/cpp/src/key.cpp, lang/cpp/src/key.h: (Key::isBad, Subkey::isBad, UserID::isBad) (UserID::Signature::isBad): Add shorthand for the isX checks. * NEWS: Mention it. -- I don't know how often I wrote: if (key.isNull() || key.isExpired() || key.isRevoked() ... And for the context it is good practice to use a unique ptr so the API should make it easy.
* cpp: Initialize all gpgme_key_t's in contextAndre Heinecke2018-10-091-3/+3
| | | | | | | | | * lang/cpp/src/context.cpp (Context::startKeyListing), (Context::keyListResult, Context::signingKeys): Initialize key. -- "Should" not be neccessary but it's cleaner and would have covered the case of the previous commit.
* cpp: Add enum mapping for GPGME_AUDIT_LOG_DIAGAndre Heinecke2018-07-051-0/+3
| | | | | * src/context.cpp (to_auditlog_flags): Map DIAG value. * src/context.h (AuditLogFlags): Add it.
* cpp: Add proper gpgme_op_createkeyAndre Heinecke2018-06-081-0/+17
| | | | | | | | | | * lang/cpp/src/context.cpp, lang/cpp/src/context.h (Context::createKeyEx): New. -- The createKeyEx function follows the usual pattern that the synchronous call returns a result directly while for the async an extra call is neccessary.
* cpp: Add gpgme_(get)set_ctx_flagAndre Heinecke2018-06-011-0/+10
| | | | | | * NEWS: Mention API extensions. * lang/cpp/src/context.cpp, lang/cpp/src/context.h (Context::setFlag, Context::getFlag): New.
* cpp: Wrap create_key and create_subkeyAndre Heinecke2017-12-011-0/+50
| | | | | | | * lang/cpp/src/context.cpp, lang/cpp/src/context.h (Context::startCreateKey) (Context::createKey, Context::createSubkey) (Context::startCreateSubkey): New.
* cpp: Respect decrypt flags in new functionsAndre Heinecke2017-03-241-4/+4
| | | | | | | | | * 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.
* cpp: Use gpgme_op_decrypt_ex and add new flags.Andre Heinecke2017-03-241-9/+37
| | | | | | | | | | | | | | | | * lang/cpp/src/context.cpp: New decrypt and decryptVerify functions that take flags as arguments. Use new variants in old functions. (Context::setDecryptionFlags): New helper. (Context::Private::Private): Initialize new member. * lang/cpp/src/context_p.h (Context::Private::decryptFlags): New. * lang/cpp/src/context.h (Context::DecryptFlags): New enum. (Context::EncryptionFlags): Extend for EncryptWrap. -- The setDecryptionFlags provides a generic way to set decryption flags for the whole context. This allows existing code to just keep using the old functions and modify the decryption behavior in a central place.
* cpp: Add revuid and adduid supportAndre Heinecke2017-01-111-0/+24
| | | | | | | | | | | * lang/cpp/src/context.cpp (Context::revUid, Context::startRevUid), (Context::addUid, Context::startAddUid): New. * lang/cpp/src/context.h: Declare new functions. * lang/cpp/src/key.cpp (Key::UserID::revoke) (Key::addUid): Idomatic helpers. lang/cpp/src/key.h: Declare new functions. * NEWS: Update accordingly.
* cpp: Add get / set Sender APIAndre Heinecke2016-11-141-0/+10
| | | | | * cpp/src/context.cpp, cpp/src/context.h (Context::setSender), (Context::getSender): Add simple wrappers.
* cpp: Fix gcc diagnostic push / popAndre Heinecke2016-10-051-2/+2
| | | | | | | * lang/cpp/src/context.cpp: Fix pragmas. -- This fixes an error with -Werror=unknown-pragmas
* cpp, qt: Include config.hAndre Heinecke2016-09-231-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | lang/cpp/src/callbacks.cpp, lang/cpp/src/configuration.cpp, lang/cpp/src/context.cpp, lang/cpp/src/context_glib.cpp, lang/cpp/src/context_qt.cpp, lang/cpp/src/context_vanilla.cpp, lang/cpp/src/data.cpp, lang/cpp/src/decryptionresult.cpp, lang/cpp/src/defaultassuantransaction.cpp, lang/cpp/src/editinteractor.cpp, lang/cpp/src/encryptionresult.cpp, lang/cpp/src/engineinfo.cpp, lang/cpp/src/eventloopinteractor.cpp, lang/cpp/src/exception.cpp, lang/cpp/src/gpgadduserideditinteractor.cpp, lang/cpp/src/gpgagentgetinfoassuantransaction.cpp, lang/cpp/src/gpgsetexpirytimeeditinteractor.cpp, lang/cpp/src/gpgsetownertrusteditinteractor.cpp, lang/cpp/src/gpgsignkeyeditinteractor.cpp, lang/cpp/src/importresult.cpp, lang/cpp/src/key.cpp, lang/cpp/src/keygenerationresult.cpp, lang/cpp/src/keylistresult.cpp, lang/cpp/src/scdgetinfoassuantransaction.cpp, lang/cpp/src/signingresult.cpp, lang/cpp/src/tofuinfo.cpp, lang/cpp/src/trustitem.cpp, lang/cpp/src/verificationresult.cpp, lang/cpp/src/vfsmountresult.cpp, lang/qt/src/dataprovider.cpp, lang/qt/src/defaultkeygenerationjob.cpp, lang/qt/src/gpgme_backend_debug.cpp, lang/qt/src/job.cpp, lang/qt/src/qgpgmeadduseridjob.cpp, lang/qt/src/qgpgmebackend.cpp, lang/qt/src/qgpgmechangeexpiryjob.cpp, lang/qt/src/qgpgmechangeownertrustjob.cpp, lang/qt/src/qgpgmechangepasswdjob.cpp, lang/qt/src/qgpgmedecryptjob.cpp, lang/qt/src/qgpgmedecryptverifyjob.cpp, lang/qt/src/qgpgmedeletejob.cpp, lang/qt/src/qgpgmedownloadjob.cpp, lang/qt/src/qgpgmeencryptjob.cpp, lang/qt/src/qgpgmeexportjob.cpp, lang/qt/src/qgpgmeimportfromkeyserverjob.cpp, lang/qt/src/qgpgmeimportjob.cpp, lang/qt/src/qgpgmekeyformailboxjob.cpp, lang/qt/src/qgpgmekeygenerationjob.cpp, lang/qt/src/qgpgmekeylistjob.cpp, lang/qt/src/qgpgmelistallkeysjob.cpp, lang/qt/src/qgpgmenewcryptoconfig.cpp, lang/qt/src/qgpgmerefreshkeysjob.cpp, lang/qt/src/qgpgmesecretkeyexportjob.cpp, lang/qt/src/qgpgmesignencryptjob.cpp, lang/qt/src/qgpgmesignjob.cpp, lang/qt/src/qgpgmesignkeyjob.cpp, lang/qt/src/qgpgmetofupolicyjob.cpp, lang/qt/src/qgpgmeverifydetachedjob.cpp, lang/qt/src/qgpgmeverifyopaquejob.cpp, lang/qt/src/qgpgmewkspublishjob.cpp, lang/qt/src/threadedjobmixin.cpp, lang/qt/tests/run-keyformailboxjob.cpp, lang/qt/tests/t-encrypt.cpp, lang/qt/tests/t-keylist.cpp, lang/qt/tests/t-keylocate.cpp, lang/qt/tests/t-ownertrust.cpp, lang/qt/tests/t-support.cpp, lang/qt/tests/t-tofuinfo.cpp, lang/qt/tests/t-wkspublish.cpp: Include config.h -- This fixes problems with mismatching definitions. Most notably _FILE_OFFSET_BITS is now always set correctly.
* cpp: Avoid missing returns in non-void functionsAndreas Stieger2016-09-211-0/+2
| | | | | | | | | | | | | * lang/cpp/src/context.cpp (Context::signaturePolicyURL): return nullptr on default (to_tofu_policy_t): add default case for unknown * lang/cpp/src/key.cpp (Key::primaryFingerprint): return nullptr on default * lang/cpp/src/tofuinfo.cpp (GpgME::TofuInfo::policy): add default case for unknown Signed-off-by: Andreas Stieger <[email protected]> Signed-off-by: Andre Heinecke <[email protected]>
* cpp: Add support for gpgme_op_tofu_policyAndre Heinecke2016-09-161-0/+31
| | | | | * src/context.cpp, src/context.h (setTofuPolicy, setTofuPolicyStart): New.