aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* qt,cpp: Consistently use nullptr and overrideAndre Heinecke2018-12-0356-333/+336
| | | | | | | | | | | | | | | * 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.
* doc: Minor comment cleanups.Werner Koch2018-12-033-12/+8
| | | | | | -- Signed-off-by: Werner Koch <[email protected]>
* python: documentation fixesBen McGinnes2018-11-304-3/+9
| | | | | | | * Typographic and whitespace error correction pertaining to the previous update. Signed-off-by: Ben McGinnes <[email protected]>
* python: documentationBen McGinnes2018-11-3019-124/+542
| | | | | | | | | | | * Added long description to setup.py.in. * Added maintenance mode details with clarification for what type of things would be a bug as far as MM is concerned and what wouldn't be. ** Includes a not too subtle hint directed towards the donations page. * Miscellaneous tightening of documentation. Signed-off-by: Ben McGinnes <[email protected]>
* tests, json: Make them run on debian stableAndre Heinecke2018-11-281-2/+2
| | | | * tests/json/t-json.c (main): Relax version check a bit.
* python docs: checking key signaturesBen McGinnes2018-11-263-25/+260
| | | | | | | | | | * Added instructions for checking key certifications or key signatures (depending on preferred terminology). * Added pendulum module to recommended installations, but not to requirements. Tested-by: Ben McGinnes <[email protected]> Signed-off-by: Ben McGinnes <[email protected]>
* python: docs updateBen McGinnes2018-11-226-24/+287
| | | | | | * Added documentation for the new methods added to gpgme.version. * Removed the Flask based advanced use case from the what-is-new section as that type of code will not be added here.
* python: version as integersBen McGinnes2018-11-221-0/+20
| | | | | | | | * lang/python/version.py.in: added gpg.version.versionintlist * If gpg.version.versionintlist[2] ever returns -1 then there's a serious problem with the build and it should be lodged as a bug if it's repeatable. Seeing this should never happen, but checking for it is better than not doing so.
* core: Fix format string errors in w32-io.c and use of TRACE_SUC.Werner Koch2018-11-191-19/+23
| | | | | | * src/w32-io.c: Fix use of TRACE_SUC. Fix some format strung errors. Signed-off-by: Werner Koch <[email protected]>
* python: import typeBen McGinnes2018-11-191-7/+0
| | | | | | | | * Fixed bug T4242 and tested that dropping "Import" in favour of "import_type" does indeed work just fine. Tested-by: Ben McGinnes <[email protected]> Signed-off-by: Ben McGinnes <[email protected]>
* python: import constantBen McGinnes2018-11-193-14/+14
| | | | | | | * lang/python/src/constants/__init__.py: dropped use of Import capitalisation and renamed lang/python/src/constants/import.py to lang/python/src/constants/import_type.py to address bug T4242. * lang/python/doc/src/gpgme-python-howto: minor docs updates.
* core: Protect the trace macros for fun and profit.Werner Koch2018-11-1611-77/+114
| | | | | | | | * src/debug.h: Protect macros using. (_trace_err, _trace_sysres, _trace_syserr): New helper inline functions. Signed-off-by: Werner Koch <[email protected]>
* core: Fix a LF problem in the new debug fucntion.Werner Koch2018-11-161-3/+6
| | | | | * src/debug.c (_gpgme_debug): Print a LF for an empty FORMAT unless we are in legacy mode.
* core: Fix format string errors in trace macrosWerner Koch2018-11-1611-29/+30
| | | | | | -- Signed-off-by: Werner Koch <[email protected]>
* core: Remove old debug helper functionWerner Koch2018-11-166-95/+59
| | | | | | | * src/debug.c (_gpgme_debug): Remove. (_gpgme_debugf): Rename to _gpgme_debug. Signed-off-by: Werner Koch <[email protected]>
* core: Simplify the trace maros by using variadics.Werner Koch2018-11-1646-570/+551
| | | | | | | | | | | | | | | | * src/debug.h (TRACE_BEG, TRACE_LOG, TRACE_SUC): Use variadic macros and remove the TRACE_BEG1 et al. Change all users to always pass a format string. (TRACE): Ditto. * src/debug.c (_gpgme_debugf): New. * configure.ac <GCC>: Add -Wno-format-zero-length. -- This makes it easier for use to enable format checks. The zero-length format is required to allow for an empty format due to the comman problematic of __VA_ARGS__. Signed-off-by: Werner Koch <[email protected]>
* Add SPDX identifiers to most source filesWerner Koch2018-11-16147-2098/+2160
| | | | | | -- Signed-off-by: Werner Koch <[email protected]>
* tests: Add run-threaded for multithread testsAndre Heinecke2018-11-152-1/+680
| | | | | | | | | | * tests/Makefile.am (run-threaded): Add. * tests/run-threaded.c: New. -- This test is intended to help detect race conditions or other multithread problems. It can also be used to put the whole GnuPG system under extreme load.
* tests,json: Clean openpgp-revocs.dAndre Heinecke2018-11-151-0/+1
| | | | * tests/json/clean-local: Remove revocs.d
* tests,json: Move version check into t-jsonAndre Heinecke2018-11-152-103/+106
| | | | | | | | | | | | | * tests/gpg/t-support.h (check_gpg_version, compare_versions), (parse_version_string, parse_version_number): Remove version check code. * tests/json/t-json.c (check_gpg_version, compare_versions), (parse_version_string, parse_version_number): Add. -- t-support header was not a good place for this. It should go into a library e.g. gpgrt in the future. For now we can keep it close to where it is needed.
* tests,json: Add sig-notations testAndre Heinecke2018-11-144-1/+62
| | | | | | | * tests/json/t-sig-notations.in.json, tests/json/t-sig-notations.out.json: New * tests/json/Makefile.am (EXTRA_DIST): Add files. * tests/json/t-json.c: Register it.
* tests,json: Fix distcheckAndre Heinecke2018-11-141-2/+3
| | | | | * tests/json/Makefile.am (EXTRA_DIST): Add inital and final scripts. (t_json_SOURCES): Don't use cJSON.o as source.
* tests,json: Add more testsAndre Heinecke2018-11-146-0/+50
| | | | | | | | | | | | * t-config-opt.in.json, t-config-opt.out.json, t-import.in.json, t-import.out.json, t-sign.in.json, t-sign.out.json: New. -- These should actually have been in a previous commit as they are already registered.
* tests,json: Add missing files and chunking testAndre Heinecke2018-11-146-1/+125
| | | | | | | | | | | * tests/json/Makefile.am, tests/json/final.test, tests/json/initial.test: New. * tests/json/t-chunking.in.json, tests/json/t-chunking.out.json: New test. * tests/json/t-json.c: Register new test. -- Oops..
* tests,json: Fix match if the first child differsAndre Heinecke2018-11-141-1/+13
| | | | | | | | | | | * tests/json/t-json.c (test_contains): Try all siblings of the haystack child. -- This fixes the case where we don't match against the first child because the order might have changed or a new element was inserted at the top. Then we have to try out also all the siblings.
* tests,json: Add the bulk of testsAndre Heinecke2018-11-1425-1/+443
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * t-json.c (tests): Register new tests. * t-createkey.in.json, t-createkey.out.json, t-decrypt-verify.in.json, t-decrypt-verify.out.json, t-decrypt.in.json, t-decrypt.out.json, t-delete.in.json, t-delete.out.json, t-encrypt-sign.in.json, t-encrypt-sign.out.json, t-encrypt.in.json, t-encrypt.out.json, t-export-secret-info.in.json, t-export-secret-info.out.json, t-export.in.json, t-export.out.json, t-json.c, t-keylist-secret.in.json, t-keylist-secret.out.json, t-keylist.in.json, t-keylist.out.json, t-verify.in.json, t-verify.out.json, t-version.in.json, t-version.out.json: New. -- Except for help and getmore there is now a test for each command.
* tests,json: Add wildcard string matchingAndre Heinecke2018-11-141-1/+3
| | | | | | | | | * tests/json/t-json.c (test_contains): When searching for "*" accept every string. -- This allows it to write tests that check for the existence of a string value but don't care about the contents. E.g. for Data.
* tests,json: Skip tests for older GnuPG versionsAndre Heinecke2018-11-141-0/+8
| | | | | | | | | | | * tests/json/t-json.c (main): Skip if version is not at least 2.2.0 -- In the past new tests often failed when a modern GPGME was used with old GnuPG's. This should avoid the hassle for packagers without the requirement that we test against old versions.
* tests,json: Suffix .json to test patternAndre Heinecke2018-11-143-2/+2
| | | | | * tests/json/t-config.in, tests/json/t-config.out: Renamed. * t-json.c (run_test): Use new naming pattern.
* tests,gpg: Add version check hlp to t-supportAndre Heinecke2018-11-141-0/+104
| | | | | | | | | | * t-support.h (parse_version_number, parse_version_string) (compare_versions): New. Copy&Paste from src/version.c (check_gpg_version): New helper to check for a gpg version. -- This should make it easier to write tests that e.g. rely on modern gnupg features.
* tests,json: Improve verbose mode and add verbose 2Andre Heinecke2018-11-141-13/+25
| | | | | * tests/json/t-json.c (main): Handle multiple verbose args. (test-contains): Improve verbose output
* tests,json: Fix and improve t-jsonAndre Heinecke2018-11-141-10/+17
| | | | | * tests/json/t-json.c (run_test): Terminate argv array correctly. (run_test): Note and handle empty response.
* tests: Add json testrunnerAndre Heinecke2018-11-145-1/+369
| | | | | | | | | | | | * configure.ac: Configure makefile. * tests/Makefile.am: Run json tests if gpg tests are run. * tests/json/t-json.c: New testrunner for json tests. * tests/json/t-config.in, tests/json/t-config.out: First test. -- The idea of this test runner is that it only looks for parts in the output. This should allow it to write robust tests that check for the basics in the output but don't fail when the output is extended or slightly changed.
* build: Update gpg-error.m4 and libassuan.m4.NIIBE Yutaka2018-11-132-26/+114
| | | | | | | * m4/gpg-error.m4: Update from master. * m4/libassuan.m4: Update from master. Signed-off-by: NIIBE Yutaka <[email protected]>
* Fix the previous commit.NIIBE Yutaka2018-11-121-0/+1
| | | | Signed-off-by: NIIBE Yutaka <[email protected]>
* build: Make gpgme.m4 use gpgrt-config with *.pc.NIIBE Yutaka2018-11-121-10/+48
| | | | | | | | | | | | * src/gpgme.m4 (_AM_PATH_GPGME_CONFIG): Use gpgrt-config with gpgme.pc when possible. (AM_PATH_GPGME_GLIB): Likewise with gpgme-glib.pc. -- Keeping AM_PATH_GPGME_PTHREAD, as is, untouched. Signed-off-by: NIIBE Yutaka <[email protected]>
* build: Provide gpgme-glib.pc too.NIIBE Yutaka2018-11-123-3/+17
| | | | | | | | | | | | * src/gpgme-glib.pc.in: New. * src/gpgme.pc.in (avail_lang): Remove. -- Provide gpgme-glib.pc for gpgme-glib library. The avial_lang information is no use because *.pc is for C. Signed-off-by: NIIBE Yutaka <[email protected]>
* build: Provide gpgme.pc, generated by configure.NIIBE Yutaka2018-11-124-6/+28
| | | | | | | | | | | | | | | | | | | | | | | * configure.ac: Generate src/gpgme.pc. * src/Makefile.am (pkgconfigdir, pkgconfig_DATA): New. (EXTRA_DIST): Add gpgme.pc.in. * src/gpgme.pc.in: New. * src/gpgme-config.in: Use variables. -- Some usages of gpgme-config is not compatible to pkg-config style; The --glib option and --thread option which affect the output by --cflags or --libs are not supported by gpgme.pc. gpgme-config's embedding information for gpg-error and libassuan at the build time of gpgme is considered inflexible than pkg-config style. It is now handled by dependency of gpgme.pc (Requires field). To use gpgme.pc, newer libgpg-error (>= 1.33) and libassuan (>= 2.5.3) are required, which provide gpg-error.pc and libassuan.pc respectively. Signed-off-by: NIIBE Yutaka <[email protected]>
* spelling: fix misspellingsDaniel Kahn Gillmor2018-11-0848-141/+141
| | | | Signed-off-by: Daniel Kahn Gillmor <[email protected]>
* docs: python bindingsBen McGinnes2018-11-0614-215/+504
| | | | | | | | * Continued restructuring as part of moving beyond mere;y the HOWTO file. * Generated the alternative source files for reST and Texinfo. * Fixed some errors and updated links after moving the what's new section to two new files (yes, two).
* python examples: another importerBen McGinnes2018-11-061-4/+8
| | | | * Fixed a similar type of bug with the non-protonmail importer.
* python examples: protonmail hkp scriptsBen McGinnes2018-11-062-28/+22
| | | | * fixed a bug in the import try statement for both versions.
* gpg: Avoid error diagnostics with --override-session-key.Werner Koch2018-11-051-1/+8
| | | | | | | | * src/engine-gpg.c (gpg_decrypt): Add --no-keyring. -- GnuPG-bug-id: 3464 Signed-off-by: Werner Koch <[email protected]>
* docs: typoBen McGinnes2018-11-031-1/+1
| | | | * lang/python/doc/src/gpgme-python-howto: s/Revokinging/Revoking/g
* w32: Fix a few compiler warnings.Werner Koch2018-11-022-15/+15
| | | | | | | * src/debug.h (TRACE_SYSERR_NR): New. * src/w32-io.c: Fix compiler warnings. Signed-off-by: Werner Koch <[email protected]>
* w32: Log all errors from CloseHandle and WFSO in w32-io.Werner Koch2018-11-021-49/+70
| | | | | | | | * src/w32-io.c (close_handle, _close_handle): New macro and function; use in place of all CloseHandle calls. (wait_for_single_object, _wait_for_single_object): Likewise. Signed-off-by: Werner Koch <[email protected]>
* w32: Don't use CloseHandle on an arbitrary integer.Werner Koch2018-11-021-1/+1
| | | | | | | | | | | | | | * src/assuan-support.c (my_waitpid): Do not close the PID = it is not a handle. -- At some time in the distant past we might have used the process object as pid which obviously required a close. However this was changed and so what we did here was to close an arbitrary handle (one which matches the pid). GnuPG-bug-id: 4237 Signed-off-by: Werner Koch <[email protected]>
* w32: Revamp the closing of system objects.Werner Koch2018-11-021-119/+261
| | | | | | | | | | | | | | | | | | | | | | * src/w32-io.c (hddesc_t): New. (reader_context_s, writer_context_s): Replace file_sock and file_hd by the hddesc_t hdd. (fd_table): Ditto. Add want_reader and want_writer. (hddesc_lock): New lock variable. (new_hddesc, ref_hddesc): New. (release_hddesc): New. (reader, writer): Call release_hddesc. (create_reader, create_writer): Change for new hddesc scheme. (destroy_reader, destroy_writer): Replace closing by a call to release_hddesc. (_gpgme_io_pipe): Change for new hddesc scheme. (_gpgme_io_close): Ditto. (_gpgme_io_dup): Ditto. Use want_reader and want_writer. (_gpgme_io_socket): Change for new hddesc scheme. -- GnuPG-bug-id: 4237 Signed-off-by: Werner Koch <[email protected]>
* core: Print a dump of the I/O data only at level 8.Werner Koch2018-11-023-7/+18
| | | | | | | | | | | | * src/debug.h (TRACE_SUC3): New. (TRACE_LOGBUFX): New. * src/posix-io.c: Use TRACE_LOGBUFX instead of TRACE_LOGBUF. * src/w32-glib-io.c: Ditto. -- This will also be changed for w32-io as part of another commit. Signed-off-by: Werner Koch <[email protected]>
* w32: Fix and improve CancelSynchronousIo use.Werner Koch2018-11-021-4/+6
| | | | | | | | | * src/w32-util.c (_gpgme_w32_cancel_synchronous_io): Fix name of DLL and print trace info only on error. -- Fixes-commit: 63ba09b541dabbe838253926896e721cb9be564a Signed-off-by: Werner Koch <[email protected]>