1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-12-22 10:19:57 +01:00

sm, w32: Fix initial keybox creation

* sm/keydb.c (maybe_create_keybox): Open new keybox in bin mode.

--
As the header contains a timestamp we will have the conversion
problems if the keybox is not opened in binary mode.

Signed-off-by: Andre Heinecke <aheinecke@intevation.de>
This commit is contained in:
Andre Heinecke 2017-11-14 12:24:52 +01:00
parent 115a04f939
commit 5ecef193bc
No known key found for this signature in database
GPG Key ID: 2978E9D40CBABA5C

View File

@ -205,7 +205,7 @@ maybe_create_keybox (char *filename, int force, int *r_created)
/* The file does not yet exist, create it now. */
oldmask = umask (077);
fp = fopen (filename, "w");
fp = fopen (filename, "wb");
if (!fp)
{
rc = gpg_error_from_syserror ();