aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* json: Add framework for the gpgme-json toolWerner Koch2018-03-163-2/+833
| | | | | | | | * src/gpgme-json.c: New. * src/Makefile.am (bin_PROGRAMS): Add gpgme-json. (gpgme_json_SOURCES, gpgme_json_LDADD): New. Signed-off-by: Werner Koch <[email protected]>
* core: Adjust cJSON code for use in GPGME.Werner Koch2018-03-162-36/+150
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/cJSON.c: Remove util.h. Use gpgrt alloc functions. (cJSON_Delete): Do not clobber ERRNO. (cJSON_AddItemToObject): Return OBJECT or NULL. (cJSON_AddNullToObject): New. (cJSON_AddTrueToObject): New. (cJSON_AddFalseToObject): New. (cJSON_AddBoolToObject): New. (cJSON_AddNumberToObject): New. (cJSON_AddStringToObject): New. * src/cJSON.h (cJSON__h): Replace macro by cJSON_h for C compliance. (cJSON_AddNullToObject): Remove macro. (cJSON_AddTrueToObject): Remove macro. (cJSON_AddFalseToObject): Remove macro. (cJSON_AddBoolToObject): Remove macro. (cJSON_AddNumberToObject): Remove macro. (cJSON_AddStringToObject): Remove macro. -- The gpgrt malloc functions are used so that we can easily mix memory returned by gpgrt (e.g. es_read_line) with memory returned from the JSON function. In general that is not needed but on Windows it makes a difference if the gpgme DLL is linked to a different C runtime than the application. The macros have been replaced to allow error checking (i.e out of core) for these functions. More error checking should be implemented instead of silently creating objects which are not as requested. Signed-off-by: Werner Koch <[email protected]>
* core: Import cJSON code from the payproc project.Werner Koch2018-03-143-0/+1734
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/cJSON.c: New. * src/cJSON.h: New. * src/cJSON.readme: New. -- This is a copy of the code from the payproc commit af5d6b4f820ee19e246a2cab6f56465fe91f1233. The code was originally added to payproc with the commit below. Signed-off-by: Werner Koch <[email protected]> =============================================== commit 7ae7ef29bc5ec19e005e6a5a739233d655f3f05f Author: Werner Koch <[email protected]> AuthorDate: Wed Apr 2 09:01:42 2014 +0200 Commit: Werner Koch <[email protected]> CommitDate: Wed Apr 2 09:12:02 2014 +0200 Simplify cJSON and add new macros. * src/cJSON.h: Re-indented. (cjson_t): New. (cjson_is_): New macros. * src/cJSON.c: Re-indented. Include errno.h and our util.h. (ep): Remove global var. (cJSON_GetErrorPtr): Remove. (cJSON_strcasecmp): Cast args for use with tolower. (cJSON_malloc, cJSON_free): Remove. Change callers to use xtrymalloc and xfree. (cJSON_InitHooks): Remove. (cJSON_strdup): Remove. Change callers to use xtrystrdup. (cJSON_New_Item): Simplify. (cJSON_ParseWithOpts, cJSON_Parse): Add arg R_ERROFF. (parse_string, parse_value, parse_array, parse_object): Add arg EP. -- cJSON has been taken from cjson-code-58.zip. The README file has been renamed to cJSON.readme and the files have been changed to GNU coding standards. Because that parser is small enough to be source copied it does not make sense to treat it as a library and I changed the memory allocation functions to the usual xmalloc ones. The only external dependency now is out util.h which declares those functions. The lowercase cjson_t better fits into our coding style as well as the new macros. Thanks to Dave Gamble for this nice parser. ===============================================
* docs: TODOBen McGinnes2018-03-081-1/+1
| | | | * Removed WS.
* doc: TODO list updateBen McGinnes2018-03-081-7/+42
| | | | | | | * Closed off a few ancient items and added recommendation to others to use the dev.gnupg.org site for real bugs/features updates. * See also this statement on the gnupg-devel list regarding this file: https://lists.gnupg.org/pipermail/gnupg-devel/2018-March/033499.html
* Missed a coupleBen McGinnes2018-03-031-2/+2
| | | | | | * WS indicated 2 custom-ids were missed, now they're set. Signed-off-by: Ben McGinnes <[email protected]>
* TODO DONEBen McGinnes2018-03-031-0/+12
| | | | | | * Marked off a TODO for this clean-up. Signed-off-by: Ben McGinnes <[email protected]>
* TODOben/docs/2018-02Ben McGinnes2018-03-031-1/+1
| | | | * WS removal
* TODO updatesBen McGinnes2018-03-031-72/+80
| | | | | | | | | * Updated TODO with tags to make everything appear properly when exported to HTML or PDF. * Added a couple more items, mainly to do with docs or future bindings. * Marked some, but not all as actual TODO items. * Some items should probably be removed, but haven't been yet. * Some have probably been completed already.
* New stuffBen McGinnes2018-02-271-0/+20
| | | | | | * Added the idea for alternative Emacs bindings (to extend the existing ones, not replace them outright). * Added a reference to the API Squared part of the project.
* TODO the TODOBen McGinnes2018-02-271-0/+11
| | | | | * Added an actual TODO to fix the TODOs. * Pretty sure I know who will be completing this one ... ;)
* TODO ... the TODOBen McGinnes2018-02-271-3/+316
| | | | | | | | | * If we're going to use Org, let's actually use Org. * Added the properties tags for each point. * Some of thems still need custom ID tags assigned properly. * Probably ought to make them actual TODOs at some point, but that can wait until they can be marked as DONE anyway. * Will add a TODO for some of this stuff ... oh, the irony.
* core: Support non-thread-safe getenv.NIIBE Yutaka2018-02-271-20/+36
| | | | | | | * src/get-env.c (_gpgme_getenv): Use gpgrt_lock_lock and gpgrt_lock_unlock to protect call of getnev. Signed-off-by: NIIBE Yutaka <[email protected]>
* WS removalBen McGinnes2018-02-261-1/+1
| | | | * Whitespace removal.
* Merge branch 'ben/python-docs-01'Ben McGinnes2018-02-266-119/+432
|\ | | | | | | | | | | * Documentation and the first brush strokes towards the future. Signed-off-by: Ben McGinnes <[email protected]>
| * LaTeX headersben/python-docs-01Ben McGinnes2018-02-262-0/+8
| | | | | | | | | | | | | | * Set LaTeX headers to enable ligatures and a 12pt font by default. * Paper size left for regional defaults. * Using XeLaTeX for easier font control. * Using default LaTeX font of Latin Main, but that's easy enough to change.
| * Renaming ad infinitum ...Ben McGinnes2018-02-191-0/+0
| | | | | | | | * Dropped the .txt from the end of the file ...
| * Text conversionBen McGinnes2018-02-191-0/+77
| | | | | | | | | | * Exported from Org Mode to UTF-8 text. * Removed my name from just under the title.
| * Title fixBen McGinnes2018-02-191-1/+1
| | | | | | | | * Fixed title.
| * Conflict with Phabricator filesBen McGinnes2018-02-191-0/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * The developers of Phabricator, the web front-end on dev.gnupg.org have not implemented renderers for Markdown, Org-Mode or any other common markdown like language. * They also refuse to do so. * Instead they re-invented the wheel and implemented their own version of Markdown-like thing which is incompatible with everything else. It is called Remarkup. * The developers of Phabricator and Remarkup have refused to provide conversion tools to move files to/from any format to/from Remarkup. * They expect everyone to learn their new favourite pet project. * Remarkup may or may not display Org Mode files, but if so then it is likely to only want to do so as plain text. * There is an unaffiliated and unofficial project to convert Github Markdown to Remarkup via Pandoc. This might be adapted for our use, but requires testing. * Until then exporting from Org Mode to UTF-8 text is likely the least worst plan. * Which means renaming this file to README.org first.
| * Schizophrenic file typesBen McGinnes2018-02-191-2/+2
| | | | | | | | | | | | * Removed Markdown style heading underlining. * Removed in-line file type declaration (which is not correctly parsed by the web interface on dev.gnupg.org).
| * History pathBen McGinnes2018-02-161-7/+10
| | | | | | | | | | | | * Fixed a typo in a filepath reference. * Moved conjecture regarding the first version of Python used to a footnote.
| * Merge branch 'master' of /Users/ben/dev/hgit/mine/gnupg/gpgme/master into ↵Ben McGinnes2018-02-154-33/+20
| |\ | | | | | | | | | ben/python-docs-01
| * | LaTeX marginsBen McGinnes2018-02-152-0/+67
| | | | | | | | | | | | | | | * Added LaTeX header for 1 inch margins in the quite likely event that all PDF output ultimately uses LaTeX.
| * | TODO DocumentationBen McGinnes2018-02-151-1/+2
| | | | | | | | | | | | * Checked off the decision to stick with Org Mode.
| * | TODOBen McGinnes2018-02-151-7/+34
| | | | | | | | | | | | | | | * Beginning to turn the first part of this into something kind of like an actual TODO list as Org Mode uses it (maybe).
| * | Short HistoryBen McGinnes2018-02-141-20/+96
| | | | | | | | | | | | | | | | | | * Fixed or updated the most fundamental errors. * Also included some details on which modules are available on PyPI, as well as what happened to the PyME commit log.
| * | Subsectioned historyBen McGinnes2018-02-141-0/+15
| | | | | | | | | | | | | | | | | | * Split the main parts down into subsections. * Still need to cull the incorrect stuff towards the end and add more recent changes.
| * | HistoryBen McGinnes2018-02-141-52/+68
| | | | | | | | | | | | | | | | | | * Reshaping the history file to fit Org Mode's structuring for docs. * Also said history needs to be a bit more clear (it was kind of unfinished).
| * | TODOBen McGinnes2018-02-141-20/+45
| | | | | | | | | | | | | | | | | | | | | | | | * Updated TODO. * The entirety of the old TODO has been replaced with either more relevant tasks or goals for the examples and a more measured approach to the docs and why, in this project, Org Mode trumps reST, even though it's Python through and through.
| * | TODOBen McGinnes2018-02-141-23/+0
| | | | | | | | | | | | * Removed reST version of file.
| * | TODOBen McGinnes2018-02-141-0/+22
| | | | | | | | | | | | * Converted document from reST to org-mode.
| * | Short HistoryBen McGinnes2018-02-141-57/+0
| | | | | | | | | | | | * Removed reST version.
| * | Short HistoryBen McGinnes2018-02-141-0/+56
| | | | | | | | | | | | * Converted document from reST to org-mode.
* | | Merge branch 'ben/gitsettings' of ben/gitignoredBen McGinnes2018-02-261-0/+42
|\ \ \ | | | | | | | | | | | | Signed-off-by: Ben McGinnes <[email protected]>
| * | | House keepingben/gitsettingsBen McGinnes2018-02-141-0/+42
| |/ / | | | | | | | | | | | | | | | * Added a bunch of things to .gitignore that might otherwise creep in during Python development. * This really should be merged ASAP. You'll thank me later ...
* | / cpp: Add shorthand for key locateAndre Heinecke2018-02-163-0/+41
| |/ |/| | | | | | | * lang/cpp/src/key.cpp (Key::locate): New static helper. * lang/cpp/src/key.h: Update accordingly.
* | tests: Fix previous commitNIIBE Yutaka2018-02-151-1/+1
| | | | | | | | Signed-off-by: NIIBE Yutaka <[email protected]>
* | tests: More Makefile portability.NIIBE Yutaka2018-02-151-2/+2
| | | | | | | | | | | | * tests/gpg/Makefile.am: Invoke GPG with TESTS_ENVIRONMENT. Signed-off-by: NIIBE Yutaka <[email protected]>
* | tests: Makefile portability.NIIBE Yutaka2018-02-154-25/+13
| | | | | | | | | | | | | | | | | | | | | | | | * tests/gpg/Makefile.am: Don't use "export" directive. * tests/gpgsm/Makefile.am: Ditto. * lang/qt/tests/Makefile.am: Ditto. * lang/python/tests/Makefile.am: Ditto. -- GnuPG-bug-id: 3056 Signed-off-by: NIIBE Yutaka <[email protected]>
* | build: More Makefile fix.NIIBE Yutaka2018-02-151-6/+5
|/ | | | | | * lang/python/tests/Makefile.am: Avoid target with '/'. Signed-off-by: NIIBE Yutaka <[email protected]>
* build: Fix Makefiles for portability.NIIBE Yutaka2018-02-142-10/+10
| | | | | | | | | | | | | * tests/gpg/Makefile.am: Don't allow target with '/'. * tests/gpgsm/Makefile.am: Ditto. -- BSD Make doesn't allow a target with '/'. We still have such a target in lang/python/Makefile.am, but it's for maintainer only, so, assumption to GNU Make is OK there. Signed-off-by: NIIBE Yutaka <[email protected]>
* configure: Fix mingw check for getenv.Andre Heinecke2018-02-131-1/+1
| | | | | | | | | | * configure.ac: have_thread_safe_getenv=yes with have_w32_system. -- We want to define this for both 32 and 64 bit targets if we use mingw. have_w32_system is defined for both targets. Signed-off-by: Andre Heinecke <[email protected]>
* configure: MinGW has thread-safe getenv.NIIBE Yutaka2018-02-121-1/+1
| | | | | | * configure.ac: have_thread_safe_getenv=yes with have_w64_system. Signed-off-by: NIIBE Yutaka <[email protected]>
* cpp: Add SpawnShowWindow flagAndre Heinecke2018-02-091-1/+2
| | | | * lang/cpp/src/context.h (SpawnShowWindow): New.
* core, w32: Enable spawning GUI applicationsAndre Heinecke2018-02-094-4/+6
| | | | | | | | | | | * src/engine-spawn.c (engspawn_start): Translate spawn flag to IOSPAWN flag. * src/gpgme-w32spawn.c (my_spawn): Handle the new flag. * src/gpgme.h.in (GPGME_SPAWN_SHOW_WINDOW): New. * src/priv-io.h (IOSPAWN_FLAG_SHOW_WINDOW): New. -- Used by GpgOL
* core, w32: Fix flags passing to gpgme-w32-spawnAndre Heinecke2018-02-091-2/+2
| | | | | | | | | * src/w32-io.c (_gpgme_io_spawn): Don't hardcode flags value. -- IOSPAWN_FLAG_ALLOW_SET_FG is 2 and was translated to 1. This might fix the pinentry foreground handling pass through.
* cpp: Add conveniance Data::toStringAndre Heinecke2018-02-092-0/+17
| | | | | | | * lang/cpp/src/data.h, lang/cpp/src/data.cpp: Add Data::toString. -- I'm lazy and like to waste memory.
* Fix for BSD Make.NIIBE Yutaka2018-01-292-2/+2
| | | | | | | | | | | | * tests/gpg/Makefile.am, tests/gpgsm/Makefile.am: Remove ./. -- GNU Make is powerful enough for handling and interpreting of pathname as target, but BSD Make is not. GnuPG-bug-id: 3056 Signed-off-by: NIIBE Yutaka <[email protected]>
* Fix compile error message.NIIBE Yutaka2018-01-291-2/+1
| | | | | | * src/get-env.c (_gpgme_getenv): Fix error message. Signed-off-by: NIIBE Yutaka <[email protected]>