aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Always use maintainer mode -Wno cflagsAndre Heinecke2019-05-031-15/+18
| | | | | | | | | | * configure.ac (CFLAGS): Move -Wno flags out of the maintainer mode. -- It makes sense to have more warnings in maintainer mode and not more warnings in release builds. GnuPG-Bug-Id: T4477
* cpp: Fix initialization warningAndre Heinecke2019-05-031-1/+1
| | | | | * lanc/cpp/src/gpggencardkeyinteractor.cpp (GpgGenCardKeyInteractor::Private): Fix initialization warning.
* tests: Add cms mode to run-importAndre Heinecke2019-05-021-2/+15
| | | | | * tests/run-import.c (show_usage): Add doc for cms / openpgp. (main): Handle protocol.
* cpp: Add wrapper for gpgme_set_global_flagAndre Heinecke2019-04-243-0/+11
| | | | | | | | * lang/cpp/src/context.cpp (setGlobalFlag): New. * lang/cpp/src/global.h (setGlobalFlag): Export it. -- GnuPG-Bug-Id: T4471
* core: Fix duplication of close_notify_handler for gpgsm.NIIBE Yutaka2019-04-191-2/+0
| | | | | | | | | | | | | * src/engine-gpgsm.c [!USE_DESCRIPTOR_PASSING] (gpgsm_new): Remove last call to _gpgme_io_set_close_notify. -- It is called just after the code in question for all cases. GnuPG-bug-id: 4456 Fixes-commit: dd21ec997cf4b6ba18538c63c728478110ad1f60 Signed-off-by: NIIBE Yutaka <[email protected]>
* core: Fix error return.NIIBE Yutaka2019-04-191-0/+1
| | | | | | * src/engine.c (_gpgme_set_engine_info): Add error return. Signed-off-by: NIIBE Yutaka <[email protected]>
* core,w32: Fix minor potential memleakAndre Heinecke2019-04-091-0/+2
| | | | | * src/w32-util.c (_gpgme_create_process_utf8): Free converted startup info strings.
* core,w32: Fix new w32-util functionsAndre Heinecke2019-04-091-3/+25
| | | | | | | | | | | | | | * src/w32-util.c (_gpgme_access): Respect mode parameter. (_gpgme_create_process_utf8): Convert startupinfo, too. -- This both did not show up in testing as we only use mode F_OK and STARTUPINFOA is basically the same as STARTUPINFOW. Fixes commit: a82e3a0ae57a48ba173e282a050680751006c074 GnuPG-Bug-Id: T4453
* core,w32: Improve handling of Unicode pathsAndre Heinecke2019-04-095-19/+128
| | | | | | | | | | | | | | | | | | | | | | * src/dirinfo.c (get_gpgconf_item): Use _gpgme_access. * src/posix-util.c (_gpgme_access): Add forward to normal access. * src/sys-util.h (_gpgme_access): New for posix and w32. * src/w32-io.c (_gpgme_io_spawn): Use _gpgme_crate_process_utf8. * src/w32-util.c (utf8_to_wchar, utf8_to_wchar0): The usual w32 conv. (find_program_in_dir): Use _gpgme_access. (find_program_at_standard_place): Use wchar API and convert to UTF-8. (_gpgme_access): Convert UTF-8 to wchar and use wchar API. (_gpgme_create_process_utf8): Convert UTF-8 to wchar and use wchar API. -- While we should not say that we have full support for unicode path installations of GnuPG, this ensures that GPGME works if GPGME itself is installed in a unicode path. e.g.: Libreoffice supports this. GnuPG-Bug-Id: T4453 Based on a patch provided by Egor Pugin. Thanks.
* core,w32: Show w32-spawn warning only onceAndre Heinecke2019-04-091-14/+19
| | | | | | | | | | * src/w32-io.c (_gpgme_io_spawn): Show MessageBox only once. -- This prevents multiple message boxes from showing when the GPGME installation is unworkable. GnuPG-Bug-Id: T4453
* core, w32: Fix format string errors on windowsAndre Heinecke2019-03-271-1/+8
| | | | | | | | | * src/debug.c (_gpgme_debug): Use gpgrt_vasprintf instead of vfprintf to have a more portable format. -- This fixes crashes on Windows because "%zu" is used which is not natively supported on Windows but which gpgrt supports.
* core: Fix assuan logger-fd hack for windowsAndre Heinecke2019-03-271-1/+1
| | | | * src/assuan-support.c (my_spawn): Zero is a perfectly fine fd.
* core,w32,glib: Fix build of w32-glib-io.cAndre Heinecke2019-03-261-7/+10
| | | | | * src/w32-glib-io.c (_gpgme_io_pipe, _gpgme_io_connect): Do not use TRACE_SUC in a return statement.
* Post release updates.Werner Koch2019-03-262-1/+5
| | | | --
* Release GPGME 1.13.0gpgme-1.13.0Werner Koch2019-03-263-9/+51
| | | | | | | | | * 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]>
* core: Fix a strtoul to strtolAndre Heinecke2019-03-261-1/+1
| | | | | | | | | | * src/assuan-support.c (my_spawn): Fix using strtoul for a long. -- This was commented on in129def87b262 and is correct. It is signed here to better handle cases where an invalid handle value (-1) would be passed.
* cpp: Fix GenCardKeyInteractor and extend itAndre Heinecke2019-03-263-2/+140
| | | | | | | | | | | | | | * 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
* core, w32: Add hack to translate diag logger-fdAndre Heinecke2019-03-251-5/+53
| | | | | | | | | | | | | | | | | * src/assuan-support.c (my_spawn): Add hack to mark the logger fd for w32spawn translation. -- The w32 spawn code needs to modify argv with an updated fd that matches the real id in the spawned process. It uses spawn_fd_item_s.arg_loc for that. We hack it here so that the arg_loc is set for gpgsm's logger-fd without changing the assuan API. GnuPG-Bug-Id: T4426
* qt: Handle diagnostic audit log for CMSAndre Heinecke2019-03-201-1/+7
| | | | | * lang/qt/src/threadedjobmixin.cpp(_detail::audit_log_as_html): Handle CMS audit log.
* core: Support GPGME_AUDITLOG_DIAG for gpgsm.Werner Koch2019-03-191-18/+114
| | | | | | | | | | | | | | | | * src/engine-gpgsm.c (struct engine_gpgsm): Add fields diag_cb and diagnostics. (close_notify_handler): Close the diag fd on status fd close. Handle diag close. (gpgsm_cancel): Handle diag. (gpgsm_release): Free DIAGNOSTICS. (gpgsm_new): Support the diag feature. (start): Set a handler for the diag fd. (gpgsm_getauditlog): Support GPGME_AUDITLOG_DIAG. -- Co-authored-by: Andre Heinecke <[email protected]> Signed-off-by: Werner Koch <[email protected]>
* cpp: Fix Error::hasSystemErrorAndre Heinecke2019-03-131-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
* json: Fix cosmetic error in the repl.Werner Koch2019-02-281-1/+1
| | | | | | | * src/gpgme-json.c (native_messaging_repl): Use correct var with sizeof. -- Signed-off-by: Werner Koch <[email protected]>
* tests: Let run-verify print the de-vs flag.Werner Koch2019-02-282-3/+4
| | | | | | | * tests/run-verify.c (print_result): Chack is_de_vs. * tests/run-import.c (main): Fix bad parameter for format string. Signed-off-by: Werner Koch <[email protected]>
* json: Limit recursion depthAndre Heinecke2019-02-271-13/+41
| | | | | | | | | | | | | * src/cJSON.c (MAX_DEPTH): New. Maximum recursion depth. (parse_value, parse_array, parse_object): Carry and check depth argument. (cJSON_ParseWithOpts): Initialize depth. -- This fixes a stack overflow if we get weird recursive json data. GnuPG-Bug-Id: T4331
* cpp: Add ostream operators for import resultAndre Heinecke2019-02-212-1/+46
| | | | | * lang/cpp/src/importresult.cpp: Add ostream operators. * lang/cpp/src/importresult.h: Update accordingly.
* cpp: Make GpgME::Data::toKeys really constAndre Heinecke2019-02-211-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.
* core,w32: Fix missing sentinel in dir name builder.Werner Koch2019-02-191-1/+1
| | | | | | | | | | | | | * src/w32-util.c (_gpgme_get_gpgconf_path): Add NULL top strconcat. -- Fortunately this is called early and the stack like cleared out so that we have not seen wrong behaviour until now. We should really fix all these annoying HANDLE/int cast warnings and alike so that real bugs are not drowned by them. GnuPG-bug-id: 4369 Signed-off-by: Werner Koch <[email protected]>
* tests: Fix memleak in run-threadedAndre Heinecke2019-02-111-0/+1
| | | | * tests/run-threaded.c (verify): Free msg.
* python: examplesBen McGinnes2019-02-101-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]>
* python: docsBen McGinnes2019-01-303-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]>
* python: post installer scriptBen McGinnes2019-01-271-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.
* python: post installer docs fix scriptBen McGinnes2019-01-2710-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]>
* json: Better use gpgme_freeWerner Koch2019-01-251-1/+1
| | | | | | | | | | | * src/gpgme-json.c (subkey_to_json): here -- Avoid Windows ugliness of allowing different CRTs in the same process. Fixes-commit: 7f2423371964263784252cf839269023b6573bd2 Signed-off-by: Werner Koch <[email protected]>
* json: Fix minor memory leaks.Werner Koch2019-01-251-6/+14
| | | | | | | | | | * src/gpgme-json.c (interactive_repl): Fix memleak. (subkey_to_json): Ditto (op_config): Delay init of j_comps to avoid a leak on error. -- GnuPG-bug-id: 4341, 4342, 4343 Signed-off-by: Werner Koch <[email protected]>
* build: With LD_LIBRARY_PATH defined, use --disable-new-dtags.NIIBE Yutaka2019-01-168-13/+50
| | | | | | | | | | | | | * 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]>
* tests: Add diagnostic example to run-import.cAndre Heinecke2019-01-151-0/+14
| | | | * tests/run-import.c (main): Show diagnostics in verbose mode.
* qt: Use tofu conflict test keys without expiryAndre Heinecke2019-01-091-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
* python docs: post installerBen McGinnes2019-01-020-0/+0
|\ | | | | | | | | | | | | | | * Merging post installer script. * Included ammended Sphinx config file to try to reduce the auto-generated EPUB validation failures it produces. Signed-off-by: Ben McGinnes <[email protected]>
| * python: examplesBen McGinnes2018-12-264-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]>
* | python: post installer doc fix scriptBen McGinnes2019-01-021-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]>
* | python: examplesBen McGinnes2019-01-024-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]>
* | python: docs processingBen McGinnes2018-12-242-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]>
* python: docsBen McGinnes2018-12-218-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]>
* python: groups exampleBen McGinnes2018-12-212-10/+10
| | | | | | * Tightened code a little more. Signed-off-by: Ben McGinnes <[email protected]>
* python docs: house keepingBen McGinnes2018-12-171-14/+27
| | | | | | | * Dropped the ASCII copyright line, since even MS have conceded their battle against Unicode enough to load UTF-8. * Fixed the drafts section since there will be less need of multiple output format testing from next year.
* core: Silence newer compiler warnings.Werner Koch2018-12-174-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * configure.ac: Add -Wno-format-truncation and -Wno-sizeof-pointer-div. * src/b64dec.c (_gpgme_b64dec_proc): Add fallthrough annotation. * src/cJSON.c (parse_string): Ditto. * src/gpgme-json.c (main): Ditto. -- gcc 8 enables a couple of new warnings. Some of them are useless for us. In particular: util.h:42:26: warning: division 'sizeof (char *) / sizeof (char)' does not compute the number of array elements [-Wsizeof-pointer-div] #define DIM(v) (sizeof(v)/sizeof((v)[0])) ^ trustlist.c:101:22: note: in expansion of macro 'DIM' if (strlen (p) == DIM(item->keyid) - 1) Which is a real standard way to use DIM, here the right hand side is equivalent to sizeof but nevertheless it is correct. Yes sir, we know C. The format string warnings I have seen were assuming that the time structure returns valued out of scope - but if the system is that broken, the s_n_printf catches this. Signed-off-by: Werner Koch <[email protected]>
* python: howto and examplesBen McGinnes2018-12-164-59/+61
| | | | | | | * Tightening up both the documentation and some of the example code. Tested-by: Ben McGinnes <[email protected]> Signed-off-by: Ben McGinnes <[email protected]>
* python: examples bugfixBen McGinnes2018-12-134-5/+29
| | | | | | | * Fixed a bug in the ProtonMail importers (pmkey-*.py) where multiple keys found for a username would always result in the last email address checked being returned in the printed output for all located keys.
* python: new example scriptBen McGinnes2018-12-121-0/+80
| | | | | | | | | | * Though Keybase really should not be encouraged due to disengenuosness and FUD emanating from that souce, this new script will obtain a key hosted on that site and import it when supplied with the keybase username. Tested-by: Ben McGinnes <[email protected]> Signed-off-by: Ben McGinnes <[email protected]>
* python: what's new summaryBen McGinnes2018-12-123-0/+29
| | | | * Added a little more detail to the what's new section.