aboutsummaryrefslogtreecommitdiffstats
path: root/lang (unfollow)
Commit message (Collapse)AuthorFilesLines
2019-12-13cpp, qt: Use uidhash to select uids for signingAndre Heinecke5-1/+24
* lang/cpp/src/gpgsignkeyeditinteractor.cpp (action): Use uidhash instead of number. (GpgSignKeyEditInteractor::setKey): New. * lang/cpp/src/gpgsignkeyeditinteractor.h: Update accordingly. * lang/cpp/src/key.h, lang/cpp/src/key.cpp: Wrap uidhash. * lang/qt/src/qgpgmesignkeyjob.cpp: Set the key. -- Using the uidhash avoids problems when the user ids on --edit-key are different ones then the uids captured by gpgme when listing keys. Or if they are in a different order. This can happen with cached keys or keys with user attributes.
2019-11-07qt,tests: Take care for old DSA key using deprecated digest algo.NIIBE Yutaka1-0/+4
* lang/qt/tests/t-remarks.cpp (initTestCase): Supply allow-weak-key-signatures flag for GnuPG 2.3, which normally rejects use of SHA1 digest. Signed-off-by: NIIBE Yutaka <[email protected]>
2019-11-06qt, tests: Add check for supported versionsAndre Heinecke4-21/+41
* lang/qt/tests/t-encrypt.cpp (decryptSupported): Moved to t-support as loopbackSupported. * lang/qt/tests/t-remarks.cpp: Check for loopbackSupported. * lang/qt/tests/t-support.cpp, lang/qt/tests/t-support.h (loopbackSupported): New. -- This ensures that the tests do not fail with GnuPG 2.0.x
2019-11-06qt, tests: Replace accidentally commited assertAndre Heinecke1-1/+1
* lang/qt/test/t-remarks.cpp (testRemarkReplaceSingleUIDExportable): Use QVERIFY instead of assert. -- An assert causes the temp directory not to be cleaned up. I use this to analyze test failures. If you want to see the tests home directory after a failure you can just change a failing verify to an assert.
2019-11-06qt,tests: Add test to add an exportable certifyAndre Heinecke1-0/+88
* lang/qt/test/t-remarks.cpp (testRemarkReplaceSingleUIDExportable): New. -- Just checking in case the edit-key offers new states for that.
2019-11-06python: Fix how to generate documentation.NIIBE Yutaka1-46/+35
* lang/python/doc/Makefile.am: Explicitly write rules to generate rst and texinfo files. Fixes-commit: 36428d8cf153a33faac6a951752cdc76e23f9737 Signed-off-by: NIIBE Yutaka <[email protected]>
2019-11-04qt, tests: Add testcase for multiple remarskAndre Heinecke1-0/+88
* lang/qt/tests/t-remarks.cpp (testMultipleRemarks): New.
2019-11-04cpp: Add API to obtain mutliple remarksAndre Heinecke2-0/+20
* lang/cpp/src/key.cpp, lang/cpp/src/key.h (UserID::remarks): New. * NEWS: Mention this. -- This can be useful if we want to show remarks made by others, too. For: GnuPG-Bug-Id: T4734
2019-11-04qt,tests: Move remarks test out and extend itAndre Heinecke3-114/+325
* lang/qt/tests/t-various.cpp (testRemarks): Move out. * lang/qt/tests/t-remarks.cpp: New. * lang/qt/tests/Makefile.am: Update accordingly. -- While t-various is nice to add a quick test for more extensive stuff it is better to move it in its own test. This also tests with a key that has only a single uid.
2019-11-04cpp: Fix dupe_ok state for single uidAndre Heinecke1-0/+1
* lang/cpp/src/gpgsignkeyeditinteractor.cpp (makeTable): Add transition from command to dupe_ok
2019-11-01qt: Allow adding empty remarksAndre Heinecke1-1/+1
* lang/qt/src/qgpgmesignkeyjob.cpp (sign_key): Allow empty remarks.
2019-11-01cpp: Minor optimization in remark lookupAndre Heinecke1-2/+6
* lang/cpp/src/key.cpp (UserID::remark): Use C-API. -- The other parts of that function already use the C API so we can also avoid function calls for the keyListMode.
2019-11-01cpp: Fix adding duplicated sigs on multiple uidsAndre Heinecke1-0/+5
* lang/cpp/src/gpgsignkeyeditinteractor.cpp: Add another state DUPE_OK2 to allow gpg looping over all uids. -- When duplicated signatures should be added to multiple user ids GnuPG will ask for each uid so we have to add a transition for that. GnuPG-Bug-Id: T4734
2019-11-01cpp: Add env var to control editinteractor debugAndre Heinecke1-2/+17
* lang/cpp/src/editinteractor.cpp (EditInteractor::Private::Private): Read "GPGMEPP_INTERACTOR_DEBUG" env var. (EditInteractor::Private::~Private): Close debug file. -- While it was possible for the application to control the debug through setDebugChannel it is often times helpful to just debug without changing the application using GPGME
2019-10-29qt,tests: Add test for remarksAndre Heinecke1-0/+111
* lang/qt/tests/t-various.cpp (testRemark): New.
2019-10-29qt: Extend signkeyjob to handle remarks and dupsAndre Heinecke3-3/+56
* lang/qt/src/qgpgmesignkeyjob.cpp: Handle remarks and dupeOK. * lang/qt/src/signkeyjob.h (SignKeyJob::setDupeOk), (SignKeyJob::setRemark): New. -- This API makes it easy for Kleopatra to add remarks for: GnuPG-Bug-Id: T4734
2019-10-29cpp: Add support for multiple keysigs in editAndre Heinecke2-1/+19
* lang/cpp/src/gpgsignkeyeditinteractor.cpp (GpgSignKeyEditInteractor::setDupeOk): New. (makeTable): Add new tansitions. (SignKeyState): Add DUPE_OK Status. (GpgSignKeyEditInteractor::action): Handle DUPE_OK. (GpgSignKeyEditInteractor::Private::Private): Carry flag. -- When extended-edit is enabled this can be used to answer the "dupe_ok" query from the edit-key with yes. This is for: GnuPG-Bug-Id: T4734
2019-10-29cpp: Add convenience API to obtain remarksAndre Heinecke2-0/+67
* lang/cpp/src/key.h, lang/cpp/src/key.cpp (UserID::remark): New. -- A remark made by one key on another is a signature notation on a user id certification signature with the name "[email protected]". This helps with: GnuPG-Bug-Id: T4734
2019-10-29cpp: Minor coding style fixAndre Heinecke1-3/+2
--
2019-07-12python: doc: Remove generated files, put rules in Makefile.NIIBE Yutaka13-8017/+39
* lang/python/doc/Makefile.am (EXTRA_DIST): Remove files not distributed like files under meta. * Add rules to generate .rst and .texi files. * lang/python/doc/rst: Remove .rst files to be generated. * lang/python/doc/texinfo: Remove .texi files to be generated. GnuPG-bug-id: 4275 Signed-off-by: NIIBE Yutaka <[email protected]>
2019-07-12python: doc: Add suffix for org files.NIIBE Yutaka6-0/+0
Signed-off-by: NIIBE Yutaka <[email protected]>
2019-07-03js: improve connection checkMaximilian Krambach2-25/+47
-- * Connection.js: In some cases, the browser disconnect does not happen inmediately (e.g. wrong extension for the app). I added a delay of 25 ms to see if the connection was closed by the browser. Also, I tried to make the checkConnection more readable.
2019-06-19js: Error handling for browser errorsMaximilian Krambach4-27/+99
-- * Connection.js - Add some meaningful nativeMessaging feedback for failing communication due to misconfiguration or other browser-originated fails - add an "isDisconnected" property - "isNativeHostUnknown" tries to match browser's feedback string if the browser does not find gpgme-json * init.js - initialization will now reject with a more meaningful error if the configuration is not set up or other browser-based errors (chrome.runtime.lastError) are present. This should speed up the normal initialization (not having to waiting for a timeout any more in case of improper setup) * errors.js - CONN_NATIVEMESSAGE: New error that passes the browser's nativeMessaging error - CONN_NO_CONFIG: native messaging error indicating that the nativeMessaging host was not set up properly * unittests.js: - added the "isDisconnected" property to the startup tests - added tests for proper behavior of connection checks
2019-06-13python: Fix regression in t-decrypt-verify test.Werner Koch1-11/+11
* lang/python/tests/t-decrypt-verify.py: Comment recent changes. -- Fixes-commit: bd2d282e572b5d02669238c9e087259b85638477 GnuPG-bug-id: 4276
2019-06-13python: Set a default-key into gpg.conf for the tests.Werner Koch1-2/+1
* lang/python/tests/Makefile.am (gpg.conf): Set a default key. -- It seems we need to set a default key because at least t-sign.py does not specify the key to use and we do not want to rely on the order of keys in the keyring. Also Fixes-commit: f3ca2c9ce9fd4a03e293065f10b92589a7e642d6 gpg 2.0 is end-of-life and we don't need these extra options anymore. In fact they for the use of some gpg version and don't use the version gpgconf knows about. This also aligns the python tests to what we use for the C test suite. Signed-off-by: Werner Koch <[email protected]>
2019-06-04python: Fix typo in DecryptionError exception.NIIBE Yutaka1-3/+3
* lang/python/src/errors.py (DecryptionError): Rename from DeryptionError. (UnsupportedAlgorithm): Use DecryptionError. -- GnuPG-bug-id: 4478 Reported-by: Jan Girlich Signed-off-by: NIIBE Yutaka <[email protected]>
2019-05-06python: Make EXTRA_DIST files explicitAndre Heinecke4-5/+171
* configure.ac: Configure new Makefiles. * lang/python/Makefile.am: Remove dirs from extra dist and use subdirs. * lang/python/examples/Makefile.am, lang/python/src/Makefile.am, lang/python/doc/Makefile.am: New. Files that list EXTRA_DIST files. -- This is similar to what lang/js does by explicitly listing the files. This ensures that we have clean distribution tarballs without accidentall additions that just lay in the directory. GnuPG-Bug-Id: T4481
2019-05-06Python, doc: Minor style improvementAndre Heinecke1-8/+9
* lang/python/src/core.py (Context): Retab and shorten max line length.
2019-05-03cpp: Fix initialization warningAndre Heinecke1-1/+1
* lanc/cpp/src/gpggencardkeyinteractor.cpp (GpgGenCardKeyInteractor::Private): Fix initialization warning.
2019-05-03python: stop raising BadSignatures from decrypt(verify=True)dkg/fix-T4276Daniel Kahn Gillmor2-13/+10
* src/core.py (decrypt): filter out signatures with errors from the returned verify_result, but avoid raising BadSignatures * tests/t-decrypt-verify.py: ensure that only a single signature is returned when evaluating cipher-3.asc, since the other signature is unknown. -- This change preserves the invariant that decrypt() only ever returns valid signatures in the verify_result, but it avoids unnecessary errors in the face of the presence of an additional bad signature. GnuPG-bug-id: 4276 Signed-off-by: Daniel Kahn Gillmor <[email protected]>
2019-05-03python/tests: try to decrypt and verify new test dataDaniel Kahn Gillmor2-0/+21
* lang/python/tests/t-decrypt.py: test decryption of cipher-3.asc and cipher-no-sig.asc * lang/python/tests/t-decrypt-verify.py: test decryption and verification of cipher-3.asc and cipher-no-sig.asc -- note that this introduces a failed test -- decrypt-verify.py misbehaves on cipher-3.asc by throwing a BadSignature even though GnuPG-bug-id: 4276 Signed-off-by: Daniel Kahn Gillmor <[email protected]>
2019-05-03python: make it easier to run a limited number of testsDaniel Kahn Gillmor1-1/+1
* lang/python/tests/Makefile.am: prefer py_tests from the environment if present. -- I'm trying to make it nicer/quicker to hack on the testsuite for python bindings. With this change, if you're improving the python bindings test suite, you can selectively run only a few specific tests like so: lang/python$ make check py_tests='t-decrypt.py t-decrypt-verify.py' Signed-off-by: Daniel Kahn Gillmor <[email protected]>
2019-04-24cpp: Add wrapper for gpgme_set_global_flagAndre Heinecke2-0/+8
* lang/cpp/src/context.cpp (setGlobalFlag): New. * lang/cpp/src/global.h (setGlobalFlag): Export it. -- GnuPG-Bug-Id: T4471
2019-03-26Release GPGME 1.13.0gpgme-1.13.0Werner Koch1-1/+1
* configure.ac: Bump LT versions. For C to C33/A22/R0. For C++ to C15/A9/R0. For Qt to C10/A3/R3. Signed-off-by: Werner Koch <[email protected]>
2019-03-26cpp: Fix GenCardKeyInteractor and extend itAndre Heinecke2-2/+139
* NEWS: Mention interface change. * lang/cpp/src/gpggencardkeyinteractor.cpp (GpgGenCardKeyInteractor::setAlgo): New. (GpgGenCardKeyInteractor::action), (GpgGenCardKeyInteractor::nextState: Handle new interface. -- Tested that this workes with the old interface of GnuPG 2.2.5 and the new interface since GnuPG 2.2.6 GnuPG-Bug-Id: T4428
2019-03-20qt: Handle diagnostic audit log for CMSAndre Heinecke1-1/+7
* lang/qt/src/threadedjobmixin.cpp(_detail::audit_log_as_html): Handle CMS audit log.
2019-03-13cpp: Fix Error::hasSystemErrorAndre Heinecke1-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
2019-02-21cpp: Add ostream operators for import resultAndre Heinecke2-1/+46
* lang/cpp/src/importresult.cpp: Add ostream operators. * lang/cpp/src/importresult.h: Update accordingly.
2019-02-21cpp: Make GpgME::Data::toKeys really constAndre Heinecke1-0/+2
* lang/cpp/src/data.cpp (GpgME::Data::toKeys): Rewind afterards. -- This fixes unexpected behavior that the seek pointer is changed after calling the const toKeys.
2019-02-10python: examplesBen McGinnes1-0/+131
* A rather obvious variant of the existing key import examples, except directed at Mailvelope's keyserver. * Yeah, Werner, I know ... but it exists because I used it and there's no harm in sharing. Tested-by: Ben McGinnes <[email protected]> Signed-off-by: Ben McGinnes <[email protected]>
2019-01-30python: docsBen McGinnes3-6/+6
* Version bump in preparation for whenever GPGME 1.13.0 happens. * Ran the post_installer.py for docs preparation again. Signed-off-by: Ben McGinnes <[email protected]>
2019-01-27python: post installer scriptBen McGinnes1-0/+4
* Removed auto-generated .texi files from doc/src/ so only the corrected versions are left. * Which means now it is complete, but with the initial work to expand it with info file generation later.
2019-01-27python: post installer docs fix scriptBen McGinnes10-15/+53
* Moved post_installer.py into the examples/howto/ directory. * Added instructions for its use to the Python Bindings HOWTO. * Ran it as intended from the lang/python/ directory in order to both prove it works and quickly and easily get the updated howto replicated. Also to fix all those .texi files. Tested-by: Ben McGinnes <[email protected]> Signed-off-by: Ben McGinnes <[email protected]>
2019-01-16build: With LD_LIBRARY_PATH defined, use --disable-new-dtags.NIIBE Yutaka2-2/+2
* configure.ac (LDADD_FOR_TESTS_KLUDGE): New for --disable-new-dtags. * tests/Makefile.am (LDADD): Use LDADD_FOR_TESTS_KLUDGE. * lang/cpp/tests/Makefile.am, lang/qt/tests/Makefile.am: Likewise. * tests/gpg/Makefile.am, tests/gpgsm/Makefile.am: Likewise. * tests/json/Makefile.am, tests/opassuan/Makefile.am: Likewise. -- GnuPG-bug-id: 4298 Signed-off-by: NIIBE Yutaka <[email protected]>
2019-01-09qt: Use tofu conflict test keys without expiryAndre Heinecke1-28/+30
* lang/qt/tests/t-tofuinfo.cpp: Use new test keys without expiry. -- The old keys expired on 2019-01-06. GnuPG-Bug-Id: T3815
2019-01-02python: post installer doc fix scriptBen McGinnes1-20/+9
* Got rid of the bash bit in the comments. * Made the final printed instructions far more obvious. Signed-off-by: Ben McGinnes <[email protected]>
2019-01-02python: examplesBen McGinnes4-6/+3
* Fixed inter-edit.py so it will actually work now. * made 3 others executable. * Fixed the semantics of assuan.py's instructions. Tested-by: Ben McGinnes <[email protected]> Signed-off-by: Ben McGinnes <[email protected]>
2018-12-26python: examplesBen McGinnes4-6/+3
* Fixed inter-edit.py so it will actually work now. * made 3 others executable. * Fixed the semantics of assuan.py's instructions. Tested-by: Ben McGinnes <[email protected]> Signed-off-by: Ben McGinnes <[email protected]>
2018-12-24python: docs processingBen McGinnes2-6/+175
* Added some EPUB specific config options to the Sphinx config file which might help reduce some of Sphinx's more stupid default errors with EPUB validation. * Added lang/python/post_installer.py script for automating the generation of .texi and .rst "source" files from the real source files written in Org mode. Includes recreating the Sphinx Makefile which is excluded due to the m4 toolchain in parent directories, it also handles the rewriting of the reST index file properly and rewrites the .texi files so they don't impale themselves on Unicode. Tested-by: Ben McGinnes <[email protected]> Signed-off-by: Ben McGinnes <[email protected]>
2018-12-21python: docsBen McGinnes8-51/+193
* Found a bug in org-mode's export to texinfo function which will require either manual modification of each file or a customs sed run over the generated files for all updates. * Manually updated the current files for now, but will need to add some post-install processing scripts for future use (I already have some of these for my specific setup, they just need to be made a little more generic and platform independent for here). Tested-by: Ben McGinnes <[email protected]> Signed-off-by: Ben McGinnes <[email protected]>