aboutsummaryrefslogtreecommitdiffstats
path: root/src/util.h
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2021-06-14 17:51:28 +0000
committerWerner Koch <[email protected]>2021-06-14 17:51:28 +0000
commitfde20940b5ca6986dc12215209e8858601bb0c2e (patch)
treec6f91404915bac0ccd6308fa8cce7c0c50bd68aa /src/util.h
parentcore: Also detect AuthEnvelopedData (AEAD for CMS) (diff)
downloadgpgme-fde20940b5ca6986dc12215209e8858601bb0c2e.tar.gz
gpgme-fde20940b5ca6986dc12215209e8858601bb0c2e.zip
core: New data flags "io-buffer-size" and "sensitive".
* 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 <[email protected]>
Diffstat (limited to 'src/util.h')
-rw-r--r--src/util.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/util.h b/src/util.h
index bc78c9b8..89075848 100644
--- a/src/util.h
+++ b/src/util.h
@@ -96,6 +96,9 @@ int _gpgme_ttyname_r (int fd, char *buf, size_t buflen);
/*-- conversion.c --*/
+/* Make sure to to erase the memory (PTR,LEN). */
+void _gpgme_wipememory (void *ptr, size_t len);
+
/* Concatenate the string S1 with all the following strings up to a
NULL. Returns a malloced buffer with the new string or NULL on a
malloc error or if too many arguments are given. */