aboutsummaryrefslogtreecommitdiffstats
path: root/lang/cpp/src (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Cpp: Provide size-hint for seekable and mem dataAndre Heinecke2016-08-121-0/+10
| | | | | | | | | * lang/cpp/src/data.cpp (GpgME::Data::Data): Set size-hint for mem and DataProvider based Data. -- This fixes the case that QGpgME did not have a total value for progress as the size was unknown.
* Cpp: Handle empty recipients consistentlyAndre Heinecke2016-08-102-38/+38
| | | | | | | | | | | | | | * lang/cpp/src/context.cpp (Context::getKeysFromRecipients): New helper. (Context::encrypt, Context::startEncryption, Context::signAndEncrypt) (Context::startCombinedSigningAndEncryption): Use new helper. * lang/cpp/src/context.h (Context::getKeysFromRecipients): Add as private helper. -- bf776ce was incomplete as the code to handle recpients was duplicated four times. This is now unified and constently uses a nullptr instead of an empty array.
* Cpp: Clarify ownership of provider classesAndre Heinecke2016-08-101-0/+14
| | | | | * lang/cpp/src/context.h: Note that the context does not take ownership of providers.
* Cpp: Add support for all EncryptionFlagsAndre Heinecke2016-08-092-1/+26
| | | | | * lang/cpp/src/context.h (EncryptionFlags): Extend. * lang/cpp/src/context.cpp (encryptflags2encryptflags): Ditto.
* Cpp: Fix simple symmetric encryptionAndre Heinecke2016-08-091-1/+2
| | | | | | | | * lang/cpp/src/context.cpp (Context::encrypt): If no recipients are provided encrypt with NULL and not an empty array. -- Sending an empty array leads to an invalid argument error.
* Cpp: Add EngineInfo::Version classAndre Heinecke2016-07-142-0/+61
| | | | | | * lang/cpp/src/engineinfo.cpp (EngineInfo::engineVersion): New. * lang/cpp/src/engineinfo.h (EngineInfo::engineVersion): Declare. (EngineInfo::Version): Small helper to work with versions.
* core: New GPGME_DATA_ENCODING_MIME.Werner Koch2016-07-132-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | * src/gpgme.h.in (GPGME_DATA_ENCODING_MIME): New. * src/data.c (gpgme_data_set_encoding): Adjust check. * src/engine-gpg.c (have_gpg_version): New. (gpg_encrypt, gpg_encrypt_sign): Pass flag '--mimemode'. (gpg_sign): Ditto. * lang/cpp/src/data.h (GpgME): Add MimeEncoding. * lang/cpp/src/data.cpp (encoding, setEncoding): Support MimeEncoding. * src/gpgme-tool.c (server_data_encoding): Add flag --mime. -- This feature allows an application to declare that the encrypted or signed data is a valid MIME part. What is missing is a way to return that information to the application after decryption/verification. This can be done by setting the encoding of the output data object; however this requires some internal additions to our processing model. Signed-off-by: Werner Koch <[email protected]>
* Cpp: Add feature enum for new identifyAndre Heinecke2016-07-132-0/+3
| | | | | | | | | | | * lang/cpp/src/context.cpp (supported_features2): Add BinaryAndFineGrainedIdentify * lang/cpp/src/global.h (Feature2): ditto. -- This is mostly for compatible code with KF5::Gpgmepp where there is no hard requirement against gpgme 1.7. With 1.7 a version check would also suffice.
* Qt/Cpp: Add version headersAndre Heinecke2016-07-122-1/+35
| | | | | | | | | | | * lang/cpp/src/gpgmepp_version.h.in, lang/qt/src/qgpgme_version.h.in: New. Version information. * lang/qt/src/Makefile.am, lang/cpp/src/Makefile.am: Add them. * configure.ac: Configure them. -- The version headers are common practice in KDE Frameworks and were installed for KF5Gpgmepp and Libkleo respectively.
* Qt/Cpp: Add license blurb to export headersAndre Heinecke2016-07-121-0/+20
| | | | | * lang/cpp/src/gpgmepp_export.h, lang/qt/src/qgpgme_export.h: Add license blurb.
* cpp: Fix distcheck.Justus Winter2016-07-071-0/+2
| | | | | | * lang/cpp/src/Makefile.am (CLEANFILES): Remove generated file. Signed-off-by: Justus Winter <[email protected]>
* Cpp: Expose gpgme_pubkey_algo_nameAndre Heinecke2016-07-062-1/+15
| | | | | | | * lang/cpp/src/key.cpp (Subkey::publicKeyAlgorithmAsString): New static variant. * lang/cpp/src/key.h: Declare function. Clarify comment about name mismatch.
* Cpp: Add PubkeyAlgo enumAndre Heinecke2016-07-062-3/+19
| | | | | | * lang/cpp/src/key.h (Subkey::PubkeyAlgo): New enum. (Subkey::publicKeyAlgorithm): Change return type. * lang/cpp/src/key.cpp (Subkey::publicKeyAlgorithm): Use enum.
* Cpp: Add support for TOFU_CONFLICT sigsumAndre Heinecke2016-07-042-1/+6
| | | | | | * lang/cpp/src/verificationresult.cpp (GpgME::Signature::Summary): Handle TOFU_CONFLICT. * lang/cpp/src/verificationresult.h (Summary): Add TofuConflict.
* Cpp: Add support for pinentry_modeAndre Heinecke2016-07-042-0/+50
| | | | | | * lang/cpp/src/context.cpp (Context::pinentryMode): Return mode. (Context::setPinentryMode): Set mode. * lang/cpp/src/context.h (PinentryMode): Add enum.
* Cpp: Add TofuInfo to signaturesAndre Heinecke2016-07-015-2/+338
| | | | | | | | | | | | * lang/cpp/src/tofuinfo.cpp, lang/cpp/src/tofuinfo.h: New class. * lang/cpp/src/verificationresult.cpp (Signature::tofuInfo): New. (VerificationResult::Private): Handle tofu info. (GpgME::operator<<(std::ostream &os, const Signature &sig)): Include TofuInfo in dump. * lang/cpp/src/verificationresult.h (Signature::tofuInfo): New. * lang/cpp/src/Makefile.am (main_sources, gpgmepp_headers): Add new files. * configure.ac (LIBGPGMEPP_LT_REVISION): Bump for new API.
* Cpp: Expose new data_identify valuesAndre Heinecke2016-06-272-1/+5
| | | | | | * lang/cpp/src/data.cpp (GpgME::Data::type): Handle PGP Encrypted and Signature. * lang/cpp/src/data.h: Add values accordingly.
* Cpp: Do not treat KEYEXPIRED as errorAndre Heinecke2016-06-271-2/+0
| | | | | | | | | * lang/cpp/src/editinteractor.cpp (status_to_error): No error for KEYEXPIRED. -- As keyexpired status is sent even if a subkey is expired we can not treat it as a global error.
* Cpp: Use whitelist for status messagesAndre Heinecke2016-06-011-12/+8
| | | | | | | | | * lang/cpp/src/editinteractor.cpp (EditInteractor::needsNoResponse): Use whitelist instead of blacklist. -- This should be more robust when new status messages are added. The whitelist is the same GPA uses. Fixes Qt's t-ownertrust.
* Cpp: Ignore STATUS_KEY_CONSIDERED when editingAndre Heinecke2016-05-201-0/+1
| | | | | * lang/cpp/src/editinteractor.cpp (EditInteractor::needsNoResponse): Handle GPGME_STATUS_KEY_CONSIDERED.
* Qt / Cpp: Port auto_ptr to unique_ptrAndre Heinecke2016-05-173-38/+38
| | | | | | | | | | | | | | | | | | | | | * lang/cpp/src/context.cpp, lang/cpp/src/context.h, lang/cpp/src/context_p.h (Context::createForEngine), (Context::edit, Context::startEditing), (Context::takeLastEditInteractor, Context::cardEdit), (Context::startCardEditing, Context::takeLastCardEditInteractor), (Context::assuanTransact, Context::startAssuanTransaction), (Context::takeLastAssuanTransaction): Port to unique_ptr. * lang/qt/src/qgpgmeadduseridjob.cpp, lang/qt/src/qgpgmechangeexpiryjob.cpp, lang/qt/src/qgpgmechangeownertrustjob.cpp, lang/qt/src/qgpgmechangepasswdjob.cpp, lang/qt/src/qgpgmesignkeyjob.cpp: Update accordingly. -- This is another API break but as we already broke API with GpgME++ and QGpgME from KDE Frameworks this is a good time to do this to avoid using a deprected C++ class in the API.
* Cpp: Ensure gpgme.h is taken from current buildAndre Heinecke2016-05-111-1/+2
| | | | | | | * lang/cpp/src/Makefile.am (AM_CPPFLAGS): Add gpgme.h location. -- This fixes the build in case an incompatible gpgme.h is also installed in other include locations.
* Qt / Cpp: Fix make distgpgmeppAndre Heinecke2016-05-101-2/+5
| | | | | | | | * lang/cpp/src/Makefile.am (EXTRA_DIST): Fix typo. (private_gpgmepp_headers): New. Private headers. (libgpgmepp_la_SOURCES): Add private headers. * lang/qt/src/Makefile.am (t_keylist_SOURCES): Remove non existent header.
* Cpp: Handle PINENTRY_LAUNCHED status lineAndre Heinecke2016-05-061-0/+1
| | | | | | | | | * lang/cpp/src/editinteractor.cpp (EditInteractor::needsNoResponse): Add GPGME_STATUS_PINENTRY_LAUNCHED. -- PINENTRY_LAUNCHED needs no response in any Job. This fixes Jobs which errored out on unknown status lines.
* Cpp: Add support for pubkey_algo_nameAndre Heinecke2016-04-122-0/+30
| | | | | * lang/cpp/src/key.cpp (Subkey::algoName): New. * lang/cpp/src/key.h: Declare.
* Cpp: Add support for gpgme_data_identifyAndre Heinecke2016-04-122-0/+34
| | | | | * lang/cpp/src/data.cpp (Data::type): New. * lang/cpp/src/data.h (Data::Type): New enum mapping.
* Cpp: Add string comparators for keysAndre Heinecke2016-04-112-0/+56
| | | | | | | | | * lang/cpp/src/global.h (GPGMEPP_MAKE_STRCMP): New. (_gpgmepp_strcmp): NULL save wrapper around std::strcmp. * lang/cpp/src/key.h: Add comparators for various attributes. -- This was taken from libkleo predicates.h. Appears generally useful.
* Cpp: Remove last usages of boostAndre Heinecke2016-04-113-23/+24
| | | | | | | | * lang/cpp/src/configuration.cpp: Use std::remove_pointer. (Configuration::operator<<): std::for_each. * lang/cpp/src/context.cpp: Delete manually instead of scoped ptr. * lang/cpp/src/scdgetinfoassuantransaction.cpp: Use static_assert. (to_reader_list): Tokenize with getline.
* Add pthread in gpgmepp configAndre Heinecke2016-04-041-2/+2
| | | | * lang/cpp/src/GpgmeppConfig.cmake.in.in: Add pthread.
* Cpp / Qt: Reduce boost usage (memory and tuple)Andre Heinecke2016-04-0322-78/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * cpp/src/assuanresult.h, cpp/src/configuration.cpp, cpp/src/configuration.h, cpp/src/data.h, cpp/src/decryptionresult.h, cpp/src/defaultassuantransaction.cpp, cpp/src/encryptionresult.cpp, cpp/src/encryptionresult.h, cpp/src/engineinfo.h, cpp/src/gpgagentgetinfoassuantransaction.cpp, cpp/src/gpgsignkeyeditinteractor.cpp, cpp/src/importresult.cpp, cpp/src/importresult.h, cpp/src/key.h, cpp/src/keygenerationresult.h, cpp/src/keylistresult.h, cpp/src/notation.h, cpp/src/signingresult.cpp, cpp/src/signingresult.h, cpp/src/verificationresult.cpp, cpp/src/verificationresult.h, cpp/src/vfsmountresult.h, qt/src/dataprovider.cpp, qt/src/dataprovider.h, qt/src/decryptjob.h, qt/src/decryptverifyjob.h, qt/src/downloadjob.h, qt/src/encryptjob.h, qt/src/qgpgmeadduseridjob.cpp, qt/src/qgpgmechangeexpiryjob.cpp, qt/src/qgpgmechangeownertrustjob.cpp, qt/src/qgpgmechangepasswdjob.cpp, qt/src/qgpgmedecryptjob.cpp, qt/src/qgpgmedecryptjob.h, qt/src/qgpgmedecryptverifyjob.cpp, qt/src/qgpgmedecryptverifyjob.h, qt/src/qgpgmedeletejob.cpp, qt/src/qgpgmedownloadjob.cpp, qt/src/qgpgmedownloadjob.h, qt/src/qgpgmeencryptjob.cpp, qt/src/qgpgmeencryptjob.h, qt/src/qgpgmeexportjob.cpp, qt/src/qgpgmeexportjob.h, qt/src/qgpgmeimportfromkeyserverjob.cpp, qt/src/qgpgmeimportfromkeyserverjob.h, qt/src/qgpgmeimportjob.cpp, qt/src/qgpgmeimportjob.h, qt/src/qgpgmekeygenerationjob.cpp, qt/src/qgpgmekeygenerationjob.h, qt/src/qgpgmekeylistjob.cpp, qt/src/qgpgmekeylistjob.h, qt/src/qgpgmelistallkeysjob.cpp, qt/src/qgpgmelistallkeysjob.h, qt/src/qgpgmenewcryptoconfig.cpp, qt/src/qgpgmenewcryptoconfig.h, qt/src/qgpgmesignencryptjob.cpp, qt/src/qgpgmesignencryptjob.h, qt/src/qgpgmesignjob.cpp, qt/src/qgpgmesignjob.h, qt/src/qgpgmesignkeyjob.cpp, qt/src/qgpgmeverifydetachedjob.cpp, qt/src/qgpgmeverifydetachedjob.h, qt/src/qgpgmeverifyopaquejob.cpp, qt/src/qgpgmeverifyopaquejob.h, qt/src/signencryptjob.h, qt/src/signjob.h, qt/src/threadedjobmixin.h, qt/src/verifydetachedjob.h, qt/src/verifyopaquejob.h: Reduce boost usage. -- This was mostly done with search and replace to change the templates / classes from memory and tuple to their c++11 equivalents.
* Add additional include path in config filesAndre Heinecke2016-04-021-1/+1
| | | | | | | | * lang/cpp/src/GpgmeppConfig.cmake.in.in lang/qt/src/QGpgmeConfig.cmake.in.in: Include directory above headers. -- This ensures that code using #inlcude <gpgme++/header.h> still works.
* Add qgpgme as qt language bindingAndre Heinecke2016-03-082-14/+15
| | | | | | | | | | | | | | | | | | | | | | * configure.ac: Add version defines. Check for qt if neccessary. * lang/README: Mention qt * lang/cpp/src/GpgmeppConfig.cmake.in.in: Remove comment. Find qgpgme. * lang/qt/src/Makefile.am: New. Build qgpgme. * lang/qt/README, lang/qt/src/Makefile.am, lang/qt/src/QGpgmeConfig.cmake.in.in, lang/qt/src/QGpgmeConfigVersion.cmake.in, lang/qt/src/dataprovider.cpp, lang/qt/src/dataprovider.h, lang/qt/src/qgpgme_export.h, m4/qt.m4: New. * lang/cpp/src/GpgmeppConfig.cmake.in.in, lang/cpp/src/Makefile.am: Fix generated config file. -- For now this is just the dataprovider which was part of the KF5 Gpgmepp QGpgme variant. This is very thin but a useful class which is used downstream.
* Add version info for gpgmeppAndre Heinecke2016-03-021-0/+2
| | | | * lang/cpp/src/Makefile.am (libgpgmepp_la_LDFLAGS): Add version info.
* Add cmake configuration filesAndre Heinecke2016-03-023-0/+167
| | | | | | | | | | * configure.ac: Add libgpgmepp version. Configure cmake files. * lang/cpp/src/Makefile.am: Add targets for cmake files. (EXTRA_DIST): Add cmake files. -- This should smooth the transition for downstream users that have worked with KF5::Gpgmepp previously.
* Fix export header and windows export macrosAndre Heinecke2016-03-021-4/+16
| | | | * lang/cpp/src/gpgme_export.h: Fix variable name. Add Windows ifdefs.
* Add header installationAndre Heinecke2016-03-021-2/+22
| | | | | * lang/cpp/src/Makefile.am: Add headers as deps and install them. (AM_CPPFLAGS): Add BUILDING_GPGMEPP to be used in export macros.
* Add buildsystem for GpgmeppAndre Heinecke2016-02-221-0/+39
| | | | | | | * configure.ac: Configure Makefiles. * lang/Makefile.am: Add cpp subdir * lang/cpp/Makefile.am: New. Add src subdir. * lang/cpp/src/Makefile.am: New. Basic buildsystem.
* Remove feature check ifdefsAndre Heinecke2016-02-2227-692/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lang/cpp/src/assuanresult.cpp, 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/global.h, lang/cpp/src/gpgagentgetinfoassuantransaction.cpp, lang/cpp/src/importresult.cpp, lang/cpp/src/interfaces/assuantransaction.h, 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/trustitem.cpp, lang/cpp/src/util.h, lang/cpp/src/verificationresult.cpp, lang/cpp/src/vfsmountresult.cpp: Remove feature checks.
* Initial checkin of gpgmepp sourcesAndre Heinecke2016-02-2269-0/+12197
Based on git.kde.org/pim/gpgmepp rev. 0e3ebc02 * lang/cpp/src/assuanresult.cpp, lang/cpp/src/assuanresult.h, lang/cpp/src/callbacks.cpp, lang/cpp/src/callbacks.h, lang/cpp/src/configuration.cpp, lang/cpp/src/configuration.h, lang/cpp/src/context.cpp, lang/cpp/src/context.h, lang/cpp/src/context_glib.cpp, lang/cpp/src/context_p.h, lang/cpp/src/context_qt.cpp, lang/cpp/src/context_vanilla.cpp, lang/cpp/src/data.cpp, lang/cpp/src/data.h, lang/cpp/src/data_p.h, lang/cpp/src/decryptionresult.cpp, lang/cpp/src/decryptionresult.h, lang/cpp/src/defaultassuantransaction.cpp, lang/cpp/src/defaultassuantransaction.h, lang/cpp/src/editinteractor.cpp, lang/cpp/src/editinteractor.h, lang/cpp/src/encryptionresult.cpp, lang/cpp/src/encryptionresult.h, lang/cpp/src/engineinfo.cpp, lang/cpp/src/engineinfo.h, lang/cpp/src/error.h, lang/cpp/src/eventloopinteractor.cpp, lang/cpp/src/eventloopinteractor.h, lang/cpp/src/exception.cpp, lang/cpp/src/exception.h, lang/cpp/src/global.h, lang/cpp/src/gpgadduserideditinteractor.cpp, lang/cpp/src/gpgadduserideditinteractor.h, lang/cpp/src/gpgagentgetinfoassuantransaction.cpp, lang/cpp/src/gpgagentgetinfoassuantransaction.h, lang/cpp/src/gpgmefw.h, lang/cpp/src/gpgmepp_export.h, lang/cpp/src/gpgsetexpirytimeeditinteractor.cpp, lang/cpp/src/gpgsetexpirytimeeditinteractor.h, lang/cpp/src/gpgsetownertrusteditinteractor.cpp, lang/cpp/src/gpgsetownertrusteditinteractor.h, lang/cpp/src/gpgsignkeyeditinteractor.cpp, lang/cpp/src/gpgsignkeyeditinteractor.h, lang/cpp/src/importresult.cpp, lang/cpp/src/importresult.h, lang/cpp/src/key.cpp, lang/cpp/src/key.h, lang/cpp/src/keygenerationresult.cpp, lang/cpp/src/keygenerationresult.h, lang/cpp/src/keylistresult.cpp, lang/cpp/src/keylistresult.h, lang/cpp/src/notation.h, lang/cpp/src/result.h, lang/cpp/src/result_p.h, lang/cpp/src/scdgetinfoassuantransaction.cpp, lang/cpp/src/scdgetinfoassuantransaction.h, lang/cpp/src/signingresult.cpp, lang/cpp/src/signingresult.h, lang/cpp/src/trustitem.cpp, lang/cpp/src/trustitem.h, lang/cpp/src/util.h, lang/cpp/src/verificationresult.cpp, lang/cpp/src/verificationresult.h, lang/cpp/src/vfsmountresult.cpp, lang/cpp/src/vfsmountresult.h, lang/cpp/src/interfaces/assuantransaction.h, lang/cpp/src/interfaces/dataprovider.h, lang/cpp/src/interfaces/passphraseprovider.h, lang/cpp/src/interfaces/progressprovider.h: New.