1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-03 22:56:33 +02:00

kbx: Use wrapper functions for es_fclose and es_fopen.

* kbx/keybox-defs.h (KEYBOX_LL_OPEN_READ)
(KEYBOX_LL_OPEN_UPDATE, KEYBOX_LL_OPEN_CREATE): New.
* kbx/keybox-init.c (_keybox_ll_open): New.  Replace all keybox use of
es_fopen by this function.
(_keybox_ll_close): New.  Replace all keybox use of es_fclose by this
function.
--

Note that this has not been done for the utilities and the backend-kbx
of keyboxd.
This commit is contained in:
Werner Koch 2023-05-05 11:37:44 +02:00
parent a7dbf11954
commit a6c4d6413a
No known key found for this signature in database
GPG key ID: E3FDFF218E45B72B
4 changed files with 120 additions and 88 deletions

View file

@ -136,6 +136,14 @@ typedef struct _keybox_openpgp_info *keybox_openpgp_info_t;
/* } keybox_opt; */
/*-- keybox-init.c --*/
#define KEYBOX_LL_OPEN_READ 0
#define KEYBOX_LL_OPEN_UPDATE 1
#define KEYBOX_LL_OPEN_CREATE 2
gpg_error_t _keybox_ll_open (estream_t *rfp, const char *fname,
unsigned int mode);
gpg_error_t _keybox_ll_close (estream_t fp);
void _keybox_close_file (KEYBOX_HANDLE hd);