aboutsummaryrefslogtreecommitdiffstats
path: root/kbx/keybox-defs.h
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2023-05-05 09:37:44 +0000
committerWerner Koch <[email protected]>2023-05-05 09:54:37 +0000
commita6c4d6413ae0af3b3ed0d697618699233c8607cc (patch)
tree36664c105a2ea64636d9507206c2065b113c95b5 /kbx/keybox-defs.h
parentkbx: Add extra flags to fopen for use by Windows. (diff)
downloadgnupg-a6c4d6413ae0af3b3ed0d697618699233c8607cc.tar.gz
gnupg-a6c4d6413ae0af3b3ed0d697618699233c8607cc.zip
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.
Diffstat (limited to 'kbx/keybox-defs.h')
-rw-r--r--kbx/keybox-defs.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/kbx/keybox-defs.h b/kbx/keybox-defs.h
index 51ba8cd0e..3768beb3d 100644
--- a/kbx/keybox-defs.h
+++ b/kbx/keybox-defs.h
@@ -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);