aboutsummaryrefslogtreecommitdiffstats
path: root/g10/keydb.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2020-10-20 09:52:16 +0000
committerWerner Koch <[email protected]>2020-10-20 10:15:56 +0000
commit390497ea115e1aca93feec297a5bd6ae7b1ba6dd (patch)
tree675448ff809e3f333bba4918e4787eacda7f8190 /g10/keydb.c
parentReplace all calls to access by gnupg_access (diff)
downloadgnupg-390497ea115e1aca93feec297a5bd6ae7b1ba6dd.tar.gz
gnupg-390497ea115e1aca93feec297a5bd6ae7b1ba6dd.zip
Replace most of the remaining stdio calls by estream calls.
-- We need to use es_fopen on Windows to cope with non-ascii file names. This is quite a large but fortunately straightforward change. At a very few places we keep using stdio (for example due to the use of popen). GnuPG-bug-id: 5098 Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'g10/keydb.c')
-rw-r--r--g10/keydb.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/g10/keydb.c b/g10/keydb.c
index ddbab7300..f32eab055 100644
--- a/g10/keydb.c
+++ b/g10/keydb.c
@@ -362,13 +362,13 @@ maybe_create_keyring_or_box (char *filename, int is_box, int force_create)
that the detection magic will work the next time it is used. */
if (is_box)
{
- FILE *fp = fopen (filename, "wb");
+ estream_t fp = es_fopen (filename, "wb");
if (!fp)
rc = gpg_error_from_syserror ();
else
{
- rc = _keybox_write_header_blob (fp, NULL, 1);
- fclose (fp);
+ rc = _keybox_write_header_blob (fp, 1);
+ es_fclose (fp);
}
if (rc)
{