aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndre Heinecke <[email protected]>2017-11-14 11:24:52 +0000
committerAndre Heinecke <[email protected]>2017-11-14 11:26:29 +0000
commit5ecef193bc2144e6d51a6bd5727bfd08a0d28b66 (patch)
treefffe8a638b1d59eac0f874e7985e7b5686835a03
parentpo/da: Fix Danish confusion between "compressed" and "compromised" (diff)
downloadgnupg-5ecef193bc2144e6d51a6bd5727bfd08a0d28b66.tar.gz
gnupg-5ecef193bc2144e6d51a6bd5727bfd08a0d28b66.zip
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 <[email protected]>
-rw-r--r--sm/keydb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sm/keydb.c b/sm/keydb.c
index 87fc12d0e..d85679a3b 100644
--- a/sm/keydb.c
+++ b/sm/keydb.c
@@ -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 ();