mirror of
git://git.gnupg.org/gnupg.git
synced 2025-03-28 22:49:59 +01:00
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>
This commit is contained in:
parent
d2653b1a6d
commit
f7e50634be
@ -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. */
|
that the detection magic will work the next time it is used. */
|
||||||
if (is_box)
|
if (is_box)
|
||||||
{
|
{
|
||||||
FILE *fp = fopen (filename, "w");
|
FILE *fp = fopen (filename, "wb");
|
||||||
if (!fp)
|
if (!fp)
|
||||||
rc = gpg_error_from_syserror ();
|
rc = gpg_error_from_syserror ();
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user