[git] GnuPG - branch, STABLE-BRANCH-2-2, updated. gnupg-2.2.6-21-g64c1fdd
by Andre Heinecke
cvs at cvs.gnupg.org
Fri Apr 20 15:59:07 CEST 2018
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "The GNU Privacy Guard".
The branch, STABLE-BRANCH-2-2 has been updated
via 64c1fddb253061a9773c6c4ed2a9c5a54702d21b (commit)
from a44ed3d9a1ad5bd96694f10ea5523c517982017e (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 64c1fddb253061a9773c6c4ed2a9c5a54702d21b
Author: Andre Heinecke <aheinecke at intevation.de>
Date: Fri Apr 20 15:53:58 2018 +0200
dirmngr: More binary I/O on Windows for CRLs
* dirmngr/crlcache.c (lock_db_file, crl_cache_insert): Open cache
file in binary mode.
--
CRLs on Windows would have line ending entries converted. This
did not cause problems in a surprising amount of cases but
can lead to unexpected and random parse / read errors. Especially
with large CRLs like cacert.
This bug has been around since 2004.
GnuPG-Bug-Id: T3923
Signed-off-by: Andre Heinecke <aheinecke at intevation.de>
diff --git a/dirmngr/crlcache.c b/dirmngr/crlcache.c
index 6eeeb8d..0b2fe16 100644
--- a/dirmngr/crlcache.c
+++ b/dirmngr/crlcache.c
@@ -125,6 +125,9 @@
idea anyway to limit the number of opened cache files. */
#define MAX_OPEN_DB_FILES 5
+#ifndef O_BINARY
+# define O_BINARY 0
+#endif
static const char oidstr_crlNumber[] = "2.5.29.20";
/* static const char oidstr_issuingDistributionPoint[] = "2.5.29.28"; */
@@ -1139,7 +1142,7 @@ lock_db_file (crl_cache_t cache, crl_cache_entry_t entry)
xfree (fname);
return NULL;
}
- fd = open (fname, O_RDONLY);
+ fd = open (fname, O_RDONLY | O_BINARY);
if (fd == -1)
{
log_error (_("error opening cache file '%s': %s\n"),
@@ -2051,7 +2054,7 @@ crl_cache_insert (ctrl_t ctrl, const char *url, ksba_reader_t reader)
}
}
- fd_cdb = open (fname, O_WRONLY | O_CREAT | O_TRUNC, 0644);
+ fd_cdb = open (fname, O_WRONLY | O_CREAT | O_TRUNC | O_BINARY, 0644);
if (fd_cdb == -1)
{
err = gpg_error_from_errno (errno);
-----------------------------------------------------------------------
Summary of changes:
dirmngr/crlcache.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
hooks/post-receive
--
The GNU Privacy Guard
http://git.gnupg.org
More information about the Gnupg-commits
mailing list