aboutsummaryrefslogtreecommitdiffstats
path: root/keyserver/gpgkeys_ldap.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--keyserver/gpgkeys_ldap.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/keyserver/gpgkeys_ldap.c b/keyserver/gpgkeys_ldap.c
index 8ca1d1d2c..d6b280a62 100644
--- a/keyserver/gpgkeys_ldap.c
+++ b/keyserver/gpgkeys_ldap.c
@@ -952,6 +952,17 @@ build_info(const char *certid,LDAPMessage *each)
fprintf(output,"INFO %s END\n",certid);
}
+static void
+print_nocr(FILE *stream,const char *str)
+{
+ while(*str)
+ {
+ if(*str!='\r')
+ fputc(*str,stream);
+ str++;
+ }
+}
+
/* Note that key-not-found is not a fatal error */
static int
get_key(char *getkey)
@@ -1091,7 +1102,8 @@ get_key(char *getkey)
}
else
{
- fprintf(output,"%sKEY 0x%s END\n",vals[0],getkey);
+ print_nocr(output,vals[0]);
+ fprintf(output,"\nKEY 0x%s END\n",getkey);
ldap_value_free(vals);
}