<feed xmlns='http://www.w3.org/2005/Atom'>
<title>gpgme/src/gpgme-json.c, branch gpgme-2.2.0</title>
<subtitle>GnuPG Made Easy.</subtitle>
<id>http://git.bktus.com/gpgfrontend/gpgme/atom?h=gpgme-2.2.0</id>
<link rel='self' href='http://git.bktus.com/gpgfrontend/gpgme/atom?h=gpgme-2.2.0'/>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/'/>
<updated>2025-05-23T13:06:53Z</updated>
<entry>
<title>Refactor gpgme-json for future re-use.</title>
<updated>2025-05-23T13:06:53Z</updated>
<author>
<name>Werner Koch</name>
<email>wk@gnupg.org</email>
</author>
<published>2025-05-23T13:06:53Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=d7267db472a4e4f65c8139f68d9d976c64b79636'/>
<id>urn:sha1:d7267db472a4e4f65c8139f68d9d976c64b79636</id>
<content type='text'>
* src/gpgme-json.c: Factor large chunks of code out to ...
* src/json-core.c: new file and ...
* src/json-util.c: new file and ...
* src/json-common.h: new file.
* src/Makefile.am (gpgme_json_SOURCES): Add new files.
</content>
</entry>
<entry>
<title>json: Add information about revocation keys to key list result</title>
<updated>2024-05-21T14:38:59Z</updated>
<author>
<name>Ingo Klöcker</name>
<email>dev@ingo-kloecker.de</email>
</author>
<published>2024-05-15T08:39:26Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=f2575b6313aeb23d867682856f7842704786349e'/>
<id>urn:sha1:f2575b6313aeb23d867682856f7842704786349e</id>
<content type='text'>
* src/gpgme-json.c (revocation_key_to_json): New.
(key_to_json): Add list of revocation keys.

* tests/json/Makefile.am (pubring-stamp): Import new pub key.
* tests/json/key-with-revokers.asc: New.
* tests/json/t-json.c (tests): Add "t-keylist-revokers".
* tests/json/t-keylist-revokers.in.json,
tests/json/t-keylist-revokers.in.json: New.
--

GnuPG-bug-id: 7118
</content>
</entry>
<entry>
<title>json: New operation "identify" and convenience option --identify.</title>
<updated>2023-01-31T08:52:04Z</updated>
<author>
<name>Werner Koch</name>
<email>wk@gnupg.org</email>
</author>
<published>2023-01-31T08:47:19Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=359378c5b3f3aaf274dfc33861978c3cf6ec60ca'/>
<id>urn:sha1:359378c5b3f3aaf274dfc33861978c3cf6ec60ca</id>
<content type='text'>
* src/gpgme-json.c (data_type_to_string): New.
(op_identify): New.
(process_request): Add to command list.
(cmd_identify): New.
(main): Add option --identify.
--
</content>
</entry>
<entry>
<title>core: Support --locate-external-keys command of gpg</title>
<updated>2022-04-27T14:57:17Z</updated>
<author>
<name>Ingo Klöcker</name>
<email>dev@ingo-kloecker.de</email>
</author>
<published>2022-04-27T14:57:17Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=aff9aaac68450e76f84d0f9a3feabffe9e82dd7e'/>
<id>urn:sha1:aff9aaac68450e76f84d0f9a3feabffe9e82dd7e</id>
<content type='text'>
* src/gpgme.h.in (GPGME_KEYLIST_MODE_FORCE_EXTERN): New.
(GPGME_KEYLIST_MODE_LOCATE_EXTERNAL): New.
* src/gpgme.c (gpgme_set_keylist_mode): Check for invalid mode.
* src/engine-gpg.c (gpg_keylist_build_options): Use
"--locate-external-keys" instead of "--locate-keys" if flag is set.
* src/gpgme-json.c (op_keylist): New flag "force-extern".
* src/gpgme-tool.c (gt_get_keylist_mode, cmd_keylist_mode): Handle
new mode.
--

GnuPG-bug-id: 5951
</content>
</entry>
<entry>
<title>Require at least libgpg-error 1.36</title>
<updated>2020-11-09T10:50:46Z</updated>
<author>
<name>Werner Koch</name>
<email>wk@gnupg.org</email>
</author>
<published>2020-11-09T10:48:42Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=eb99e8c483a70764408868602ef322602e9e72ce'/>
<id>urn:sha1:eb99e8c483a70764408868602ef322602e9e72ce</id>
<content type='text'>
* configure.ac (NEED_GPG_ERROR_VERSION): Require 1.36.
* src/cJSON.c: Remove code for older version.
* src/engine.c (gpgme_get_engine_info): Ditto.
* src/gpgme-json.c: Ditto.
* src/op-support.c: Ditto.
* src/util.h: Ditto.
--

Libgpg-error 1.36 has been released more than 18 months ago so it is
time to avoid hacks and require this verion.  This will for example
help Kleopatra to support PIV cards and improves the gpgme-json.

Signed-off-by: Werner Koch &lt;wk@gnupg.org&gt;
</content>
</entry>
<entry>
<title>core: New keylist mode GPGME_KEYLIST_MODE_WITH_KEYGRIP.</title>
<updated>2020-07-15T12:11:17Z</updated>
<author>
<name>Werner Koch</name>
<email>wk@gnupg.org</email>
</author>
<published>2020-07-15T12:10:32Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=c8048bf8eb988f22b20215197f4739bedafc4264'/>
<id>urn:sha1:c8048bf8eb988f22b20215197f4739bedafc4264</id>
<content type='text'>
* src/gpgme.h.in (GPGME_KEYLIST_MODE_WITH_KEYGRIP): New.
* src/gpgme-json.c (op_keylist): New flag "keygrip".
* src/engine-gpg.c (gpg_keylist_build_options): Pass the options.

* lang/cpp/src/global.h (WithKeygrip): New.
* lang/cpp/src/context.cpp: Add check.
* lang/cpp/src/key.cpp (Key::update): Handle WithKeygrip.
* lang/cpp/src/verificationresult.cpp: Ditto.
* lang/cpp/src/util.h (add_to_gpgme_keylist_mode_t): Ditto.
--

GnuPG-bug-id: 4939
Signed-off-by: Werner Koch &lt;wk@gnupg.org&gt;
</content>
</entry>
<entry>
<title>json: Fix cosmetic error in the repl.</title>
<updated>2019-02-28T13:05:06Z</updated>
<author>
<name>Werner Koch</name>
<email>wk@gnupg.org</email>
</author>
<published>2019-02-28T13:05:06Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=1bdab961c51fc038c33ae8116595aa0213ab1dd5'/>
<id>urn:sha1:1bdab961c51fc038c33ae8116595aa0213ab1dd5</id>
<content type='text'>
* src/gpgme-json.c (native_messaging_repl): Use correct var with sizeof.
--

Signed-off-by: Werner Koch &lt;wk@gnupg.org&gt;
</content>
</entry>
<entry>
<title>json: Better use gpgme_free</title>
<updated>2019-01-25T14:20:26Z</updated>
<author>
<name>Werner Koch</name>
<email>wk@gnupg.org</email>
</author>
<published>2019-01-25T14:20:26Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=ed81892917f47dddc23aa99d88733e3f8f344256'/>
<id>urn:sha1:ed81892917f47dddc23aa99d88733e3f8f344256</id>
<content type='text'>
* 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 &lt;wk@gnupg.org&gt;
</content>
</entry>
<entry>
<title>json: Fix minor memory leaks.</title>
<updated>2019-01-25T12:45:47Z</updated>
<author>
<name>Werner Koch</name>
<email>wk@gnupg.org</email>
</author>
<published>2019-01-25T12:31:47Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=7f2423371964263784252cf839269023b6573bd2'/>
<id>urn:sha1:7f2423371964263784252cf839269023b6573bd2</id>
<content type='text'>
* 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 &lt;wk@gnupg.org&gt;
</content>
</entry>
<entry>
<title>core: Silence newer compiler warnings.</title>
<updated>2018-12-17T15:47:27Z</updated>
<author>
<name>Werner Koch</name>
<email>wk@gnupg.org</email>
</author>
<published>2018-12-17T15:47:06Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=8b41fb08f00f01fe0dd8b2b5455d3422d97ddc60'/>
<id>urn:sha1:8b41fb08f00f01fe0dd8b2b5455d3422d97ddc60</id>
<content type='text'>
* 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-&gt;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 &lt;wk@gnupg.org&gt;
</content>
</entry>
</feed>
