<feed xmlns='http://www.w3.org/2005/Atom'>
<title>gpgme/src/data.c, branch gpgme-1.16.0</title>
<subtitle>GnuPG Made Easy.</subtitle>
<id>http://git.bktus.com/gpgfrontend/gpgme/atom?h=gpgme-1.16.0</id>
<link rel='self' href='http://git.bktus.com/gpgfrontend/gpgme/atom?h=gpgme-1.16.0'/>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/'/>
<updated>2021-06-14T17:51:28Z</updated>
<entry>
<title>core: New data flags "io-buffer-size" and "sensitive".</title>
<updated>2021-06-14T17:51:28Z</updated>
<author>
<name>Werner Koch</name>
<email>wk@gnupg.org</email>
</author>
<published>2021-06-14T17:51:28Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=fde20940b5ca6986dc12215209e8858601bb0c2e'/>
<id>urn:sha1:fde20940b5ca6986dc12215209e8858601bb0c2e</id>
<content type='text'>
* src/data.c (_gpgme_data_release): Free buffers.
(gpgme_data_seek): Adjust from renamed fields.
(gpgme_data_set_flag): Implement new flags.
(_gpgme_data_inbound_handler): Allow the use of a malloced buffer.
(_gpgme_data_outbound_handler): Ditto.
* src/data.h (BUFFER_SIZE): Move out of the struct definition.
(struct gpgme_data): Remove pending filed and introduce inbound and
outbound fields.

* src/conversion.c (_gpgme_wipememory): New.  Taken from GnuPG.
* src/cJSON.c (wipememory): Use this here too.

* tests/run-decrypt.c (main): Add options "--large-buffers" and
"--sensitive".
--

GnuPG-bug-id: 5478
Signed-off-by: Werner Koch &lt;wk@gnupg.org&gt;
</content>
</entry>
<entry>
<title>core: Also detect AuthEnvelopedData (AEAD for CMS)</title>
<updated>2021-06-14T15:10:49Z</updated>
<author>
<name>Werner Koch</name>
<email>wk@gnupg.org</email>
</author>
<published>2021-06-14T15:10:49Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=ea290108e4df9f93eda79789d9cde5441d6bdd55'/>
<id>urn:sha1:ea290108e4df9f93eda79789d9cde5441d6bdd55</id>
<content type='text'>
* src/data-identify.c (basic_detection): Add OID.

Signed-off-by: Werner Koch &lt;wk@gnupg.org&gt;
</content>
</entry>
<entry>
<title>core: Improve the debug messages even more.</title>
<updated>2019-06-05T13:54:55Z</updated>
<author>
<name>Werner Koch</name>
<email>wk@gnupg.org</email>
</author>
<published>2019-06-05T13:48:33Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=8f9f3224aac78ce9d54e19e73acf7ab659787168'/>
<id>urn:sha1:8f9f3224aac78ce9d54e19e73acf7ab659787168</id>
<content type='text'>
* src/debug.c (_gpgme_debug): Add arg LINE.  Chnage all callers.
(_gpgme_debug_begin): Remove.
* src/debug.h (TRACE_SEQ): Use the LINE arg of _gpgme_debug.
--

This includes chnages to always print fds in decimal as weel as
tweaking the TARCE_SEQ function to make use of the new machinery.

The standard 'tag' can now always be NULL and no tag information will
be printed.

Signed-off-by: Werner Koch &lt;wk@gnupg.org&gt;
</content>
</entry>
<entry>
<title>core: Fix format string errors in trace macros</title>
<updated>2018-11-16T15:57:09Z</updated>
<author>
<name>Werner Koch</name>
<email>wk@gnupg.org</email>
</author>
<published>2018-11-16T15:57:09Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=cf423864062a2677d0eeabbb11462a788f527b4c'/>
<id>urn:sha1:cf423864062a2677d0eeabbb11462a788f527b4c</id>
<content type='text'>
--

Signed-off-by: Werner Koch &lt;wk@gnupg.org&gt;
</content>
</entry>
<entry>
<title>core: Simplify the trace maros by using variadics.</title>
<updated>2018-11-16T15:25:49Z</updated>
<author>
<name>Werner Koch</name>
<email>wk@gnupg.org</email>
</author>
<published>2018-11-16T15:25:49Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=5857491a2aa7d4975100d90f1ad62c08aa345e3e'/>
<id>urn:sha1:5857491a2aa7d4975100d90f1ad62c08aa345e3e</id>
<content type='text'>
* 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 &lt;GCC&gt;: 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 &lt;wk@gnupg.org&gt;
</content>
</entry>
<entry>
<title>Add SPDX identifiers to most source files</title>
<updated>2018-11-16T12:27:33Z</updated>
<author>
<name>Werner Koch</name>
<email>wk@gnupg.org</email>
</author>
<published>2018-11-16T12:27:33Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=8d91c0f4cdcc26679067ae681ae12600fb450200'/>
<id>urn:sha1:8d91c0f4cdcc26679067ae681ae12600fb450200</id>
<content type='text'>
--

Signed-off-by: Werner Koch &lt;wk@gnupg.org&gt;
</content>
</entry>
<entry>
<title>spelling: fix misspellings</title>
<updated>2018-11-08T05:34:27Z</updated>
<author>
<name>Daniel Kahn Gillmor</name>
<email>dkg@fifthhorseman.net</email>
</author>
<published>2018-11-08T05:34:27Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=2557d0ae6ff0336b041129b7bf5c1e3a8c20a805'/>
<id>urn:sha1:2557d0ae6ff0336b041129b7bf5c1e3a8c20a805</id>
<content type='text'>
Signed-off-by: Daniel Kahn Gillmor &lt;dkg@fifthhorseman.net&gt;
</content>
</entry>
<entry>
<title>core: Clear all flags for a new data property.</title>
<updated>2018-07-19T18:38:21Z</updated>
<author>
<name>Werner Koch</name>
<email>wk@gnupg.org</email>
</author>
<published>2018-07-19T18:38:21Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=5ef492c5635ae1677eed6f439a75a86a99dbbe18'/>
<id>urn:sha1:5ef492c5635ae1677eed6f439a75a86a99dbbe18</id>
<content type='text'>
* src/data.c (PROPERTY_TABLE_ALLOCATION_CHUNK): New.
(insert_into_property_table): Use it here.  Clear all flags.
--

Fixes-commit: 085cdeddef637cc057362fcbde13b0261b8699ec
Signed-off-by: Werner Koch &lt;wk@gnupg.org&gt;
</content>
</entry>
<entry>
<title>core: Blank out the plaintext after decryption failure.</title>
<updated>2018-07-19T15:39:09Z</updated>
<author>
<name>Werner Koch</name>
<email>wk@gnupg.org</email>
</author>
<published>2018-07-19T15:38:50Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=085cdeddef637cc057362fcbde13b0261b8699ec'/>
<id>urn:sha1:085cdeddef637cc057362fcbde13b0261b8699ec</id>
<content type='text'>
* src/data.h (data_prop_t): New enum.
(struct gpgme_data): Add field propidx.
* src/data.c (property_t): New.
(property_table, property_table_size, property_table_lock): New.
(insert_into_property_table): New.
(remove_from_property_table): New.
(_gpgme_data_get_dserial): New.
(_gpgme_data_set_prop): New.
(_gpgme_data_get_prop): New.
(_gpgme_data_new): Connect new object to property_table.
(_gpgme_data_release): Remove from property_table.
(gpgme_data_read): With DATA_PROP_BLANKOUT set don't fill the buffer.
* src/data-mem.c (gpgme_data_release_and_get_mem): Likewise.
* src/decrypt.c (struct op_data): Add field plaintext_dserial.
(_gpgme_op_decrypt_init_result): Add arg plaintext and init new field.
(_gpgme_decrypt_status_handler): Set DATA_PROP_BLANKOUT on decryption
failure.
(_gpgme_decrypt_start): Pass PLAIN to the init function.
* src/decrypt-verify.c (decrypt_verify_start): Ditto.
* configure.ac: Check for stdint.h and bail out if uint64_t is not
available.
--

This is a best effort feature to not output plaintext after a
decryption failure (e.g. due to no or broken authenticated
encryption).  It always work when using a memory object and reading it
after the decryption but it can't work reliable when the user is
reading from the data object while the decryption process is still
running.

This is quite a large change because the data objects and the context
objects are allowed to be owned by different threads.  Thus a
synchronization is needed and we do this with a global table of all
data objects to which the context objects can do soft-linking via a
unique data object serial number.

Signed-off-by: Werner Koch &lt;wk@gnupg.org&gt;
</content>
</entry>
<entry>
<title>core: Also check for a failed selftest in gpgm_data_new.</title>
<updated>2017-12-04T11:08:31Z</updated>
<author>
<name>Werner Koch</name>
<email>wk@gnupg.org</email>
</author>
<published>2017-12-04T11:08:31Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=0c1244a2b7e30ab0610ae70166e1b5d0219782c3'/>
<id>urn:sha1:0c1244a2b7e30ab0610ae70166e1b5d0219782c3</id>
<content type='text'>
* src/data.c (_gpgme_data_new): Check for failed selftest.
* tests/run-support.h (make_filename): Print a message on mallooc
failure.
(init_gpgme_basic): New.
* tests/run-identify.c (main): Call init_gpgme_basic becuase we do not
need to setup a protocol.
* tests/t-data.c: Define PGM and include run-support.h.
(make_filename): Remove.
(main): Call init_gpgme_basic.
--

Note: This patch may break applications which used gpgme_data but no
gpgme_new without having called the required gpgme_check_version.

GPGME can be used without a protocol for example to work with the data
object abstraction.  Thus a call to gpgme_data_new also needs to check
the result of the core selftests - including on whether
gpgme_check_version has been called.

Signed-off-by: Werner Koch &lt;wk@gnupg.org&gt;
</content>
</entry>
</feed>
