diff options
author | Andre Heinecke <aheinecke@intevation.de> | 2016-10-21 14:59:26 +0200 |
---|---|---|
committer | Andre Heinecke <aheinecke@intevation.de> | 2016-10-21 15:02:19 +0200 |
commit | f7e50634be71ce3028726f23edf14454109a04a8 (patch) | |
tree | df530b17bccddff875e7b3b161611e93f3d703af /g10/keydb.c | |
parent | g10,scd: Fix ECC keygen. (diff) | |
download | gnupg2-f7e50634be71ce3028726f23edf14454109a04a8.tar.xz gnupg2-f7e50634be71ce3028726f23edf14454109a04a8.zip |
g10: Write first keybox record in binary mode
* g10/keydb.c (maybe_create_keyring_or_box): Open in binary mode.
--
This fixes keybox corruption on windows.
Signed-off-by: Andre Heinecke <aheinecke@intevation.de>
Diffstat (limited to 'g10/keydb.c')
-rw-r--r-- | g10/keydb.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/g10/keydb.c b/g10/keydb.c index e49e25fd9..b959f0521 100644 --- a/g10/keydb.c +++ b/g10/keydb.c @@ -415,7 +415,7 @@ 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, "w"); + FILE *fp = fopen (filename, "wb"); if (!fp) rc = gpg_error_from_syserror (); else |