Home GnuPG

core: Add "wipe" mode flag.

Description

core: Add "wipe" mode flag.

* src/gpgrt-int.h (struct _gpgrt_stream_internal): Add field "wipe".
* src/estream.c (mem_free2): New.
(struct estream_cookie_mem): Add flag "wipe".
(func_mem_create): Add arg wipe.
(func_mem_destroy): Wipe.
(X_WIPE): New.
(parse_mode): Parse "wipe" mode flag.
(init_stream_obj): Set it.
(do_close): Wipe internal struct with its static buffers.
(doreadline): Pass wipe mode along to help buffer.
(_gpgrt_mopen): Pass wipe mode.
(_gpgrt_fopenmem): Ditto.

This is likely not complete but should wipe out buffers allocated by
fopenmem.

Details

Provenance
wernerAuthored on Feb 6 2024, 5:03 PM
Parents
rE1fdd8749014c: core: New function gpgrt_wipememory.
Branches
Unknown
Tags
Unknown
Tasks
T6954: Add wipememory function to gpgrt