aboutsummaryrefslogtreecommitdiffstats
path: root/g10/keyserver.c
diff options
context:
space:
mode:
authorDavid Shaw <[email protected]>2005-01-06 16:23:47 +0000
committerDavid Shaw <[email protected]>2005-01-06 16:23:47 +0000
commitf464dcef5946501d4c99e4f8f608a59c5e12392f (patch)
treeb46f8d1395ac4fadece08459690ded1195d408b6 /g10/keyserver.c
parent(set_native_charset): Assume that ASCII, (diff)
downloadgnupg-f464dcef5946501d4c99e4f8f608a59c5e12392f.tar.gz
gnupg-f464dcef5946501d4c99e4f8f608a59c5e12392f.zip
* filter.h, armor.c (armor_filter): Use the eol string from the armor
filter context instead of hardcoding '\n' or '\r\n'. If no eol string is provided, default to '\n' or '\r\n' as appropriate. (is_armor_header): Trim tabs in armor header lines as well. * keyserver.c (keyserver_spawn): Use it here to force '\n' line endings since the keyserver output file gets a LF->CRLF expansion on win32.
Diffstat (limited to '')
-rw-r--r--g10/keyserver.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/g10/keyserver.c b/g10/keyserver.c
index f9343980a..735b7ebe1 100644
--- a/g10/keyserver.c
+++ b/g10/keyserver.c
@@ -1,5 +1,5 @@
/* keyserver.c - generic keyserver code
- * Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+ * Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
*
* This file is part of GnuPG.
*
@@ -966,6 +966,13 @@ keyserver_spawn(int action,STRLIST list,KEYDB_SEARCH_DESC *desc,
memset(&afx,0,sizeof(afx));
afx.what=1;
+ /* Tell the armor filter to use Unix-style \n line
+ endings, since we're going to fprintf this to a file
+ that (on Win32) is open in text mode. The win32 stdio
+ will transform the \n to \r\n and we'll end up with the
+ proper line endings on win32. This is a no-op on
+ Unix. */
+ afx.eol[0]='\n';
iobuf_push_filter(buffer,armor_filter,&afx);
/* TODO: Remove Comment: lines from keys exported this