mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
* gpgkeys_ldap.c (print_nocr): New. (get_key): Call it here to
canonicalize line endings. * gpgkeys_curl.c (writer): Discard everything outside the BEGIN and END lines when retrieving keys. Canonicalize line endings. (main): Accept FTPS.
This commit is contained in:
parent
1f057ff498
commit
5d257ee60e
3 changed files with 77 additions and 9 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue