diff options
author | David Shaw <[email protected]> | 2005-01-24 18:23:56 +0000 |
---|---|---|
committer | David Shaw <[email protected]> | 2005-01-24 18:23:56 +0000 |
commit | 5d257ee60e600675cc8cd5c2e49994ced518f292 (patch) | |
tree | 4ca683bb1fffb25cd711fbc15c5ac8eafc6d6376 /keyserver/gpgkeys_ldap.c | |
parent | * configure.ac: Define FTPS flag if we're using curl, and FTPS is (diff) | |
download | gnupg-5d257ee60e600675cc8cd5c2e49994ced518f292.tar.gz gnupg-5d257ee60e600675cc8cd5c2e49994ced518f292.zip |
* 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.
Diffstat (limited to '')
-rw-r--r-- | keyserver/gpgkeys_ldap.c | 14 |
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); } |