aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* core: Allow for older compilers.Werner Koch2021-05-122-2/+4
| | | | | | | | | | | | | | | * tests/run-verify.c (main): Remove C99-only syntax. * tests/run-threaded.c (start_keylistings): Ditto. -- Older gcc's do not grok this and there is no real need for it. run-verify.c:324: error: ‘for’ loop initial declarations are only allowed in C99 mode run-verify.c:324: note: use option -std=c99 or -std=gnu99 to compile your code Reported-by: Lars Hecking
* core: Make sure to stay ABI compatible.Werner Koch2021-05-121-3/+3
| | | | | | | | | | | * src/gpgme.h.in (struct _gpgme_key_sig): Move trust_scope to the end of the struct. -- Fixes-commit: 276187f6b62a73e92b1c20f589510f80ab9e88d2 Note that we assume that splitting a reserved 28 bit field into 3 fields does not change the ABI.
* cpp: Do not close stdout/stderr when destroying EditInteractorIngo Klöcker2021-05-061-7/+6
| | | | | | | | | | | | | | | * lang/cpp/src/editinteractor.cpp (EditInteractor::Private): Initialize members 'state' and 'debug' in-class. Add member 'debugNeedsClosing'. (EditInteractor::Private::Private): Remove members initializers. Remember if 'debug' needs to be closed. (EditInteractor::Private::~Private): Only close 'debug' if it needs to be closed. -- This fixes the problem that after destroying an edit interactor all debug output went to /dev/null instead of stderr (or stdout) if one enabled debugging of the edit interactors with GPGMEPP_INTERACTOR_DEBUG set to stderr (or stdout).
* qt: Extend SignKeyJob to create trust signaturesIngo Klöcker2021-05-055-5/+629
| | | | | | | | | | | | | | | * lang/qt/src/signkeyjob.h (SignKeyJob::setTrustSignature): New. * lang/qt/src/qgpgmesignkeyjob.h, lang/qt/src/qgpgmesignkeyjob.cpp (QGpgMESignKeyJob::setTrustSignature): New. * lang/qt/src/qgpgmesignkeyjob.cpp (sign_key): Handle trust signatures. (QGpgMESignKeyJob::start): Pass trust signature attributes to sign_key. (QGpgMESignKeyJob::setTrustSignature): New. -- This allows Kleopatra to create trust signatures for trusted introducers. GnuPG-bug-id: 5245, 5421
* qt: Pimpl QGpgMESignKeyJobIngo Klöcker2021-05-052-43/+41
| | | | | | | | | | | | | | | | | | | * lang/qt/src/qgpgmesignkeyjob.h: Remove unneeded includes. Include <memory>. (QGpgMESignKeyJob): Remove all member variables. Add pimpl pointer. * lang/qt/src/qgpgmesignkeyjob.cpp: Include <QString>. Don't include <memory>. (QGpgMESignKeyJob::Private): New. (QGpgMESignKeyJob::QGpgMESignKeyJob): Remove initialization of removed members. Initialize d. (QGpgMESignKeyJob::start, QGpgMESignKeyJob::setUserIDsToSign, QGpgMESignKeyJob::setCheckLevel, QGpgMESignKeyJob::setExportable, QGpgMESignKeyJob::setSigningKey, QGpgMESignKeyJob::setNonRevocable, QGpgMESignKeyJob::setRemark, QGpgMESignKeyJob::setDupeOk): Adapt to move of member variables to pimpl. -- GnuPG-bug-id: 5245, 5421
* cpp: Add support for trust signatures to sign key edit interactorIngo Klöcker2021-05-052-10/+45
| | | | | | | | | | | | | | | | * lang/cpp/src/gpgsignkeyeditinteractor.h, lang/cpp/src/gpgsignkeyeditinteractor.cpp (GpgSignKeyEditInteractor::setTrustSignatureTrust): New. (GpgSignKeyEditInteractor::setTrustSignatureDepth): New. (GpgSignKeyEditInteractor::setTrustSignatureScope): New. * lang/cpp/src/gpgsignkeyeditinteractor.cpp (GpgSignKeyEditInteractor::Private::Private): Initialize new member. (makeTable): Add new transition. Fix typos in existing transitions. (GpgSignKeyEditInteractor::action): Handle SET_TRUST_VALUE, SET_TRUST_DEPTH, and SET_TRUST_REGEXP. -- GnuPG-bug-id: 5245, 5421
* cpp: Add getters for the attributes of a trust signatureIngo Klöcker2021-05-053-0/+38
| | | | | | | | | | | | * lang/cpp/src/key.h (TrustSignatureTrust): New enum. * lang/cpp/src/key.h, lang/cpp/src/key.cpp (UserID::Signature::isTrustSignature): New. (UserID::Signature::trustValue): New. (UserID::Signature::trustDepth): New. (UserID::Signature::trustScope): New. -- GnuPG-bug-id: 5245, 5420
* core: Extend gpgme_key_sig_t with trust signature members.Ingo Klöcker2021-05-056-1/+52
| | | | | | | | | | | | | | * src/gpgme.h.in (struct _gpgme_key_sig): Add fields 'trust_depth', 'trust_value', and 'trust_scope'. * src/key.c (gpgme_key_unref): Free trust_scope. * src/keylist.c (keylist_colon_handler): Set the fields. * tests/run-keylist.c (main): Print the fields. -- The trust signature values are part of gpg's output since the year 2003. This now adds support to gpgme. GnuPG-bug-id: 5245, 5419
* doc: Add MIT license notice.Werner Koch2021-03-113-5/+47
| | | | | | | * LICENSES: New. -- Suggested-by: Jiri Kucera <[email protected]>
* core: New flag GPGME_KEYSIGN_FORCE.Werner Koch2021-03-115-0/+20
| | | | | | | | | | * src/gpgme.h.in (GPGME_KEYSIGN_FORCE): New. * src/engine-gpg.c (gpg_keysign): Implement. * tests/run-keysign.c (show_usage): Add option --force -- GnuPG-bug-id: 4584
* qt: Add method for getting config entries for components by entry nameIngo Klöcker2021-03-053-7/+39
| | | | | | | | | | | | | | | | * lang/qt/src/cryptoconfig.h, lang/qt/src/cryptoconfig.cpp (CryptoConfig::entry): Move implementation to cpp. Add overload not requiring a group name. -- The group name is not needed for identifying a config entry because the groups only provide a logical grouping of config entry for user interfaces. To improve usability entries are sometimes moved to a different group, but this shouldn't break existing applications trying to access those entries. The new group-agnostic overload makes applications robust against regrouping of config entries. GnuPG-bug-id: 5217
* core: Remove experimental feature GPGME_EXPORT_MODE_NOUID.Werner Koch2021-02-013-10/+6
| | | | | | | | | | | | | | * src/export.c (export_start): Remove GPGME_EXPORT_MODE_NOUID check. * src/engine-gpg.c (export_common): Ditto. -- Note that this constant was never announed and used only for internal tests. It made it into some release only by accident. The constants is kept in gpgme.h to not break any code but it is non-fucntionals. We do not consider this an ABI break. GnuPG-bug-id: 5284
* Post release updatesWerner Koch2021-01-082-1/+6
| | | | --
* Release 1.15.1gpgme-1.15.1Werner Koch2021-01-085-11/+23
|
* Make distcheck make target a bit more reliable.Werner Koch2021-01-081-1/+1
| | | | * Makefile.am (release): Do not pass --parallel
* core: Make listing of signatures work if only secret keys are listedIngo Klöcker2021-01-053-1/+635
| | | | | | | | | | * src/engine-gpg.c (gpg_keylist_build_options): Add "--with-sig-check" argument if signatures shall be listed. * tests/gpg/t-keylist-secret-sig.c: New. * tests/gpg/Makefile.am (c_tests): Add new test. -- GnuPG-bug-id: 3580
* cpp: Add const-overload of UserID::Signature::operator<Ingo Klöcker2021-01-042-1/+9
| | | | | | | | | lang/cpp/src/key.h, lang/cpp/src/key.cpp (UserID::Signature::operator<): Add const-overload. Deprecate non-const overload. -- This fixes compilation on FreeBSD with clang 10.
* Qt: Undeprecate QByteArray based start functsAndre Heinecke2021-01-042-2/+2
| | | | | | | | | | | | * lang/qt/src/encryptjob.h, lang/qt/src/signjob.h (start): Undeprecate QByteArray based functions. -- While the QIODevice access might avoid a copy it is more difficult to manage the data and lifetime of the QIODevices in calling code. The QByteArray calls are convienient for small data objects like mails where an in memory copy is not really expensive anymore.
* python: Fix key_export*.NIIBE Yutaka2020-12-031-3/+3
| | | | | | | | | | | * lang/python/src/core.py (key_export): Just raise an error. (key_export_minimal, key_export_secret): Ditto. -- GnuPG-bug-id: 5149 Fixes-commit: 7faef33d13fa8efce152ca7aa6e9d39030c1cf08 Signed-off-by: NIIBE Yutaka <[email protected]>
* core: Call _gpgme_passphrase_status_handler when exporting keys.NIIBE Yutaka2020-11-241-0/+4
| | | | | | | | | * src/export.c (export_status_handler): Call the handler. -- Fixes-commit: 3382ecb17eb5d2a373cf2eccb301854fff42f6aa Signed-off-by: NIIBE Yutaka <[email protected]>
* Revert "cpp: Use portable off_t size_t"Andre Heinecke2020-11-206-11/+150
| | | | | | | | | This reverts commit 88294023c196497cfa6737be262c8b0c09d2a3ce. -- This commit was too early and i needed to test more this is breaking more then it helps so for now revert it before we can do a proper solution.
* m4: Update with newer autoconf constructs.NIIBE Yutaka2020-11-201-2/+2
| | | | | | * src/gpgme.m4: Replace AC_HELP_STRING to AS_HELP_STRING. Signed-off-by: NIIBE Yutaka <[email protected]>
* cpp: Use portable off_t size_tAndre Heinecke2020-11-186-150/+11
| | | | | | | | | | | | | | | | | * configure.ac: Configure cpp data.h.in * lang/cpp/src/Makefile.am: Generate data.h * lang/cpp/src/data.cpp, lang/cpp/src/data.h: Use portable types. * lang/qt/src/Makefile.am: Include build dir. * lang/qt/tests/makefile.am: Include build dir. -- These kind of patches have been around for a while, IMO this should not create an ABI incompatbility for cases where it already works because the types should be the same so I think this is not an interface break. GnuPG-Bug-Id: T3996
* qt: Avoid empty "[email protected]" signature notationsIngo Klöcker2020-11-181-1/+1
| | | | | | | | | * lang/qt/src/qgpgmesignkeyjob.cpp (sign_key): Check remark for being an empty string instead of a null QString. -- GnuPG-bug-id: 5142 Co-authored-by: Daniel Kahn Gillmor
* build: Update with newer autoconf constructs.NIIBE Yutaka2020-11-184-25/+56
| | | | | | | | | | * configure.ac: Use AC_USE_SYSTEM_EXTENSIONS instead of AC_GNU_SOURCE. Use AS_HELP_STRING instead of AC_HELP_STRING. * m4/libtool.m4: Update from libgpg-error. * m4/gpg-error.m4: Update from libgpg-error. * m4/libassuan.m4: Update from libassuan. Signed-off-by: NIIBE Yutaka <[email protected]>
* qt: Fix export of qDebug GpgME::Error overloadAndre Heinecke2020-11-121-0/+1
| | | | * lang/qt/src/debug.cpp: Include debug.h to get the export decl.
* build: Use ~/.gnupg-autogen.sh for the release targetsWerner Koch2020-11-121-9/+21
| | | | * Makefile.am (sign-release): Use global config vars.
* Post release updatesWerner Koch2020-11-122-1/+8
|
* Release 1.15.0gpgme-1.15.0Werner Koch2020-11-124-13/+18
| | | | | | | | * configure.ac: Bump LT versions to c=C35/A24/R0, cpp=C18/A13/R0, qt=C12/A5/R0. -- GnuPG-bug-id: 5131
* core: Support exporting secret keys.NIIBE Yutaka2020-11-121-0/+16
| | | | | | | | | | | | * src/export.c (export_start): Set command handler for passphrase interaction for the case when it's secret keys. (export_ext_start): Likewise. -- GnuPG-bug-id: 5046 Co-authored-by: Louis Dupré Bertoni Signed-off-by: NIIBE Yutaka <[email protected]>
* python: Fix a test for newer GnuPG (>= 2.3).NIIBE Yutaka2020-11-121-1/+2
| | | | | | | | | | | * lang/python/tests/t-quick-subkey-creation.py: Specify RSA. -- Using GnuPG 2.3, a key with default (ed25519/cv25519) cannot have some combination of capabilities (e.g., "encr auth"). Signed-off-by: NIIBE Yutaka <[email protected]>
* qt: Add export macro for QDebug operatorAndre Heinecke2020-11-111-1/+3
| | | | | | | | | | * lang/qt/src/debug.h: Add export macro. -- This is public API so it should be exported. This did not resolve a link issue for Windows that I've experienced when building. But this might be to some uncleanlyness in my build environment.
* qt: Allow build with older GnuPG (< 2.2.18).NIIBE Yutaka2020-11-111-1/+4
| | | | | | | * lang/qt/tests/t-remarks.cpp (initTestCase): Check gpg for allow-weak-key-signatures option. Signed-off-by: NIIBE Yutaka <[email protected]>
* Require at least libgpg-error 1.36Werner Koch2020-11-097-62/+12
| | | | | | | | | | | | | | | | * configure.ac (NEED_GPG_ERROR_VERSION): Require 1.36. * src/cJSON.c: Remove code for older version. * src/engine.c (gpgme_get_engine_info): Ditto. * src/gpgme-json.c: Ditto. * src/op-support.c: Ditto. * src/util.h: Ditto. -- Libgpg-error 1.36 has been released more than 18 months ago so it is time to avoid hacks and require this verion. This will for example help Kleopatra to support PIV cards and improves the gpgme-json. Signed-off-by: Werner Koch <[email protected]>
* Parse STATUS_CANCELED_BY_USER.Ben Kibbey2020-11-043-1/+6
| | | | | | | | | * src/gpgme.h.in (GPGME_STATUS_CANCELED_BY_USER): New. * src/status-table.c (status_table_s): Add "CANCELED_BY_USER". * src/passphrase.c (_gpgme_passphrase_status_handler): Return GPG_ERR_CANCELED during GPGME_STATUS_CANCELED_BY_USER. Signed-off-by: Ben Kibbey <[email protected]>
* qt: Make audit parameters of result signal optionalIngo Klöcker2020-11-032-1/+3
| | | | | | | | | | | lang/qt/src/quickjob.h (QuickJob::result): Make parameters auditLogAsHtml and audigLogError optional. -- This aligns the signature of QuickJob's result signal with the result signals of the other Job subclasses. GnuPG-bug-id: 5094
* cpp: Mark helper functions as staticIngo Klöcker2020-11-031-6/+6
| | | | | lang/cpp/src/key.cpp (find_subkey, verify_subkey, find_uid, verify_uid, find_signature, verify_signature): Mark as static.
* cpp: Make signatures belonging to the same user ID sortableIngo Klöcker2020-11-033-1/+64
| | | | | | | | | | | | | | | | | lang/cpp/src/key.h, lang/cpp/src/key.cpp (UserID::Signature::operator<): New. lang/cpp/src/key.cpp (signature_index): New. -- operator< defines a canonical sort order for signatures belonging to the same user ID. It is based on the sort order defined by cmp_signodes() in g10/keylist.c of gnupg. In particular, the ordering of signatures made with the same key by creation time allows to see easily whether the most recent signature is a certification or a revocation. GnuPG-bug-id: 5094 recent
* qt: Add support for revoke signature quick commandIngo Klöcker2020-10-294-2/+41
| | | | | | | | | | * lang/qt/src/quickjob.h (QuickJob::startRevokeSignature): New. * lang/qt/src/qgpgmequickjob.h, lang/qt/src/qgpgmequickjob.cpp (QGpgMEQuickJob::startRevokeSignature): New. * lang/qt/src/qgpgmequickjob.cpp (revokeSignatureWorker): New. -- GnuPG-bug-id: 5094
* qt: Some minor cleanupsIngo Klöcker2020-10-291-13/+3
| | | | | | | | | * lang/qt/src/qgpgmequickjob.h: (GpgME::Key, QDateTime, QString): Remove superfluous forward declarations. (QGpgMEQuickJob): Remove superfluous second template argument. It is identical to the default. (QGpgMEQuickJob::result): Remove. It is already defined in the base class.
* cpp: Add support for gpgme_op_revsigIngo Klöcker2020-10-293-12/+61
| | | | | | | | | | | | * 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
* core: New function gpgme_op_revsig.Ingo Klöcker2020-10-2919-19/+416
| | | | | | | | | | | | | | | | | | | | | | | * src/gpgme.h.in (gpgme_op_revsig_start, gpgme_op_revsig): New. (GPGME_REVSIG_LFSEP): New. * src/context.h (ctx_op_data_id_t): Add OPDATA_REVSIG. * src/revsig.c: New. * src/Makefile.am (main_sources): Add revsig. * src/libgpgme.vers, src/gpgme.def: Add gpgme_op_revsig and gpgme_op_revsig_start. * src/engine.h, src/engine.c: (_gpgme_engine_op_revsig): New. * src/engine-backend.h (engine_ops): Add 'revsig' and adjust all engine initializers. * src/engine-gpg.c (gpg_revsig): New. (_gpgme_engine_ops_gpg): Set revsig to gpg_revsig. * doc/gpgme.texi: Document new functions. * tests/run-keysign.c: Add option --revoke. -- This extends GPGME to support the --quick-revoke-sig command added by GnuPG 2.2.24. This allows revoking key signatures. GnuPG-bug-id: 5094
* python: Handle the when case __doc__ is None.NIIBE Yutaka2020-10-271-1/+6
| | | | | | | | | * lang/python/src/core.py (GpgmeWrapper): Check if None. -- GnuPG-bug-id: 5075 Signed-off-by: NIIBE Yutaka <[email protected]>
* cpp: Add support for gpgme_cancelIngo Klöcker2020-10-233-0/+7
| | | | | | | | | | | | | * 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
* Add Assuan transaction that forwards status lines to another objectIngo Klöcker2020-10-235-1/+166
| | | | | | | | | | | | | | | * lang/cpp/src/Makefile.am: Add new files. * lang/cpp/src/interfaces/statusconsumer.h, lang/cpp/src/statusconsumerassuantransaction.cpp, lang/cpp/src/statusconsumerassuantransaction.h: New. * NEWS: Mention new API. -- This Assuan transaction is useful for long running Assuan commands. Classes implementing the StatusConsumer interface can process received status lines while the Assuan command is still running. GnuPG-bug-id: 5066
* qt: Add QDebug stream operator for GpgME::ErrorIngo Klöcker2020-10-234-1/+102
| | | | | | | | | | * lang/qt/src/Makefile.am: Add new files. * lang/qt/src/debug.h, lang/qt/src/debug.cpp: New. * NEWS: Mention it. -- This was previously implemented in Kleopatra, but it makes sense for all users of qgpgme.
* cpp, qt: Add missing comparison operators for version info comparisonIngo Klöcker2020-10-233-0/+65
| | | | | | | | | * lang/cpp/src/engineinfo.h (EngineInfo::Version::operator<=, EngineInfo::Version::operator>=, EngineInfo::Version::operator!=): New. * lang/qt/tests/t-various.cpp (TestVarious::testVersion): Add tests for new comparison operators. * NEWS: Mention added API
* cpp, qt: Fix version info comparisonIngo Klöcker2020-10-232-2/+4
| | | | | | | | | | | | * lang/cpp/src/engineinfo.h (EngineInfo::Version::operator>(const Version &)): Fix logic. (EngineInfo::Version::operator>(const char *)): Use Version-overload of operator>. * lang/qt/tests/t-various.cpp: Add test. -- This fixes a logic error that 2.0.0 > 2.0.0 would return true.
* tests: Fix gcc incompatibilityWerner Koch2020-10-031-5/+13
| | | | | | | | | | * tests/json/t-json.c: Remove var definitions inside a for statement. -- This useful C99 feature seems to work only in recent gcc versions. We can't use it; see gnupg/doc/HACKING. GnuPG-bug-id: 5088
* gpgsm: Fix leaked fd.NIIBE Yutaka2020-10-011-1/+1
| | | | | | | | | | | * src/engine-gpgsm.c (gpgsm_new): Close gpgsm->diag_cb.server_fd. -- GnuPG-bug-id: 5074 Reported by: VladislavGrudinin Fixes-commit: dd21ec997cf4b6ba18538c63c728478110ad1f60 Signed-off-by: NIIBE Yutaka <[email protected]>