aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* 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]>
* w32: Use CancelSynchronousIo in destroy_reader.Werner Koch2018-11-013-4/+41
| | | | | | | | | | | * src/w32-util.c (_gpgme_w32_cancel_synchronous_io): New. * src/w32-io.c (destroy_reader): Use it here. -- This has not been tested but should on Vista and later help to fix a possible hang. Signed-off-by: Werner Koch <[email protected]>
* w32: Merge all the object tables of w32-io into one.Werner Koch2018-11-011-264/+245
| | | | | | | | | | * src/w32-io.c (fd_table_size): New. Used in most places instead of the MAX_SLAFD constant. (reader_table, writer_table, notify_table): Merge them into ... (fd_table): this table. Chnage all affected code to take just one lock. Signed-off-by: Werner Koch <[email protected]>
* w32: Remove unused arg from two functions.Werner Koch2018-10-311-32/+47
| | | | | | | * src/w32-io.c (find_reader, find_writer): Remove unused start_it arg. It is always passed as true. Change callers. Signed-off-by: Werner Koch <[email protected]>
* w32: Remove all support for WindowsCEWerner Koch2018-10-3122-1746/+15
| | | | | | | | | | | | | | | | | | | | | | | | | * configure.ac: Remove WindwosCE support. * contrib/: Remove all; it was only used for WindowsCE. * src/w32-ce.c, src/w32-ce.h: Remove files. * src/Makefile.am (system_components): Remove these files. * src/ath.c, src/ath.h: Remove W32CE support. * src/data-compat.c (gpgme_data_new_from_filepart): Ditto. (gpgme_data_new_from_file): Ditto. * src/debug.c (debug_init, _gpgme_debug): Ditto. * src/gpgme-tool.c (gpgme_server): Ditto. (main): Ditto. * src/priv-io.h: Do not include w32-ce.h. * src/util.h: Remove WindowsCE support. * src/w32-io.c: Ditto. * src/w32-util.c: Ditto. * src/debug.h (TRACE_SUC4): New. -- There is no more hardware to test our code, the support for Windows CE terminated along time ago. Note that our code worked only with the old WindowsCE with that overall system limit of 31 processes. Signed-off-by: Werner Koch <[email protected]>
* w32: Remove cruft in w32-io from WindowsME times.Werner Koch2018-10-311-29/+0
| | | | | | | | | | | | * src/w32-io.c (set_synchronize): Remove. (create_reader, create_writer): No need for set_synchronize. -- The set_synchronize dates back to 2001 at a time when I wrote the Windows support on WindowsME and Windows2000. Maybe this was required then due to bugs in that old NT or partly NT based Windows versions. Signed-off-by: Werner Koch <[email protected]>
* docs: python docs restructureBen McGinnes2018-10-304-71/+168
| | | | | * Moved the what's new section out of the HOWTO (mostly), in anticipation of expanding the docs to be more than merely a HOWTO.
* docs: pythonBen McGinnes2018-10-303-1/+14
| | | | | * dropped the ".org" extension and added a mode line for each file as this will make scripting format conversions a lot easier.
* w32: Fix previous commit.Werner Koch2018-10-301-3/+2
| | | | | | | * src/w32-io.c (_gpgme_io_spawn): Move freeing of TMP_NAME behind its use in an error handling. Signed-off-by: Werner Koch <[email protected]>
* core,w32: Fix memleak of tmp_name in w32-ioAndre Heinecke2018-10-291-0/+7
| | | | | | | * src/w32-io.c (_gpgme_io_spawn): Free tmp_name. -- GnuPG-Bug-Id: T4238
* tests: Add repeat argument to run-verifyAndre Heinecke2018-10-291-68/+92
| | | | | | | * tests/run-verify.c (main): Add repeat argument. -- This helps reproducing rare / random crashes.
* core: Do not crash if CMS plaintext is ignoredAndre Heinecke2018-10-291-3/+11
| | | | | | | | | | | | | * src/engine-gpgsm.c (gpgsm_verify): Fix handling both plaintext and signed_text as NULL. -- Previously if plaintext was NULL and signed_text was NULL it would set MESSAGE_FD to NULL which resulted in a crash. Ignoring the plaintext of an opaque signature might make sense in some cases and engine-gpg handles it.
* cpp,tests: Add another test runnerAndre Heinecke2018-10-292-1/+188
| | | | | | | | * lang/cpp/tests/run-verify.cpp: New. * lang/cpp/tests/Makefile.am: Update accordingly. -- Add another test runner which helps to find problems on windows.
* cpp: Add some convenience functionsAndre Heinecke2018-10-255-0/+49
| | | | | | | | | | | | | | | | * 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.
* docs: python howtoBen McGinnes2018-10-231-5/+5
| | | | * Fixed a few spelling and grammatical errors.
* Python: docs tweaksBen McGinnes2018-10-212-15/+39
| | | | | | | * Fixed a minor error in how the reST version of the HOWTO is generated. * Updated the help() in __init__.py with a little more detail as to why not to use the lower level functions.
* python bindings: callback testBen McGinnes2018-10-201-2/+30
| | | | | | | * lang/python/tests/t-callbacks.py: Updated test logic to try generating a key which expires in 2099 and if that fails then fallback to an expiration in 2037 in an attempt to catch the 32-bit systems.
* core: Fix segv in genkey when no endtag is provided.Werner Koch2018-10-181-2/+6
| | | | | | | | | | | | * src/genkey.c (get_key_parameter): Provide a fallback ENDTAG. -- It would actually be more correct to return an error in this case but it is possible tha there are users who did not provide an endtag and out of luck they also didn't trigger a segv. GnuPG-bug-id: 4192 Signed-off-by: Werner Koch <[email protected]>
* core: Return an error if NULL is provided for genkey's parms.Werner Koch2018-10-182-3/+6
| | | | | | | | | | | | * src/debug.c (_gpgme_debug_buffer): Bail out of BUF is NULL. * src/genkey.c (gpgme_op_genkey): Do no deref a NULL in TRACE_LOGBUF. (gpgme_op_genkey_start): Ditto. Return an error if PARMS is NULL. -- This robustness patch should solve one part of GnuPG-bug-id: 4192 Signed-off-by: Werner Koch <[email protected]>
* python: do not export HAVE_CXX11 definitionDaniel Kahn Gillmor2018-10-181-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | * lang/python/gpgme.i: ignore HAVE_CXX11 in SWIG interface -- If there are two distinct builds (a) and (b) of gpgme which both build python bindings, and build (a) also happens to build the C++ bindings, then the generated gpg/gpgme.py file from build (a) will not be usable with the .so generated in build (b), despite them being exactly the same, and having nothing to do with C++. In particular, it will fail with: ----------- File "…/gpg/__init__.py", line 99, in <module> from . import core File "…/gpg/core.py", line 10, in <module> from . import gpgme File "…/gpg/gpgme.py", line 152, in <module> HAVE_CXX11 = _gpgme.HAVE_CXX11 AttributeError: module 'gpg._gpgme' has no attribute 'HAVE_CXX11' ----------- By asking SWIG to ignore this definition, we stabilize the generated .py and the .so, ensuring that they are more cleanly interoperable.
* doc: convert more links to equivalent https:// URLsDaniel Kahn Gillmor2018-10-184-6/+6
| | | | | | -- Signed-off-by: Daniel Kahn Gillmor <[email protected]>
* doc: convert more http:// links to https://Daniel Kahn Gillmor2018-10-1811-18/+18
| | | | | | -- Signed-off-by: Daniel Kahn Gillmor <[email protected]>
* doc: use https:// for www.gnu.orgDaniel Kahn Gillmor2018-10-18137-147/+147
| | | | | | -- Signed-off-by: Daniel Kahn Gillmor <[email protected]>
* js: increase default startup timeoutMaximilian Krambach2018-10-171-1/+1
| | | | | | | -- * src/index.js: change the init default if none is given, so that all initialization defaults line up to 1000 miliseconds
* python: Auto-check for all installed python versions.Werner Koch2018-10-172-37/+16
| | | | | | | | | | | | | | | | * m4/python.m4 (AM_PATH_PYTHON): Add a 4th arg. * configure.ac (available_languages): Remove separate python2 and python3 and keep just python. Simplify test for pythons. Use an explicit list of python versions to test. -- This seems to be a starightforward chnage to support more than two python versions. I am not sure why we had that complicated thing before. On my box I get builds and run tests for 2.7, 3.4 and 3.5. If 3.6, 3.7 or 3.8 are installed they should also work. GnuPG-bug-id: 3354 Signed-off-by: Werner Koch <[email protected]>
* core: Really remove CR from version output.Werner Koch2018-10-161-1/+1
| | | | | | | | * src/version.c (_gpgme_get_program_version): Fix test. -- Fixes-commit: 6bde056355796f15b6e6954372e87f349847515b Signed-off-by: Werner Koch <[email protected]>
* cl: Add missing fileWerner Koch2018-10-121-0/+31
| | | | | | | | -- Fixes-commit: 85d7af8ff2f6afd63701079e23f31be08d58a15d My fault, sorry. Signed-off-by: Werner Koch <[email protected]>
* cl: Several fixesGuillaume LE VAILLANT2018-10-125-173/+386
| | | | | | | | | | | | | | | | | | | -- * Use wrapper types calling translation functions instead of TRANSLATE-{FROM,TO}-FOREIGN methods as they seem not to be called in some cases. * Use the (:STRUCT SOME-C-STRUCT) notation instead of the deprecated direct reference to SOME-C-STRUCT. * Add missing values in enums and bit fields. * Use cffi-grovel to define system types (SIZE-T, OFF-T, etc). * Wrap GPGME-DATA-T in a class (like contexts). * Use the FINALIZE function from trivial-garbage to free the C objects for contexts, keys and data automatically. * Make DATA-READ-CB and DATA-WRITE-CB run faster. * Update the README file. Signed-off-by: Guillaume LE VAILLANT <[email protected]>
* Register DCO for Guillaume LE VAILLANTWerner Koch2018-10-121-0/+3
| | | | --
* build: Let configure create the VERSION file.NIIBE Yutaka2018-10-104-66/+84
| | | | | | | | | | | | * autogen.sh: Update from libgpg-error. * configure.ac: Use mym4_version to create VERSION file. * Makefile.am (dist-hook): Do not create VERSION. (EXTRA_DIST): Add VERSION. -- GnuPG-bug-id: 3283 Signed-off-by: NIIBE Yutaka <[email protected]>
* cpp: Add KeyListMode::LocateAndre Heinecke2018-10-091-0/+1
| | | | | | | * cpp/src/global.h (KeyListMode): Add Locate. -- Similar to locate in core.
* cpp: Add first manual testsAndre Heinecke2018-10-096-1/+336
| | | | | | | | | | | | | | * lang/cpp/Makefile.am: Add tests subdir. * lang/cpp/tests/Makefile.am: New. * lang/cpp/tests/README, lang/cpp/tests/run-getkey.cpp, lang/cpp/tests/run-keylist.cpp: New. * configure.ac: Configure tests makefile. -- The autotests for c++ live in lang/qt/tests these tests are more for manual experiments to validate some functionality.
* core: Add trust-model flagAndre Heinecke2018-10-095-0/+71
| | | | | | | | | | | | | | | | | | | | | | | | * src/context.h (gpgme_context): Extend with trust_model. * src/engine-gpg.c (engine_gpg): Extend with trust_model. (gpg_set_engine_flags): Take trust_model from context. (build_argv): Handle trust_model. (gpg_release): Free trust_model. * src/gpgme.c (gpgme_set_ctx_flag): Handle trust-model flag. (gpgme_release): Release trust-model. * doc/gpgme.texi: Document new flag for gpgme_set_ctx_flag. (Context Flags): New subsection for the context flags. * tests/run-keylist.c (show_usage, main): Add new --trust-model parameter. -- This gives a GPGME user fine grained control over the trust-model. Changing the trust model for only a single application depends on: GnuPG-Bug-Id: T4134 Maniphest Tasks: T4134 Differential Revision: https://dev.gnupg.org/D466
* 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.
* core: Ensure r_key init in gpgme_get_keyAndre Heinecke2018-10-091-2/+3
| | | | | | | | | * src/keylist.c (gpgme_get_key): Move r_key init above the first invalid value check. -- This fixes the case where someone passes an unitialized r_key and no fingerprint.
* qt, tests: Add test for single get keyAndre Heinecke2018-10-091-0/+33
| | | | | | | * lang/qt/tests/t-keylist.cpp (testGetKey): New. -- Added this to check if there was a memleak in that function.
* Post release updatesWerner Koch2018-10-082-1/+5
| | | | --
* Release 1.12.0gpgme-1.12.0Werner Koch2018-10-086-11/+30
| | | | | | | | | | * configure.ac: Bump core LT version to C32/A21/R0. Bump C++ LT version to C14/A8/R0. * lang/qt/tests/Makefile.am (CLEANFILES): Add reader status files. * Makefile.am (EXTRA_DIST): Add conf/whatisthis. Signed-off-by: Werner Koch <[email protected]>
* build: Update .gitignoreWerner Koch2018-10-051-2/+2
| | | | --