1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-06-16 00:29:50 +02:00
Commit Graph

54 Commits

Author SHA1 Message Date
David Shaw
4e9797031f * gpgkeys_hkp.c (append_path, send_key, get_key, search_key, main),
gpgkeys_oldhkp.c (main): Properly handle double slashes in paths.
2005-06-21 04:24:10 +00:00
David Shaw
c347404bfd * gpgkeys_hkp.c, gpgkeys_oldhkp.c: Add support for HKP servers that
aren't at the root path.  Suggested by Jack Bates.
2005-06-04 23:09:27 +00:00
Werner Koch
7d4043ca57 Updated FSF street address and preparations for a release candidate. 2005-05-31 08:39:18 +00:00
David Shaw
5e6d360596 * gpgkeys_hkp.c, gpgkeys_oldhkp.c, ksutil.h: Some minor cleanup and
comments as to the size of MAX_LINE and MAX_URL.
2005-05-02 00:46:39 +00:00
David Shaw
0884653a13 * gpgkeys_hkp.c: New hkp handler that uses curl or curl-shim.
* Makefile.am: Build new gpgkeys_hkp.

* curl-shim.c (curl_easy_perform): Cleanup.
2005-04-17 02:18:32 +00:00
David Shaw
1517f0e945 * gpgkeys_ldap.c, ksutil.h, ksutil.c (print_nocr): Moved from
gpgkeys_ldap.c.  Print a string, but strip out any CRs.

* gpgkeys_finger.c (get_key), gpgkeys_hkp.c (get_key), gpgkeys_http.c
(get_key): Use it here when outputting key material to canonicalize
line endings.
2005-03-22 23:41:08 +00:00
David Shaw
203e4835f6 * gpgkeys_finger.c (main), gpgkeys_hkp.c (main): Fix --version output.
* gpgkeys_curl.c (main): Make sure the curl handle is cleaned up on
failure.
2005-02-05 15:04:59 +00:00
David Shaw
b663f3f8d3 * gpgkeys_hkp.c (get_key), gpgkeys_http.c (get_key): Fix missing
http_close() calls.  Noted by Phil Pennock.
2005-02-01 20:57:08 +00:00
David Shaw
996c82ffd6 * ksutil.h, gpgkeys_curl.c, gpgkeys_hkp.c, gpgkeys_ldap.c,
gpgkeys_finger.c, gpgkeys_http.c: Part 2 of the cleanup.  Move all the
various defines to ksutil.h.
2005-01-13 23:37:26 +00:00
David Shaw
0a42f97e43 * gpgkeys_finger.c, gpgkeys_hkp.c, gpgkeys_http.c, gpgkeys_ldap.c: Part 1
of a minor cleanup to use #defines instead of hard-coded sizes.
2005-01-13 23:22:10 +00:00
David Shaw
97b8f41b08 * gpgkeys_curl.c (main): New "follow-redirects" option. Takes an optional
numeric value for the maximum number of redirects to allow.  Defaults to
5.

* gpgkeys_curl.c (main), gpgkeys_finger.c (main), gpgkeys_hkp.c (main),
gpgkeys_http.c (main), gpgkeys_ldap.c (main): Make sure that a "timeout"
option passed with no arguments is properly handled.
2004-12-22 19:19:10 +00:00
David Shaw
7e9a93d017 * gpgkeys_hkp.c (send_key, get_key, search_key): Use "hkp" instead of
"x-hkp" so it can be used as a SRV tag.
2004-10-18 15:53:28 +00:00
Werner Koch
e170c54cf8 * gpgkeys_ldap.c (main, show_help): Kludge to implement standard
GNU options. Factored help printing out.
* gpgkeys_finger.c (main, show_help): Ditto.
* gpgkeys_hkp.c (main, show_help): Ditto.
* gpgkeys_http.c (main, show_help): Ditto.
* gpgkeys_test.in, gpgkeys_mailto.in: Implement --version and --help.
2004-10-15 12:19:06 +00:00
David Shaw
d603b7c3a1 * gpgkeys_ldap.c (main), gpgkeys_hkp.c (main), gpgkeys_http.c (main),
gpgkeys_finger.c (main): Call timeout functions before performing an
action that could block for a long time.

* ksutil.h, ksutil.c: New.  Right now just contains timeout functions.
2004-10-13 18:30:29 +00:00
David Shaw
e3fd0f0c60 * gpgkeys_finger.c, gpgkeys_hkp.c, gpgkeys_http.c, gpgkeys_ldap.c: Fix a
few occurances of "filename" to `filename'.
2004-10-11 20:33:22 +00:00
Stefan Bellon
159352d8b7 change back skey to unsigned and cast instead 2004-08-27 21:16:16 +00:00
Stefan Bellon
9355045841 fix type incompatibility 2004-08-27 18:21:32 +00:00
David Shaw
6c5507fff0 * gpgkeys_ldap.c (get_key, search_key), gpgkeys_hkp.c (get_key,
search_key), gpgkeys_http.c (get_key): Do not give informational logs
since this is now done inside gpg.
2004-08-23 19:54:40 +00:00
David Shaw
d612492e7d * gpgkeys_hkp.c (dehtmlize): Understand the quote character (i.e.
""") in HTML responses. (search_key): Search key must be unsigned for
url encoder to work properly for 8-bit values.
2004-08-23 17:43:40 +00:00
Werner Koch
ef3f2d81a1 (send_key): Add a content type. 2004-01-13 11:07:25 +00:00
David Shaw
580faa8675 * gpgkeys_hkp.c (search_key): Catch a mangled input file (useful if
something other than GnuPG is calling the program). (main): Avoid possible
pre-string write.  Noted by Christian Biere.

* gpgkeys_ldap.c (main): Avoid possible pre-string write.
2004-01-12 04:09:37 +00:00
David Shaw
f13f772a29 * gpgkeys_hkp.c (send_key, get_key, main): Work with new HTTP code that
passes the proxy in from the outside.  If the command file sends a proxy,
use it.  If it sends "http-proxy" with no arguments, use $http_proxy from
the environment.
2003-12-28 16:21:46 +00:00
Stefan Bellon
02ae08d6ef cleaned up RISC OS code and removed lots of unnecessary stuff 2003-12-28 14:12:16 +00:00
Werner Koch
ee3f955709 (get_key): Fixed invalid use of fprintf without
format string.
2003-11-27 12:16:43 +00:00
David Shaw
0a86b45b9d * gpgkeys_hkp.c, gpgkeys_ldap.c: #include <getopt.h> if it is available.
Also include extern references for optarg and optind since there is no
guarantee that any header file will include them.  Standards?  We don't
need no stinkin' standards

* Makefile.am: Use @GETOPT@ to pull in libiberty on those platforms that
need it.
2003-05-31 03:52:02 +00:00
David Shaw
11fc63ba93 * gpgkeys_hkp.c (dehtmlize, parse_hkp_index): Fix memory corruption bug on
some platforms.
2003-04-09 01:36:16 +00:00
David Shaw
bbd986f3d8 * gpgkeys_hkp.c (get_key): Properly handle CRLF line endings in the
armored key. (main): Accept "try-dns-srv" option.

* Makefile.am: Use @CAPLIBS@ to link in -lcap if we are using
capabilities.  Use @SRVLIBS@ to link in the resolver if we are using DNS
SRV.
2003-03-11 17:42:07 +00:00
David Shaw
39dd4d2b29 * gpgkeys_hkp.c (get_key): Use options=mr when getting a key so keyserver
doesn't attach the HTML header which we will just have to discard.
2003-01-06 23:05:39 +00:00
David Shaw
2e4e257f42 * gpgkeys_ldap.c (main), gpgkeys_hkp.c (main): Use new keyserver protocol
version.
2002-11-18 00:43:33 +00:00
David Shaw
f7b357ebfe * gpgkeys_hkp.c (send_key), gpgkeys_ldap.c (send_key): Properly handle an
input file that does not include any key data at all.
2002-11-04 13:59:08 +00:00
David Shaw
be1d2a4038 * gpgkeys_hkp.c (main), gpgkeys_ldap.c (main): Add -V flag to output
protocol and program version.
2002-10-24 22:33:22 +00:00
David Shaw
3ee825e211 * gpgkeys_hkp.c (write_quoted): Use %-encoding instead of \-encoding.
(parse_hkp_index): Use new keyserver key listing format, and add support
for disabled keys via include-disabled.
2002-10-14 20:01:05 +00:00
David Shaw
7a3e940300 * gpgkeys_ldap.c (fail_all): New function to unwind a keylist and error
each item. (main): Call fail_all from here, as needed.  Also add a
NO_MEMORY error in an appropriate place and fix error return code.
(ldap_err_to_gpg_err): Add KEYSERVER_UNREACHABLE.

* gpgkeys_hkp.c (fail_all): New function to unwind a keylist and error
each item. (main): Call fail_all from here.  Also add a NO_MEMORY error in
an appropriate place. (get_key): Use new UNREACHABLE error for network
errors.
2002-10-09 02:03:22 +00:00
David Shaw
e0512b187c * gpgkeys_hkp.c (send_key, get_key, search_key, main): Some minor error
reporting enhancements for use with GPA.
2002-09-24 19:50:09 +00:00
Werner Koch
0b180a7b9a * gpgkeys_hkp.c (handle_old_hkp_index): s/input/inp/ to avoid
shadowing warning.
2002-09-20 07:39:54 +00:00
David Shaw
5e802a7256 * gpgkeys_hkp.c (get_key, handle_old_hkp_index, search_key): Properly
handle line truncation.
2002-09-19 17:03:42 +00:00
David Shaw
81c8f7daca * gpgkeys_mailto.in: Add quasi-RFC-2368 mailto:email@addr?from= syntax so
people can set their own email address to respond to.

* gpgkeys_hkp.c (get_key): Properly respond with KEY FAILED (to gpg) and
"key not found" (to user) on failure.
2002-09-16 14:35:19 +00:00
David Shaw
5c7c9fd6cd * gpgkeys_hkp.c: (search_key, handle_old_hkp_index): Try and request a
machine-readable key index.  If the server supports this, pass it through.
If the server does not support it, parse the "index" page.
2002-09-13 18:45:36 +00:00
Stefan Bellon
3782e1595e updated RISC OS stuff 2002-09-12 16:25:36 +00:00
David Shaw
07991aa5af * gpgkeys_hkp.c (main): Remove warning - this is no longer experimental
code.
2002-09-12 12:31:31 +00:00
Werner Koch
92f8a5d12a * gpgkeys_hkp.c (send_key, get_key, search_key): Check return
value of malloc.
(dehtmlize): Use ascii_tolower to protect against weird locales.
Cast the argument for isspace for the sake of broken HP/UXes.
(search_key): Check return value of realloc.
2002-09-10 08:28:40 +00:00
David Shaw
b32a1d90e1 * gpgkeys_hkp.c (send_key): Use CRLF in headers. 2002-09-09 20:16:24 +00:00
David Shaw
262a8719a4 * gpgkeys_hkp.c: (parse_hkp_index): Use same types on all platforms.
This was probably leftover from earlier code where the typing mattered.
2002-08-28 20:10:29 +00:00
David Shaw
43ba6d43d7 * gpgkeys_hkp.c: Overall cleanup from iobuf conversion. Be consistent in
m_alloc and malloc usage.  Remove include-disabled (meaningless on HKP).
RISC OS tweak.
2002-08-28 04:04:37 +00:00
David Shaw
813fa3f98b * gpgkeys_hkp.c, Makefile.am: Convert over to using iobufs. 2002-08-27 19:11:36 +00:00
David Shaw
ce13db5e3c * gpgkeys_hkp.c (http_get, http_post): Use CRLF for line endings. 2002-08-27 14:49:23 +00:00
David Shaw
6cb18a86f5 * gpgkeys_hkp.c: Include util.h on RISC OS as per Stefan. Include a
replacement for hstrerror() for those platforms (such as RISC OS) that
don't have it.
2002-08-27 12:44:18 +00:00
David Shaw
8d4602d72c * gpgkeys_hkp.c (main): Don't warn about include-subkeys - it isn't
unsupported, it's actually non-meaningful in the context of HKP (yet).
2002-08-26 19:26:56 +00:00
David Shaw
1f5bed18f4 * gpgkeys_hkp.c (parse_hkp_index, dehtmlize): Move HTML functionality into
new "dehtmlize" function.  Remove HTML before trying to parse each line
from the keyserver.  If the keyserver provides key type information in the
listing, use it.  (Copy over from g10/hkp.c).
2002-08-26 19:22:48 +00:00
David Shaw
0d8006450a * gpgkeys_hkp.c (get_key, parse_hkp_index): Bring over latest code from
g10/hkp.c.

* gpgkeys_ldap.c (get_key): Fix cosmetic URL display problem (extra ":" at
the end).
2002-08-19 21:14:57 +00:00