1 2007-10-25 David Shaw <dshaw@jabberwocky.com> (wk)
5 * gpgkeys_ldap.c (main): Fix bug in setting up whether to verify
6 peer SSL cert. This used to work with older OpenLDAP, but is now
9 * gpgkeys_ldap.c (search_key, main): Fix bug where searching for
10 foo bar (no quotes) on the command line resulted in searching for
11 "foo\2Abar" due to LDAP quoting. The proper search is "foo*bar".
13 2007-06-11 Werner Koch <wk@g10code.com>
15 * gpgkeys_hkp.c (send_key): Rename eof to r_eof as some Windows
16 header defines such a symbol.
19 2007-06-06 Werner Koch <wk@g10code.com>
21 * gpgkeys_ldap.c (send_key, send_key_keyserver): Rename eof to
22 r_eof as some Windows file has such a symbol.
25 2007-05-07 Werner Koch <wk@g10code.com>
27 * Makefile.am (gpg2keys_ldap_LDADD): Add GPG_ERROR_LIBS.
29 2007-05-04 Werner Koch <wk@g10code.com>
31 * gpgkeys_test.in: Rename to ..
32 * gpg2keys_test.in: .. this.
33 * gpgkeys_mailto.in: Rename to ..
34 * gpg2keys_mailto.in: .. this
35 * Makefile.am: Likewise
37 2007-03-13 David Shaw <dshaw@jabberwocky.com>
39 From STABLE-BRANCH-1-4
41 * gpgkeys_curl.c (main): Use curl_version_info to verify that the
42 protocol we're about to use is actually available.
44 * curl-shim.h, curl-shim.c (curl_free): Make into a macro.
45 (curl_version_info): New. Only advertises "http" for our shim, of
48 2007-03-09 David Shaw <dshaw@jabberwocky.com>
50 From STABLE-BRANCH-1-4
52 * gpgkeys_ldap.c (send_key): Missing a free().
54 * curl-shim.c (curl_easy_perform): Some debugging items that may
57 2006-12-03 David Shaw <dshaw@jabberwocky.com>
59 * gpgkeys_hkp.c (search_key): HKP keyservers like the 0x to be
60 present when searching by keyID.
62 2006-11-22 Werner Koch <wk@g10code.com>
64 * Makefile.am (gpg2keys_ldap_LDADD): Add jnlib. This is needed
65 for some replacement functions.
67 2006-11-21 Werner Koch <wk@g10code.com>
69 * curl-shim.c (curl_easy_perform): Made BUFLEN and MAXLNE a size_t.
71 2006-11-05 David Shaw <dshaw@jabberwocky.com>
73 * gpgkeys_hkp.c (curl_mrindex_writer): Revert previous change.
74 Key-not-found still has a HTML response.
76 2006-10-24 Marcus Brinkmann <marcus@g10code.de>
78 * Makefile.am (gpg2keys_ldap_CPPFLAGS): Rename second instance to ...
79 (gpg2keys_finger_CPPFLAGS): ... this.
81 2006-10-20 Werner Koch <wk@g10code.com>
83 * Makefile.am: Reporder macros for better readability.
84 (gpg2keys_finger_LDADD): Add GPG_ERROR_LIBS.
86 2006-10-19 David Shaw <dshaw@jabberwocky.com>
88 * gpgkeys_hkp.c (curl_mrindex_writer): Print a warning if we see
89 HTML coming back from a MR hkp query.
91 2006-10-17 Werner Koch <wk@g10code.com>
93 * Makefile.am: Removed W32LIBS as they are included in NETLIBS.
96 2006-09-26 Werner Koch <wk@g10code.com>
98 * curl-shim.c: Adjusted for changes in http.c.
99 (curl_easy_perform): Changed LINE from unsigned char* to char*.
101 * Makefile.am (gpg2keys_curl_LDADD, gpg2keys_hkp_LDADD)
102 [FAKE_CURL]: Need to link against common_libs and pth.
104 * curl-shim.h, curl-shim.c: Removed license exception as not
107 2006-09-22 Werner Koch <wk@g10code.com>
109 * gpgkeys_curl.c, gpgkeys_hkp.c, gpgkeys_ldap.c, curl-shim.c:
110 * curl-shim.h, ksutil.c, ksutil.h: Add special license exception
111 for OpenSSL. This helps to avoid license conflicts if OpenLDAP or
112 cURL is linked against OpenSSL and we would thus indirectly link
113 to OpenSSL. This is considered a bug fix and forgives all
114 possible violations, pertaining to this issue, possibly occured in
117 * no-libgcrypt.c: Changed license to a simple all permissive one.
119 * Makefile.am (gpg2keys_ldap_LDADD): For license reasons do not
120 link against common_libs.
121 (gpg2keys_curl_LDADD, gpg2keys_hkp_LDADD): Ditto.
122 * ksutil.c (ks_hextobyte, ks_toupper, ks_strcasecmp): New.
123 Identical to the ascii_foo versions from jnlib.
124 * gpgkeys_ldap.c: Include assert.h.
125 (main): Replace BUG by assert.
126 (build_attrs): Use ks_hextobyte and ks_strcasecmp.
128 * gpgkeys_finger.c (get_key): Resolved signed/unisgned char
131 2006-09-19 Werner Koch <wk@g10code.com>
133 * no-libgcrypt.c: New. Taken from ../tools.
134 * Makefile.am: Add no-libgcrypt to all sources.
136 2006-09-06 Marcus Brinkmann <marcus@g10code.de>
138 * Makefile.am (AM_CFLAGS): Add $(GPG_ERROR_CFLAGS).
140 2006-08-16 Werner Koch <wk@g10code.com>
142 * Makefile.am: Renamed all binaries to gpg2keys_*.
143 (gpg2keys_ldap_CPPFLAGS): Add AM_CPPFLAGS.
145 2006-08-15 Werner Koch <wk@g10code.com>
147 * Makefile.am: Adjusted to the gnupg2 framework.
149 2006-08-14 Werner Koch <wk@g10code.com>
151 * curl-shil.c, curl-shim.h: Changed to make use of the new http.c
154 * curl-shim.c (curl_easy_perform): Add missing http_close to the
157 2006-07-24 David Shaw <dshaw@jabberwocky.com> (wk)
159 * curl-shim.c (curl_easy_perform): Minor cleanup of proxy code.
161 * gpgkeys_hkp.c (send_key)
162 * gpgkeys_ldap.c (send_key, send_key_keyserver): Fix string
163 matching problem when the ascii armored form of the key happens to
164 match "KEY" at the beginning of the line.
166 2006-04-26 David Shaw <dshaw@jabberwocky.com>
168 * gpgkeys_http.c, gpgkeys_oldhkp.c: Removed.
170 * Makefile.am: Don't build gpgkeys_http or gpgkeys_(old)hkp any
171 longer as this is done via curl or fake-curl.
173 * ksutil.h, ksutil.c, gpgkeys_hkp.c, gpgkeys_curl.c: Minor
174 #include tweaks as FAKE_CURL is no longer meaningful.
176 2006-04-10 David Shaw <dshaw@jabberwocky.com>
178 * gpgkeys_ldap.c (ldap_quote, get_name, search_key): LDAP-quote
179 directly into place rather than mallocing temporary buffers.
181 * gpgkeys_ldap.c (get_name): Build strings with strcat rather than
182 using sprintf which is harder to read and modify.
184 * ksutil.h, ksutil.c (classify_ks_search): Add
185 KS_SEARCH_KEYID_SHORT and KS_SEARCH_KEYID_LONG to search for a key
188 * gpgkeys_ldap.c (search_key): Use it here to flip from pgpUserID
189 searches to pgpKeyID or pgpCertID.
191 2006-03-27 David Shaw <dshaw@jabberwocky.com>
193 * gpgkeys_ldap.c: #define LDAP_DEPRECATED for newer OpenLDAPs so
194 they use the regular old API that is compatible with other LDAP
197 2006-03-03 David Shaw <dshaw@jabberwocky.com>
199 * gpgkeys_ldap.c (main): Fix build problem with non-OpenLDAP LDAP
200 libraries that have TLS.
202 2006-02-23 David Shaw <dshaw@jabberwocky.com>
204 * ksutil.c (init_ks_options): Default include-revoked and
205 include-subkeys to on, as gpg isn't doing this any longer.
207 2006-02-22 David Shaw <dshaw@jabberwocky.com>
209 * gpgkeys_hkp.c (get_name): A GETNAME query turns exact=on to cut
212 2006-02-21 David Shaw <dshaw@jabberwocky.com>
214 * gpgkeys_ldap.c (make_one_attr, build_attrs, send_key): Don't
215 allow duplicate attributes as OpenLDAP is now enforcing this.
217 * gpgkeys_ldap.c (main): Add binddn and bindpw so users can pass
218 credentials to a remote LDAP server.
220 * curl-shim.h, curl-shim.c (curl_easy_init, curl_easy_setopt,
221 curl_easy_perform): Mingw has 'stderr' as a macro?
223 * curl-shim.h, curl-shim.c (curl_easy_init, curl_easy_setopt,
224 curl_easy_perform): Add CURLOPT_VERBOSE and CURLOPT_STDERR for
227 2006-01-16 David Shaw <dshaw@jabberwocky.com>
229 * gpgkeys_hkp.c (send_key): Do not escape the '=' in the HTTP POST
230 when uploading a key.
232 2005-12-23 David Shaw <dshaw@jabberwocky.com>
234 * ksutil.h, ksutil.c (parse_ks_options): New keyserver command
237 * gpgkeys_hkp.c (main, get_name), gpgkeys_ldap.c (main, get_name):
238 Use it here to do direct name (rather than key ID) fetches.
240 2005-12-19 David Shaw <dshaw@jabberwocky.com>
242 * ksutil.h, ksutil.c (curl_armor_writer, curl_writer,
243 curl_writer_finalize): New functionality to handle binary format
244 keys by armoring them for input to GPG.
246 * gpgkeys_curl.c (get_key), gpgkeys_hkp.c (get_key): Call it here.
248 2005-12-07 David Shaw <dshaw@jabberwocky.com>
250 * gpgkeys_finger.c (get_key), gpgkeys_curl.c (get_key): Better
251 language for the key-not-found error.
253 * ksutil.c (curl_err_to_gpg_err): Add CURLE_OK and
254 CURLE_COULDNT_CONNECT.
256 * gpgkeys_curl.c (get_key): Give key-not-found error if no data is
257 found (or file itself is not found) during a fetch.
259 2005-12-06 David Shaw <dshaw@jabberwocky.com>
261 * curl-shim.c (curl_easy_perform): Fix build warning (code before
264 2005-11-02 David Shaw <dshaw@jabberwocky.com>
266 * gpgkeys_hkp.c (search_key): Fix warning with typecast (though
267 curl should really have defined that char * as const).
269 2005-08-25 David Shaw <dshaw@jabberwocky.com>
271 * ksutil.h, ksutil.c (parse_ks_options): Remove exact-name and
273 (classify_ks_search): Mimic the gpg search modes instead with *,
276 * gpgkeys_ldap.c (search_key), gpgkeys_hkp.c (search_key): Call
277 them here. Suggested by Jason Harris.
279 2005-08-18 David Shaw <dshaw@jabberwocky.com>
281 * ksutil.h, ksutil.c (parse_ks_options): New keyserver-option
282 exact-name. The last of exact-name and exact-email overrides the
285 * gpgkeys_ldap.c (search_key), gpgkeys_hkp.c (search_key): Use it
286 here to do a name-only search.
288 * gpgkeys_ldap.c (ldap_quote): \-quote a string for LDAP.
290 * gpgkeys_ldap.c (search_key): Use it here to escape reserved
291 characters in searches.
293 2005-08-17 David Shaw <dshaw@jabberwocky.com>
295 * ksutil.h, ksutil.c (parse_ks_options): New keyserver-option
298 * gpgkeys_ldap.c (search_key), gpgkeys_hkp.c (search_key): Use it
299 here to do an email-only search.
301 2005-08-08 David Shaw <dshaw@jabberwocky.com>
303 * Makefile.am: Include LDAP_CPPFLAGS when building LDAP.
305 2005-08-03 David Shaw <dshaw@jabberwocky.com>
307 * gpgkeys_hkp.c (main), gpgkeys_curl.c (main), curl-shim.h: Show
308 version of curl (or curl-shim) when debug is set.
310 2005-07-20 David Shaw <dshaw@jabberwocky.com>
312 * gpgkeys_curl.c (get_key, main): Don't try and be smart about
313 what protocols we handle. Directly pass them to curl or fake-curl
314 and see if an error comes back.
316 * curl-shim.h, curl-shim.c (handle_error), ksutil.c
317 (curl_err_to_gpg_err): Add support for CURLE_UNSUPPORTED_PROTOCOL
320 * Makefile.am: Don't need -DFAKE_CURL any longer since it's in
323 2005-06-23 David Shaw <dshaw@jabberwocky.com>
325 * gpgkeys_mailto.in, gpgkeys_test.in: Use @VERSION@ so version
326 string stays up to date.
328 * gpgkeys_http.c: Don't need to define HTTP_PROXY_ENV here since
331 * gpgkeys_curl.c (get_key, main), gpgkeys_hkp.c (main): Pass AUTH
332 values to curl or curl-shim.
334 * curl-shim.c (curl_easy_perform), gpgkeys_curl.c (main),
335 gpgkeys_hkp.c (main): Use curl-style proxy semantics.
337 * curl-shim.h, curl-shim.c (curl_easy_setopt, curl_easy_perform):
338 Add CURLOPT_USERPWD option for HTTP auth.
340 * gpgkeys_http.c (get_key), gpgkeys_oldhkp (send_key, get_key,
341 search_key): No longer need to pass a proxyauth.
343 * gpgkeys_http.c (get_key): Pass auth outside of the URL.
345 2005-06-21 David Shaw <dshaw@jabberwocky.com>
347 * gpgkeys_http.c (get_key), gpgkeys_oldhkp.c (send_key, get_key,
348 search_key): Fix http_open/http_open_document calls to pass NULL
349 for auth and proxyauth since these programs pass them in the URL.
351 2005-06-20 David Shaw <dshaw@jabberwocky.com>
353 * gpgkeys_hkp.c (append_path, send_key, get_key, search_key,
354 main), gpgkeys_oldhkp.c (main): Properly handle double slashes in
357 2005-06-05 David Shaw <dshaw@jabberwocky.com>
359 * ksutil.c (init_ks_options, parse_ks_options): Provide a default
360 "/" path unless overridden by the config. Allow config to specify
361 items multiple times and take the last specified item.
363 2005-06-04 David Shaw <dshaw@jabberwocky.com>
365 * gpgkeys_hkp.c, gpgkeys_oldhkp.c: Add support for HKP servers
366 that aren't at the root path. Suggested by Jack Bates.
368 2005-06-01 David Shaw <dshaw@jabberwocky.com>
370 * ksutil.c [HAVE_DOSISH_SYSTEM]: Fix warnings on mingw32. Noted
373 2005-05-04 David Shaw <dshaw@jabberwocky.com>
375 * ksutil.h, ksutil.c: #ifdef so we can build without libcurl or
378 2005-05-03 David Shaw <dshaw@jabberwocky.com>
380 * gpgkeys_http.c: Need GET defined.
382 2005-05-01 David Shaw <dshaw@jabberwocky.com>
384 * gpgkeys_hkp.c, gpgkeys_oldhkp.c, ksutil.h: Some minor cleanup
385 and comments as to the size of MAX_LINE and MAX_URL.
387 2005-04-16 David Shaw <dshaw@jabberwocky.com>
389 * gpgkeys_hkp.c: New hkp handler that uses curl or curl-shim.
391 * Makefile.am: Build new gpgkeys_hkp.
393 * curl-shim.c (curl_easy_perform): Cleanup.
395 * ksutil.h, ksutil.c (curl_writer), gpgkeys_curl.c (get_key): Pass
396 a context to curl_writer so we can support multiple fetches in a
399 * curl-shim.h, curl-shim.c (handle_error, curl_easy_setopt,
400 curl_easy_perform): Add POST functionality to the curl shim.
402 * curl-shim.h, curl-shim.c (curl_escape, curl_free): Emulate
403 curl_escape and curl_free.
405 * gpgkeys_curl.c (main): If the http-proxy option is given without
406 any arguments, try to get the proxy from the environment.
408 * ksutil.h, ksutil.c (curl_err_to_gpg_err, curl_writer): Copy from
411 * gpgkeys_oldhkp.c: Copy from gpgkeys_hkp.c.
413 2005-03-22 David Shaw <dshaw@jabberwocky.com>
415 * gpgkeys_ldap.c, ksutil.h, ksutil.c (print_nocr): Moved from
416 gpgkeys_ldap.c. Print a string, but strip out any CRs.
418 * gpgkeys_finger.c (get_key), gpgkeys_hkp.c (get_key),
419 gpgkeys_http.c (get_key): Use it here when outputting key material
420 to canonicalize line endings.
422 2005-03-19 David Shaw <dshaw@jabberwocky.com>
424 * gpgkeys_ldap.c (main): Fix three wrong calls to fail_all().
425 Noted by Stefan Bellon.
427 2005-03-17 David Shaw <dshaw@jabberwocky.com>
429 * ksutil.c (parse_ks_options): Handle verbose=nnn.
431 * Makefile.am: Calculate GNUPG_LIBEXECDIR directly. Do not
432 redefine $libexecdir.
434 * gpgkeys_curl.c, gpgkeys_finger.c, gpgkeys_ldap.c: Start using
435 parse_ks_options and remove a lot of common code.
437 * ksutil.h, ksutil.c (parse_ks_options): Parse OPAQUE, and default
438 debug with no arguments to 1.
440 2005-03-16 David Shaw <dshaw@jabberwocky.com>
442 * gpgkeys_ldap.c: Include lber.h if configure determines we need
445 * ksutil.h, ksutil.c (ks_action_to_string): New.
446 (free_ks_options): Only free if options exist.
448 * ksutil.h, ksutil.c (init_ks_options, free_ks_options,
449 parse_ks_options): Pull a lot of duplicated code into a single
450 options parser for all keyserver helpers.
452 2005-02-11 David Shaw <dshaw@jabberwocky.com>
454 * curl-shim.c (curl_easy_perform): Fix compile warning.
456 * curl-shim.h, gpgkeys_curl.c (main), gpgkeys_ldap.c (main): Add
457 ca-cert-file option, to pass in the SSL cert.
459 * curl-shim.h, curl-shim.c: New. This is code to fake the curl
460 API in terms of the current HTTP iobuf API.
462 * gpgkeys_curl.c [FAKE_CURL], Makefile.am: If FAKE_CURL is set,
463 link with the iobuf code rather than libcurl.
465 2005-02-05 David Shaw <dshaw@jabberwocky.com>
467 * gpgkeys_finger.c (main), gpgkeys_hkp.c (main): Fix --version
470 * gpgkeys_curl.c (main): Make sure the curl handle is cleaned up
473 2005-02-01 David Shaw <dshaw@jabberwocky.com>
475 * gpgkeys_hkp.c (get_key), gpgkeys_http.c (get_key): Fix missing
476 http_close() calls. Noted by Phil Pennock.
478 * ksutil.h: Up the default timeout to two minutes.
480 2005-01-24 David Shaw <dshaw@jabberwocky.com>
482 * gpgkeys_ldap.c (print_nocr): New.
483 (get_key): Call it here to canonicalize line endings.
485 * gpgkeys_curl.c (writer): Discard everything outside the BEGIN
486 and END lines when retrieving keys. Canonicalize line endings.
489 2005-01-21 David Shaw <dshaw@jabberwocky.com>
491 * gpgkeys_ldap.c (main): Add "check-cert" option to disable SSL
492 certificate checking (which is on by default).
494 * gpgkeys_curl.c (main): Add "debug" option to match the LDAP
495 helper. Add "check-cert" option to disable SSL certificate
496 checking (which is on by default).
498 2005-01-18 David Shaw <dshaw@jabberwocky.com>
500 * gpgkeys_curl.c: Fix typo.
502 2005-01-18 Werner Koch <wk@g10code.com>
504 * gpgkeys_curl.c: s/MAX_PATH/URLMAX_PATH/g to avoid a clash with
505 the W32 defined macro. Removed unneeded initialization of static
507 * gpgkeys_http.c: Ditto.
508 * ksutil.h: s/MAX_PATH/URLMAX_PATH/.
510 2005-01-17 David Shaw <dshaw@jabberwocky.com>
512 * gpgkeys_curl.c (main): Only allow specified protocols to use the
515 * Makefile.am: Use LIBCURL_CPPFLAGS instead of LIBCURL_INCLUDES.
517 2005-01-13 David Shaw <dshaw@jabberwocky.com>
519 * ksutil.h, gpgkeys_curl.c, gpgkeys_hkp.c, gpgkeys_ldap.c,
520 gpgkeys_finger.c, gpgkeys_http.c: Part 2 of the cleanup. Move all
521 the various defines to ksutil.h.
523 * gpgkeys_finger.c, gpgkeys_hkp.c, gpgkeys_http.c, gpgkeys_ldap.c:
524 Part 1 of a minor cleanup to use #defines instead of hard-coded
527 * gpgkeys_finger.c (connect_server): Use INADDR_NONE instead of
528 SOCKET_ERROR. Noted by Timo.
530 2005-01-09 David Shaw <dshaw@jabberwocky.com>
532 * gpgkeys_curl.c (get_key): Newer versions of libcurl don't define
535 2004-12-24 David Shaw <dshaw@jabberwocky.com>
537 * gpgkeys_curl.c (main): Use new defines for opting out of certain
538 transfer protocols. Allow setting HTTP proxy via "http-proxy=foo"
539 option (there is natural support in libcurl for the http_proxy
540 environment variable).
542 * Makefile.am: Remove the conditional since this is all handled in
545 2004-12-22 David Shaw <dshaw@jabberwocky.com>
547 * gpgkeys_curl.c (main): New "follow-redirects" option. Takes an
548 optional numeric value for the maximum number of redirects to
549 allow. Defaults to 5.
551 * gpgkeys_curl.c (main), gpgkeys_finger.c (main), gpgkeys_hkp.c
552 (main), gpgkeys_http.c (main), gpgkeys_ldap.c (main): Make sure
553 that a "timeout" option passed with no arguments is properly
556 * gpgkeys_curl.c (get_key, writer): New function to wrap around
557 fwrite to avoid DLL access problem on win32.
559 * gpgkeys_http.c (main, get_key): Properly pass authentication
560 info through to the http library.
562 * Makefile.am: Build gpgkeys_http or gpgkeys_curl as needed.
564 * gpgkeys_curl.c (main, get_key): Minor tweaks to work with either
567 * gpgkeys_ftp.c: renamed to gpgkeys_curl.c.
569 * gpgkeys_ftp.c (main, get_key): Use auth data as passed by gpg.
570 Use CURLOPT_FILE instead of CURLOPT_WRITEDATA (same option, but
571 backwards compatible).
573 2004-12-21 David Shaw <dshaw@jabberwocky.com>
575 * gpgkeys_ftp.c: New.
577 * Makefile.am: Build it if requested.
579 2004-12-14 Werner Koch <wk@g10code.com>
581 * Makefile.am (install-exec-hook, uninstall-hook): Removed. For
582 Windows reasons we can't use the symlink trick.
584 2004-12-03 David Shaw <dshaw@jabberwocky.com>
586 * Makefile.am: The harmless "ignored error" on gpgkeys_ldap
587 install on top of an existing install is bound to confuse people.
588 Use ln -s -f to force the overwrite.
590 2004-10-28 David Shaw <dshaw@jabberwocky.com>
592 * gpgkeys_finger.c [_WIN32] (connect_server): Fix typo.
594 2004-10-28 Werner Koch <wk@g10code.com>
596 * Makefile.am (other_libs): New. Also include LIBICONV. Noted by
599 2004-10-28 Werner Koch <wk@g10code.com>
601 * Makefile.am (other_libs):
603 2004-10-18 David Shaw <dshaw@jabberwocky.com>
605 * gpgkeys_hkp.c (send_key, get_key, search_key): Use "hkp" instead
606 of "x-hkp" so it can be used as a SRV tag.
608 2004-10-16 David Shaw <dshaw@jabberwocky.com>
610 * gpgkeys_finger.c [_WIN32] (connect_server): Fix typo.
612 2004-10-15 Werner Koch <wk@g10code.com>
614 * gpgkeys_ldap.c (main, show_help): Kludge to implement standard
615 GNU options. Factored help printing out.
616 * gpgkeys_finger.c (main, show_help): Ditto.
617 * gpgkeys_hkp.c (main, show_help): Ditto.
618 * gpgkeys_http.c (main, show_help): Ditto.
619 * gpgkeys_test.in, gpgkeys_mailto.in: Implement --version and --help.
621 * Makefile.am: Add ksutil.h.
623 2004-10-14 David Shaw <dshaw@jabberwocky.com>
625 * gpgkeys_finger.c (main): We do not support relay fingering
626 (i.e. "finger://relayhost/user@example.com"), but finger URLs are
627 occasionally miswritten that way. Give an error in this case.
629 2004-10-14 Werner Koch <wk@g10code.com>
631 * gpgkeys_finger.c (get_key): s/unsigned char/byte/ due
632 to a strange typedef for RISC OS. Noted by Stefan.
634 2004-10-13 David Shaw <dshaw@jabberwocky.com>
636 * gpgkeys_ldap.c (main), gpgkeys_hkp.c (main), gpgkeys_http.c
637 (main), gpgkeys_finger.c (main): Call timeout functions before
638 performing an action that could block for a long time.
640 * ksutil.h, ksutil.c: New. Right now just contains timeout
643 2004-10-11 David Shaw <dshaw@jabberwocky.com>
645 * gpgkeys_finger.c, gpgkeys_hkp.c, gpgkeys_http.c, gpgkeys_ldap.c:
646 Fix a few occurances of "filename" to `filename'.
648 2004-10-11 Werner Koch <wk@g10code.com>
650 * gpgkeys_finger.c: New.
652 2004-08-27 Stefan Bellon <sbellon@sbellon.de>
654 * gpgkeys_hkp.c (search_key): Fix the prior faulty fix by
655 introducing a cast but leaving skey unsigned.
657 * gpgkeys_hkp.c (search_key): Change type of variable skey from
658 unsigned char* to char* to fix type incompatibility.
660 2004-08-23 David Shaw <dshaw@jabberwocky.com>
662 * gpgkeys_ldap.c (get_key, search_key), gpgkeys_hkp.c (get_key,
663 search_key), gpgkeys_http.c (get_key): Do not give informational
664 logs since this is now done inside gpg.
666 * gpgkeys_hkp.c (dehtmlize): Understand the quote character
667 (i.e. """) in HTML responses.
668 (search_key): Search key must be unsigned for url encoder to work
669 properly for 8-bit values.
671 * gpgkeys_ldap.c (get_key): Factor out informational display into
672 new function build_info().
674 * gpgkeys_ldap.c (build_attrs): Properly terminate user ID strings
675 that got shrunk due to encoding.
677 2004-08-22 David Shaw <dshaw@jabberwocky.com>
679 * gpgkeys_ldap.c (find_basekeyspacedn): Use LDAP_SCOPE_BASE along
680 with a full DN rather than LDAP_SCOPE_ONELEVEL plus a filter to
681 find the pgpServerInfo object. Some LDAP setups don't like the
683 (main): Stop binding to the server since it seems no server really
684 requires it, and some require it not be there.
686 2004-07-29 David Shaw <dshaw@jabberwocky.com>
688 * gpgkeys_ldap.c (main): Add "debug" option. This is only really
689 useful with OpenLDAP, but it's practically vital to debug SSL and
690 TLS setups. Add "basedn" option. This allows users to override
691 the autodetection for base DN. SSL overrides TLS, so TLS will not
692 be started on SSL connections (starting an already started car).
694 2004-07-28 David Shaw <dshaw@jabberwocky.com>
696 * gpgkeys_ldap.c (build_attrs): Add "pgpKeySize" and "pgpSubKeyID"
697 attributes so we can do subkey searches.
699 * gpgkeys_ldap.c (main): Under certain error conditions, we might
700 try and unbind twice. Don't.
702 * gpgkeys_ldap.c (join_two_modlists): New.
703 (send_key): Use new function so we can try a modify operation
704 first, and fail over to an add if that fails. Add cannot cope
705 with the NULLs at the head of the modify request, so we jump into
706 the list in the middle.
708 2004-07-27 David Shaw <dshaw@jabberwocky.com>
710 * gpgkeys_ldap.c (main): Don't try and error out before making a
711 ldaps connection to the NAI keyserver since we cannot tell if it
712 is a NAI keyserver until we connect. Fail if we cannot find a
713 base keyspace DN. Fix a false success message for TLS being
716 2004-07-20 Werner Koch <wk@gnupg.org>
718 * gpgkeys_ldap.c [_WIN32]: Include Windows specific header files.
719 Suggested by Brian Gladman.
721 2004-05-26 David Shaw <dshaw@jabberwocky.com>
723 * gpgkeys_http.c: General polish and removal of leftover stuff
726 2004-05-21 David Shaw <dshaw@jabberwocky.com>
728 * gpgkeys_http.c (get_key): Cosmetic fix - make sure that URLs
729 with no path use a path of "/".
731 * gpgkeys_ldap.c (ldap2epochtime): We can always rely on timegm()
732 being available now, since it's a replacement function.
734 2004-05-20 David Shaw <dshaw@jabberwocky.com>
736 * gpgkeys_http.c: New program to do a simple HTTP file fetch using
737 the keyserver interface.
739 * Makefile.am: Build it.
741 2004-02-28 David Shaw <dshaw@jabberwocky.com>
743 * Makefile.am: Don't split LDADD across two lines since some make
744 programs can't handle blank lines after a \ continuation. Noted
745 by Christoph Moench-Tegeder.
747 2004-02-25 David Shaw <dshaw@jabberwocky.com>
749 * gpgkeys_ldap.c (send_key): List pgpCertID as one of the deleted
750 attributes. This guarantees that if something goes wrong, we
751 won't be able to complete the transaction, thus leaving any key
752 already existing on the server intact.
754 2004-02-23 David Shaw <dshaw@jabberwocky.com>
756 * gpgkeys_ldap.c (delete_one_attr): Removed.
757 (make_one_attr): Delete functionality added. Optional deduping
758 functionality added (currently only used for pgpSignerID).
759 (build_attrs): Translate sig entries into pgpSignerID. Properly
760 build the timestamp for pgpKeyCreateTime and pgpKeyExpireTime.
762 2004-02-22 David Shaw <dshaw@jabberwocky.com>
764 * gpgkeys_ldap.c (delete_one_attr): New function to replace
765 attributes with NULL (a "delete" that works even for nonexistant
767 (send_key): Use it here to remove attributes so a modify operation
768 starts with a clean playing field. Bias sends to modify before
769 add, since (I suspect) people update their existing keys more
770 often than they make and send new keys to the server.
772 2004-02-21 David Shaw <dshaw@jabberwocky.com>
774 * gpgkeys_ldap.c (epoch2ldaptime): New. Converse of
776 (make_one_attr): New. Build a modification list in memory to send
778 (build_attrs): New. Parse INFO lines sent over by gpg.
779 (free_mod_values): New. Unwinds a modification list.
780 (send_key_keyserver): Renamed from old send_key().
781 (send_key): New function to send a key to a LDAP server.
782 (main): Use send_key() for real LDAP servers, send_key_keyserver()
785 2004-02-20 David Shaw <dshaw@jabberwocky.com>
787 * gpgkeys_ldap.c: Replacement prototypes for setenv and unsetenv.
788 (search_key): Catch a SIZELIMIT_EXCEEDED error and show the user
789 whatever the server did give us.
790 (find_basekeyspacedn): There is no guarantee that namingContexts
793 * Makefile.am: Link gpgkeys_ldap with libutil.a to get the
794 replacement functions (and eventually translations, etc).
796 2004-02-19 David Shaw <dshaw@jabberwocky.com>
798 * gpgkeys_ldap.c (ldap2epochtime): LDAP timestamps are UTC, so do
799 not correct for timezones.
800 (main): Find the basekeyspacedn before we try to start TLS, so we
801 can give a better error message when a user tries to use TLS with
804 * Makefile.am: Add automake conditionals to symlink gpgkeys_ldaps
805 to gpgkeys_ldap when needed.
807 * gpgkeys_ldap.c (main): Add support for LDAPS and TLS
808 connections. These are only useful and usable when talking to
809 real LDAP keyservers. Add new "tls" option to tune TLS use from
810 off, to try quietly, to try loudly, or to require TLS.
812 * gpgkeys_ldap.c (find_basekeyspacedn): New function to figure out
813 what kind of LDAP server we're talking to (either real LDAP or the
814 LDAP keyserver), and return the baseKeySpaceDN to find keys under.
815 (main): Call it from here, and remove the old code that only
816 handled the LDAP keyserver.
818 2004-02-18 David Shaw <dshaw@jabberwocky.com>
820 * gpgkeys_ldap.c (ldap_to_gpg_err): Make sure that
821 LDAP_OPT_ERROR_NUMBER is defined before we use it.
823 * gpgkeys_mailto.in: Fix VERSION number.
825 2004-01-13 Werner Koch <wk@gnupg.org>
827 * gpgkeys_hkp.c (send_key): Add a content type.
829 2004-01-11 David Shaw <dshaw@jabberwocky.com>
831 * gpgkeys_hkp.c (search_key): Catch a mangled input file (useful
832 if something other than GnuPG is calling the program).
833 (main): Avoid possible pre-string write. Noted by Christian
836 * gpgkeys_ldap.c (main): Avoid possible pre-string write.
838 2003-12-28 David Shaw <dshaw@jabberwocky.com>
840 * gpgkeys_hkp.c (send_key, get_key, main): Work with new HTTP code
841 that passes the proxy in from the outside. If the command file
842 sends a proxy, use it. If it sends "http-proxy" with no
843 arguments, use $http_proxy from the environment. Suggested by
846 2003-12-28 Stefan Bellon <sbellon@sbellon.de>
848 * gpgkeys_hkp.c, gpgkeys_ldap.c [__riscos__]: Removal of
849 unnecessary #ifdef __riscos__ sections.
851 2003-11-27 Werner Koch <wk@gnupg.org>
853 * gpgkeys_hkp.c (get_key): Fixed invalid use of fprintf without
856 2003-10-25 Werner Koch <wk@gnupg.org>
858 * Makefile.am (gpgkeys_hkp_LDADD): Replaced INTLLIBS by LIBINTL.
860 2003-07-10 David Shaw <dshaw@jabberwocky.com>
862 * Makefile.am: Use W32LIBS where appropriate.
864 2003-05-30 David Shaw <dshaw@jabberwocky.com>
866 * gpgkeys_hkp.c, gpgkeys_ldap.c: #include <getopt.h> if it is
867 available. Also include extern references for optarg and optind
868 since there is no guarantee that any header file will include
869 them. Standards? We don't need no stinkin' standards.
871 * Makefile.am: Use @GETOPT@ to pull in libiberty on those
872 platforms that need it.
874 2003-04-08 David Shaw <dshaw@jabberwocky.com>
876 * gpgkeys_hkp.c (dehtmlize, parse_hkp_index): Fix memory
877 corruption bug on some platforms.
879 2003-03-11 David Shaw <dshaw@jabberwocky.com>
881 * gpgkeys_hkp.c (get_key): Properly handle CRLF line endings in
883 (main): Accept "try-dns-srv" option.
885 * Makefile.am: Use @CAPLIBS@ to link in -lcap if we are using
886 capabilities. Use @SRVLIBS@ to link in the resolver if we are
889 2003-02-11 David Shaw <dshaw@jabberwocky.com>
891 * Makefile.am: Use a local copy of libexecdir along with @PACKAGE@
892 so it can be easily overridden at make time.
894 2003-01-29 David Shaw <dshaw@jabberwocky.com>
896 * gpgkeys_mailto.in: Fix regexp to work properly if the "keyid" is
897 not a keyid, but rather a text string from the user ID.
899 2003-01-06 David Shaw <dshaw@jabberwocky.com>
901 * gpgkeys_hkp.c (get_key): Use options=mr when getting a key so
902 keyserver doesn't attach the HTML header which we will just have
905 2002-11-17 David Shaw <dshaw@jabberwocky.com>
907 * gpgkeys_ldap.c (main), gpgkeys_hkp.c (main): Use new keyserver
910 2002-11-14 David Shaw <dshaw@jabberwocky.com>
912 * gpgkeys_ldap.c (get_key): The deduping code requires
913 "pgpcertid", but that was not available when running without
914 verbose on. Noted by Stefan.
916 2002-11-10 David Shaw <dshaw@jabberwocky.com>
918 * gpgkeys_ldap.c (get_key): Fix typo in deduping code.
920 2002-11-05 David Shaw <dshaw@jabberwocky.com>
922 * gpgkeys_ldap.c (key_in_keylist, add_key_to_keylist,
923 free_keylist, get_key, search_key): The LDAP keyserver doesn't
924 remove duplicates, so remove them locally. Do not include the key
925 modification time in the search response.
927 2002-11-04 David Shaw <dshaw@jabberwocky.com>
929 * gpgkeys_hkp.c (send_key), gpgkeys_ldap.c (send_key): Properly
930 handle an input file that does not include any key data at all.
932 2002-10-24 David Shaw <dshaw@jabberwocky.com>
934 * gpgkeys_hkp.c (main), gpgkeys_ldap.c (main): Add -V flag to
935 output protocol and program version.
937 2002-10-21 David Shaw <dshaw@jabberwocky.com>
939 * Makefile.am: Anything linking with libutil.a needs INTLLIBS as
940 well on platforms where INTLLIBS is set.
942 2002-10-14 David Shaw <dshaw@jabberwocky.com>
944 * gpgkeys_hkp.c (write_quoted): Use %-encoding instead of
946 (parse_hkp_index): Use new keyserver key listing format, and add
947 support for disabled keys via include-disabled.
949 * gpgkeys_ldap.c (get_key): Don't print keysize unless it's >0.
950 (printquoted): Use %-encoding instead of \-encoding.
951 (search_key): Use new keyserver key listing format.
953 2002-10-08 David Shaw <dshaw@jabberwocky.com>
955 * gpgkeys_ldap.c (search_key, main): Make sure LDAP values are
956 freed in case of error.
958 * gpgkeys_ldap.c (fail_all): New function to unwind a keylist and
960 (main): Call fail_all from here, as needed. Also add a NO_MEMORY
961 error in an appropriate place and fix error return code.
962 (ldap_err_to_gpg_err): Add KEYSERVER_UNREACHABLE.
964 * gpgkeys_hkp.c (fail_all): New function to unwind a keylist and
966 (main): Call fail_all from here. Also add a NO_MEMORY error in an
968 (get_key): Use new UNREACHABLE error for network errors.
970 2002-09-26 Werner Koch <wk@gnupg.org>
972 * gpgkeys_ldap.c (send_key): Removed non-constant initializers.
974 2002-09-24 David Shaw <dshaw@jabberwocky.com>
976 * gpgkeys_ldap.c (ldap_err_to_gpg_err, ldap_to_gpg_err, send_key,
977 get_key, search_key, main): Some minor error reporting
978 enhancements for use with GPA (show reasons for KEY FAILED).
980 * gpgkeys_hkp.c (send_key, get_key, search_key, main): Some minor
981 error reporting enhancements for use with GPA (show reasons for
984 2002-09-20 Werner Koch <wk@gnupg.org>
986 * gpgkeys_hkp.c (handle_old_hkp_index): s/input/inp/ to avoid
989 2002-09-19 David Shaw <dshaw@jabberwocky.com>
991 * gpgkeys_hkp.c (get_key, handle_old_hkp_index, search_key):
992 Properly handle line truncation.
994 2002-09-16 David Shaw <dshaw@jabberwocky.com>
996 * gpgkeys_mailto.in: Add quasi-RFC-2368 mailto:email@addr?from=
997 syntax so people can set their own email address to respond to.
999 * gpgkeys_hkp.c (get_key): Properly respond with KEY FAILED (to
1000 gpg) and "key not found" (to user) on failure.
1002 2002-09-13 David Shaw <dshaw@jabberwocky.com>
1004 * gpgkeys_hkp.c: (search_key, handle_old_hkp_index): Try and
1005 request a machine-readable key index. If the server supports
1006 this, pass it through. If the server does not support it, parse
1009 2002-09-12 Stefan Bellon <sbellon@sbellon.de>
1011 * gpgkeys_hkp.c: Tidied up RISC OS initializations.
1013 2002-09-12 David Shaw <dshaw@jabberwocky.com>
1015 * gpgkeys_hkp.c (main): Remove warning - this is no longer
1018 2002-09-09 Werner Koch <wk@gnupg.org>
1020 * gpgkeys_hkp.c (send_key, get_key, search_key): Check return
1022 (dehtmlize): Use ascii_tolower to protect against weird locales.
1023 Cast the argument for isspace for the sake of broken HP/UXes.
1024 (search_key): Check return value of realloc.
1026 2002-09-09 David Shaw <dshaw@jabberwocky.com>
1028 * gpgkeys_ldap.c (get_key): Some compilers (RISC OS, HPUX c89)
1029 don't like using variables as array initializers.
1031 * gpgkeys_hkp.c (send_key): Use CRLF in headers.
1033 2002-08-28 David Shaw <dshaw@jabberwocky.com>
1035 * gpgkeys_hkp.c (parse_hkp_index): Use same types on all
1036 platforms. This was probably leftover from earlier code where the
1039 * gpgkeys_hkp.c: Overall cleanup from iobuf conversion. Be
1040 consistent in m_alloc and malloc usage. Remove include-disabled
1041 (meaningless on HKP). RISC OS tweak.
1043 2002-08-27 David Shaw <dshaw@jabberwocky.com>
1045 * gpgkeys_hkp.c, Makefile.am: Convert over to using iobufs.
1047 * gpgkeys_hkp.c (http_get, http_post): Use CRLF for line endings.
1049 * gpgkeys_hkp.c: Include util.h on RISC OS as per Stefan. Include
1050 a replacement for hstrerror() for those platforms (such as RISC
1051 OS) that don't have it.
1053 2002-08-26 David Shaw <dshaw@jabberwocky.com>
1055 * Makefile.am: May as well include gpgkeys_hkp.c in the
1056 distribution now. It works well enough without proxies, and isn't
1057 built by default. It would be good to get some test experience
1060 * gpgkeys_hkp.c (main): Don't warn about include-subkeys - it
1061 isn't unsupported, it's actually non-meaningful in the context of
1064 * gpgkeys_hkp.c (parse_hkp_index, dehtmlize): Move HTML
1065 functionality into new "dehtmlize" function. Remove HTML before
1066 trying to parse each line from the keyserver. If the keyserver
1067 provides key type information in the listing, use it. (Copy over
1070 2002-08-19 David Shaw <dshaw@jabberwocky.com>
1072 * gpgkeys_hkp.c (get_key, parse_hkp_index): Bring over latest code
1075 * gpgkeys_ldap.c (get_key): Fix cosmetic URL display problem
1076 (extra ":" at the end).
1078 2002-08-03 Stefan Bellon <sbellon@sbellon.de>
1080 * gpgkeys_ldap.c: Tidied up RISC OS initializations.
1082 2002-07-25 David Shaw <dshaw@jabberwocky.com>
1084 * gpgkeys_hkp.c: "Warning" -> "WARNING"
1086 2002-07-24 David Shaw <dshaw@jabberwocky.com>
1088 * Makefile.am: Install keyserver helpers in @GNUPG_LIBEXECDIR@
1090 2002-07-15 David Shaw <dshaw@jabberwocky.com>
1092 * gpgkeys_ldap.c (send_key, get_key, main): Consult the server
1093 version string to determine whether to use pgpKey or pgpKeyV2.
1095 2002-07-09 David Shaw <dshaw@jabberwocky.com>
1097 * gpgkeys_mailto.in: Use new OPAQUE tag for non net-path URIs.
1098 Fail more elegantly if there is no email address to send to. Show
1099 the GnuPG version in the message body.
1101 2002-07-04 David Shaw <dshaw@jabberwocky.com>
1103 * gpgkeys_ldap.c (get_key), gpgkeys_hkp.c (get_key): Display
1104 keyserver URI as a URI, but only if verbose.
1106 2002-07-01 David Shaw <dshaw@jabberwocky.com>
1108 * gpgkeys_hkp.c (parse_hkp_index): Error if the keyserver returns
1109 an unparseable HKP response.
1111 * gpgkeys_hkp.c (main): Warn on honor-http-proxy,
1112 broken-http-proxy, and include-subkeys (not supported yet).
1114 * gpgkeys_ldap.c (main), gpgkeys_hkp.c (http_connect, main): Fix
1115 some shadowing warnings.
1117 2002-06-11 David Shaw <dshaw@jabberwocky.com>
1119 * Makefile.am: Don't hard-code the LDAP libraries - get them from
1120 LDAPLIBS via configure. Also, gpgkeys_hkp is a program, not a
1123 2002-06-10 David Shaw <dshaw@jabberwocky.com>
1125 * gpgkeys_ldap.c (include_subkeys): Default "include-subkeys" to
1126 off, since GnuPG now defaults it to on.
1128 2002-06-06 David Shaw <dshaw@jabberwocky.com>
1130 * gpgkeys_hkp.c (parse_hkp_index): Type tweaks.
1132 * gpgkeys_hkp.c (main): Add experimental code warning.
1134 2002-06-05 David Shaw <dshaw@jabberwocky.com>
1136 * Makefile.am, gpgkeys_hkp.c (new): Experimental HKP keyserver
1139 2002-05-08 David Shaw <dshaw@jabberwocky.com>
1141 * gpgkeys_ldap.c: Include <lber.h> if we absolutely must. This
1142 helps when compiling against a very old OpenLDAP.
1144 2002-04-29 David Shaw <dshaw@jabberwocky.com>
1146 * gpgkeys_mailto.in: Properly handle key requests in full
1149 2002-03-29 David Shaw <dshaw@jabberwocky.com>
1151 * gpgkeys_ldap.c (printquoted): Quote backslashes within keyserver
1154 2002-02-25 David Shaw <dshaw@jabberwocky.com>
1156 * gpgkeys_ldap (get_key): LDAP keyservers do not support v3
1157 fingerprints, so error out if someone tries. Actually, they don't
1158 support any fingerprints, but at least we can calculate a keyid
1159 from a v4 fingerprint.
1161 2002-02-23 David Shaw <dshaw@jabberwocky.com>
1163 * gpgkeys_ldap: Clarify the notion of a partial failure. This is
1164 possible if more than one key is being handled in a batch, and one
1165 fails while the other succeeds. Note that a search that comes up
1166 with no results is not a failure - that is a valid response of "no
1169 * gpgkeys_ldap.c (get_key): Allow GnuPG to send us full v4
1170 fingerprints, long key ids, or short key ids while fetching.
1171 Since the LDAP server doesn't actually handle fingerprints, chop
1172 them down to long key ids for actual use.
1174 * gpgkeys_ldap.c (main, get_key): When searching for a keyid,
1175 search for subkeys as well as primary keys. This is mostly
1176 significant when automatically fetching the key based on the id in
1177 a header (i.e. "signature made by...."). "no-include-subkeys"
1180 2002-02-14 David Shaw <dshaw@jabberwocky.com>
1182 * gpgkeys_ldap.c: Fix compiler warning.
1184 * gpgkeys_ldap.c: Be much more robust with mangled input files.
1186 2001-12-28 David Shaw <dshaw@jabberwocky.com>
1188 * gpgkeys_mailto.in: Use the new OUTOFBAND indicator so gpg knows
1189 not to try and import anything. Also turn on perl -w for
1192 * gpgkeys_ldap.c (main): If we're using temp files (rather than
1193 stdin/stdout), make sure the file is closed when we're done.
1195 2001-12-20 David Shaw <dshaw@jabberwocky.com>
1197 * Properly free the LDAP response when we're done with it.
1199 * Now that we handle multiple keys, we must remove duplicates as
1200 the LDAP keyserver returns keys with multiple user IDs multiple
1203 * Properly handle multiple keys with the same key ID (it's really
1204 rare, so fetch "0xDEADBEEF" to test this).
1206 2001-12-17 David Shaw <dshaw@jabberwocky.com>
1208 * gpgkeys_ldap.c, gpgkeys_mailto.in: Fix GNU capitalization
1209 issues. Prefix log messages with "gpgkeys" to clarify which
1210 program is generating them.
1212 2001-12-14 David Shaw <dshaw@jabberwocky.com>
1214 * gpgkeys_ldap.c (search_key): Use unsigned int rather than uint
1217 2001-12-04 David Shaw <dshaw@jabberwocky.com>
1219 * Initial version of gpgkeys_ldap (LDAP keyserver helper) and
1220 gpgkeys_mailto (email keyserver helper)
1223 Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
1224 2007 Free Software Foundation, Inc.
1226 This file is free software; as a special exception the author gives
1227 unlimited permission to copy and/or distribute it, with or without
1228 modifications, as long as this notice is preserved.
1230 This file is distributed in the hope that it will be useful, but
1231 WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
1232 implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.