1 2006-07-12 David Shaw <dshaw@jabberwocky.com>
3 * gpgkeys_ldap.c (printquoted), curl-shim.c (curl_escape): Fix bad
4 encoding of characters > 127. Noted by Nalin Dahyabhai.
6 2006-04-26 David Shaw <dshaw@jabberwocky.com>
8 * gpgkeys_http.c, gpgkeys_oldhkp.c: Removed.
10 * Makefile.am: Don't build gpgkeys_http or gpgkeys_(old)hkp any
11 longer as this is done via curl or fake-curl.
13 * ksutil.h, ksutil.c, gpgkeys_hkp.c, gpgkeys_curl.c: Minor
14 #include tweaks as FAKE_CURL is no longer meaningful.
16 2006-04-10 David Shaw <dshaw@jabberwocky.com>
18 * gpgkeys_ldap.c (ldap_quote, get_name, search_key): LDAP-quote
19 directly into place rather than mallocing temporary buffers.
21 * gpgkeys_ldap.c (get_name): Build strings with strcat rather than
22 using sprintf which is harder to read and modify.
24 * ksutil.h, ksutil.c (classify_ks_search): Add
25 KS_SEARCH_KEYID_SHORT and KS_SEARCH_KEYID_LONG to search for a key
28 * gpgkeys_ldap.c (search_key): Use it here to flip from pgpUserID
29 searches to pgpKeyID or pgpCertID.
31 2006-03-27 David Shaw <dshaw@jabberwocky.com>
33 * gpgkeys_ldap.c: #define LDAP_DEPRECATED for newer OpenLDAPs so
34 they use the regular old API that is compatible with other LDAP
37 2006-03-03 David Shaw <dshaw@jabberwocky.com>
39 * gpgkeys_ldap.c (main): Fix build problem with non-OpenLDAP LDAP
40 libraries that have TLS.
42 2006-02-23 David Shaw <dshaw@jabberwocky.com>
44 * ksutil.c (init_ks_options): Default include-revoked and
45 include-subkeys to on, as gpg isn't doing this any longer.
47 2006-02-22 David Shaw <dshaw@jabberwocky.com>
49 * gpgkeys_hkp.c (get_name): A GETNAME query turns exact=on to cut
52 2006-02-21 David Shaw <dshaw@jabberwocky.com>
54 * gpgkeys_ldap.c (make_one_attr, build_attrs, send_key): Don't
55 allow duplicate attributes as OpenLDAP is now enforcing this.
57 * gpgkeys_ldap.c (main): Add binddn and bindpw so users can pass
58 credentials to a remote LDAP server.
60 * curl-shim.h, curl-shim.c (curl_easy_init, curl_easy_setopt,
61 curl_easy_perform): Mingw has 'stderr' as a macro?
63 * curl-shim.h, curl-shim.c (curl_easy_init, curl_easy_setopt,
64 curl_easy_perform): Add CURLOPT_VERBOSE and CURLOPT_STDERR for
67 2006-01-16 David Shaw <dshaw@jabberwocky.com>
69 * gpgkeys_hkp.c (send_key): Do not escape the '=' in the HTTP POST
72 2005-12-23 David Shaw <dshaw@jabberwocky.com>
74 * ksutil.h, ksutil.c (parse_ks_options): New keyserver command
77 * gpgkeys_hkp.c (main, get_name), gpgkeys_ldap.c (main, get_name):
78 Use it here to do direct name (rather than key ID) fetches.
80 2005-12-19 David Shaw <dshaw@jabberwocky.com>
82 * ksutil.h, ksutil.c (curl_armor_writer, curl_writer,
83 curl_writer_finalize): New functionality to handle binary format
84 keys by armoring them for input to GPG.
86 * gpgkeys_curl.c (get_key), gpgkeys_hkp.c (get_key): Call it here.
88 2005-12-07 David Shaw <dshaw@jabberwocky.com>
90 * gpgkeys_finger.c (get_key), gpgkeys_curl.c (get_key): Better
91 language for the key-not-found error.
93 * ksutil.c (curl_err_to_gpg_err): Add CURLE_OK and
94 CURLE_COULDNT_CONNECT.
96 * gpgkeys_curl.c (get_key): Give key-not-found error if no data is
97 found (or file itself is not found) during a fetch.
99 2005-12-06 David Shaw <dshaw@jabberwocky.com>
101 * curl-shim.c (curl_easy_perform): Fix build warning (code before
104 2005-11-02 David Shaw <dshaw@jabberwocky.com>
106 * gpgkeys_hkp.c (search_key): Fix warning with typecast (though
107 curl should really have defined that char * as const).
109 2005-08-25 David Shaw <dshaw@jabberwocky.com>
111 * ksutil.h, ksutil.c (parse_ks_options): Remove exact-name and
113 (classify_ks_search): Mimic the gpg search modes instead with *,
116 * gpgkeys_ldap.c (search_key), gpgkeys_hkp.c (search_key): Call
117 them here. Suggested by Jason Harris.
119 2005-08-18 David Shaw <dshaw@jabberwocky.com>
121 * ksutil.h, ksutil.c (parse_ks_options): New keyserver-option
122 exact-name. The last of exact-name and exact-email overrides the
125 * gpgkeys_ldap.c (search_key), gpgkeys_hkp.c (search_key): Use it
126 here to do a name-only search.
128 * gpgkeys_ldap.c (ldap_quote): \-quote a string for LDAP.
130 * gpgkeys_ldap.c (search_key): Use it here to escape reserved
131 characters in searches.
133 2005-08-17 David Shaw <dshaw@jabberwocky.com>
135 * ksutil.h, ksutil.c (parse_ks_options): New keyserver-option
138 * gpgkeys_ldap.c (search_key), gpgkeys_hkp.c (search_key): Use it
139 here to do an email-only search.
141 2005-08-08 David Shaw <dshaw@jabberwocky.com>
143 * Makefile.am: Include LDAP_CPPFLAGS when building LDAP.
145 2005-08-03 David Shaw <dshaw@jabberwocky.com>
147 * gpgkeys_hkp.c (main), gpgkeys_curl.c (main), curl-shim.h: Show
148 version of curl (or curl-shim) when debug is set.
150 2005-07-20 David Shaw <dshaw@jabberwocky.com>
152 * gpgkeys_curl.c (get_key, main): Don't try and be smart about
153 what protocols we handle. Directly pass them to curl or fake-curl
154 and see if an error comes back.
156 * curl-shim.h, curl-shim.c (handle_error), ksutil.c
157 (curl_err_to_gpg_err): Add support for CURLE_UNSUPPORTED_PROTOCOL
160 * Makefile.am: Don't need -DFAKE_CURL any longer since it's in
163 2005-06-23 David Shaw <dshaw@jabberwocky.com>
165 * gpgkeys_mailto.in, gpgkeys_test.in: Use @VERSION@ so version
166 string stays up to date.
168 * gpgkeys_http.c: Don't need to define HTTP_PROXY_ENV here since
171 * gpgkeys_curl.c (get_key, main), gpgkeys_hkp.c (main): Pass AUTH
172 values to curl or curl-shim.
174 * curl-shim.c (curl_easy_perform), gpgkeys_curl.c (main),
175 gpgkeys_hkp.c (main): Use curl-style proxy semantics.
177 * curl-shim.h, curl-shim.c (curl_easy_setopt, curl_easy_perform):
178 Add CURLOPT_USERPWD option for HTTP auth.
180 * gpgkeys_http.c (get_key), gpgkeys_oldhkp (send_key, get_key,
181 search_key): No longer need to pass a proxyauth.
183 * gpgkeys_http.c (get_key): Pass auth outside of the URL.
185 2005-06-21 David Shaw <dshaw@jabberwocky.com>
187 * gpgkeys_http.c (get_key), gpgkeys_oldhkp.c (send_key, get_key,
188 search_key): Fix http_open/http_open_document calls to pass NULL
189 for auth and proxyauth since these programs pass them in the URL.
191 2005-06-20 David Shaw <dshaw@jabberwocky.com>
193 * gpgkeys_hkp.c (append_path, send_key, get_key, search_key,
194 main), gpgkeys_oldhkp.c (main): Properly handle double slashes in
197 2005-06-05 David Shaw <dshaw@jabberwocky.com>
199 * ksutil.c (init_ks_options, parse_ks_options): Provide a default
200 "/" path unless overridden by the config. Allow config to specify
201 items multiple times and take the last specified item.
203 2005-06-04 David Shaw <dshaw@jabberwocky.com>
205 * gpgkeys_hkp.c, gpgkeys_oldhkp.c: Add support for HKP servers
206 that aren't at the root path. Suggested by Jack Bates.
208 2005-06-01 David Shaw <dshaw@jabberwocky.com>
210 * ksutil.c [HAVE_DOSISH_SYSTEM]: Fix warnings on mingw32. Noted
213 2005-05-04 David Shaw <dshaw@jabberwocky.com>
215 * ksutil.h, ksutil.c: #ifdef so we can build without libcurl or
218 2005-05-03 David Shaw <dshaw@jabberwocky.com>
220 * gpgkeys_http.c: Need GET defined.
222 2005-05-01 David Shaw <dshaw@jabberwocky.com>
224 * gpgkeys_hkp.c, gpgkeys_oldhkp.c, ksutil.h: Some minor cleanup
225 and comments as to the size of MAX_LINE and MAX_URL.
227 2005-04-16 David Shaw <dshaw@jabberwocky.com>
229 * gpgkeys_hkp.c: New hkp handler that uses curl or curl-shim.
231 * Makefile.am: Build new gpgkeys_hkp.
233 * curl-shim.c (curl_easy_perform): Cleanup.
235 * ksutil.h, ksutil.c (curl_writer), gpgkeys_curl.c (get_key): Pass
236 a context to curl_writer so we can support multiple fetches in a
239 * curl-shim.h, curl-shim.c (handle_error, curl_easy_setopt,
240 curl_easy_perform): Add POST functionality to the curl shim.
242 * curl-shim.h, curl-shim.c (curl_escape, curl_free): Emulate
243 curl_escape and curl_free.
245 * gpgkeys_curl.c (main): If the http-proxy option is given without
246 any arguments, try to get the proxy from the environment.
248 * ksutil.h, ksutil.c (curl_err_to_gpg_err, curl_writer): Copy from
251 * gpgkeys_oldhkp.c: Copy from gpgkeys_hkp.c.
253 2005-03-22 David Shaw <dshaw@jabberwocky.com>
255 * gpgkeys_ldap.c, ksutil.h, ksutil.c (print_nocr): Moved from
256 gpgkeys_ldap.c. Print a string, but strip out any CRs.
258 * gpgkeys_finger.c (get_key), gpgkeys_hkp.c (get_key),
259 gpgkeys_http.c (get_key): Use it here when outputting key material
260 to canonicalize line endings.
262 2005-03-19 David Shaw <dshaw@jabberwocky.com>
264 * gpgkeys_ldap.c (main): Fix three wrong calls to fail_all().
265 Noted by Stefan Bellon.
267 2005-03-17 David Shaw <dshaw@jabberwocky.com>
269 * ksutil.c (parse_ks_options): Handle verbose=nnn.
271 * Makefile.am: Calculate GNUPG_LIBEXECDIR directly. Do not
272 redefine $libexecdir.
274 * gpgkeys_curl.c, gpgkeys_finger.c, gpgkeys_ldap.c: Start using
275 parse_ks_options and remove a lot of common code.
277 * ksutil.h, ksutil.c (parse_ks_options): Parse OPAQUE, and default
278 debug with no arguments to 1.
280 2005-03-16 David Shaw <dshaw@jabberwocky.com>
282 * gpgkeys_ldap.c: Include lber.h if configure determines we need
285 * ksutil.h, ksutil.c (ks_action_to_string): New.
286 (free_ks_options): Only free if options exist.
288 * ksutil.h, ksutil.c (init_ks_options, free_ks_options,
289 parse_ks_options): Pull a lot of duplicated code into a single
290 options parser for all keyserver helpers.
292 2005-02-11 David Shaw <dshaw@jabberwocky.com>
294 * curl-shim.c (curl_easy_perform): Fix compile warning.
296 * curl-shim.h, gpgkeys_curl.c (main), gpgkeys_ldap.c (main): Add
297 ca-cert-file option, to pass in the SSL cert.
299 * curl-shim.h, curl-shim.c: New. This is code to fake the curl
300 API in terms of the current HTTP iobuf API.
302 * gpgkeys_curl.c [FAKE_CURL], Makefile.am: If FAKE_CURL is set,
303 link with the iobuf code rather than libcurl.
305 2005-02-05 David Shaw <dshaw@jabberwocky.com>
307 * gpgkeys_finger.c (main), gpgkeys_hkp.c (main): Fix --version
310 * gpgkeys_curl.c (main): Make sure the curl handle is cleaned up
313 2005-02-01 David Shaw <dshaw@jabberwocky.com>
315 * gpgkeys_hkp.c (get_key), gpgkeys_http.c (get_key): Fix missing
316 http_close() calls. Noted by Phil Pennock.
318 * ksutil.h: Up the default timeout to two minutes.
320 2005-01-24 David Shaw <dshaw@jabberwocky.com>
322 * gpgkeys_ldap.c (print_nocr): New.
323 (get_key): Call it here to canonicalize line endings.
325 * gpgkeys_curl.c (writer): Discard everything outside the BEGIN
326 and END lines when retrieving keys. Canonicalize line endings.
329 2005-01-21 David Shaw <dshaw@jabberwocky.com>
331 * gpgkeys_ldap.c (main): Add "check-cert" option to disable SSL
332 certificate checking (which is on by default).
334 * gpgkeys_curl.c (main): Add "debug" option to match the LDAP
335 helper. Add "check-cert" option to disable SSL certificate
336 checking (which is on by default).
338 2005-01-18 David Shaw <dshaw@jabberwocky.com>
340 * gpgkeys_curl.c: Fix typo.
342 2005-01-18 Werner Koch <wk@g10code.com>
344 * gpgkeys_curl.c: s/MAX_PATH/URLMAX_PATH/g to avoid a clash with
345 the W32 defined macro. Removed unneeded initialization of static
347 * gpgkeys_http.c: Ditto.
348 * ksutil.h: s/MAX_PATH/URLMAX_PATH/.
350 2005-01-17 David Shaw <dshaw@jabberwocky.com>
352 * gpgkeys_curl.c (main): Only allow specified protocols to use the
355 * Makefile.am: Use LIBCURL_CPPFLAGS instead of LIBCURL_INCLUDES.
357 2005-01-13 David Shaw <dshaw@jabberwocky.com>
359 * ksutil.h, gpgkeys_curl.c, gpgkeys_hkp.c, gpgkeys_ldap.c,
360 gpgkeys_finger.c, gpgkeys_http.c: Part 2 of the cleanup. Move all
361 the various defines to ksutil.h.
363 * gpgkeys_finger.c, gpgkeys_hkp.c, gpgkeys_http.c, gpgkeys_ldap.c:
364 Part 1 of a minor cleanup to use #defines instead of hard-coded
367 * gpgkeys_finger.c (connect_server): Use INADDR_NONE instead of
368 SOCKET_ERROR. Noted by Timo.
370 2005-01-09 David Shaw <dshaw@jabberwocky.com>
372 * gpgkeys_curl.c (get_key): Newer versions of libcurl don't define
375 2004-12-24 David Shaw <dshaw@jabberwocky.com>
377 * gpgkeys_curl.c (main): Use new defines for opting out of certain
378 transfer protocols. Allow setting HTTP proxy via "http-proxy=foo"
379 option (there is natural support in libcurl for the http_proxy
380 environment variable).
382 * Makefile.am: Remove the conditional since this is all handled in
385 2004-12-22 David Shaw <dshaw@jabberwocky.com>
387 * gpgkeys_curl.c (main): New "follow-redirects" option. Takes an
388 optional numeric value for the maximum number of redirects to
389 allow. Defaults to 5.
391 * gpgkeys_curl.c (main), gpgkeys_finger.c (main), gpgkeys_hkp.c
392 (main), gpgkeys_http.c (main), gpgkeys_ldap.c (main): Make sure
393 that a "timeout" option passed with no arguments is properly
396 * gpgkeys_curl.c (get_key, writer): New function to wrap around
397 fwrite to avoid DLL access problem on win32.
399 * gpgkeys_http.c (main, get_key): Properly pass authentication
400 info through to the http library.
402 * Makefile.am: Build gpgkeys_http or gpgkeys_curl as needed.
404 * gpgkeys_curl.c (main, get_key): Minor tweaks to work with either
407 * gpgkeys_ftp.c: renamed to gpgkeys_curl.c.
409 * gpgkeys_ftp.c (main, get_key): Use auth data as passed by gpg.
410 Use CURLOPT_FILE instead of CURLOPT_WRITEDATA (same option, but
411 backwards compatible).
413 2004-12-21 David Shaw <dshaw@jabberwocky.com>
415 * gpgkeys_ftp.c: New.
417 * Makefile.am: Build it if requested.
419 2004-12-14 Werner Koch <wk@g10code.com>
421 * Makefile.am (install-exec-hook, uninstall-hook): Removed. For
422 Windows reasons we can't use the symlink trick.
424 2004-12-03 David Shaw <dshaw@jabberwocky.com>
426 * Makefile.am: The harmless "ignored error" on gpgkeys_ldap
427 install on top of an existing install is bound to confuse people.
428 Use ln -s -f to force the overwrite.
430 2004-10-28 David Shaw <dshaw@jabberwocky.com>
432 * gpgkeys_finger.c [_WIN32] (connect_server): Fix typo.
434 2004-10-28 Werner Koch <wk@g10code.com>
436 * Makefile.am (other_libs): New. Also include LIBICONV. Noted by
439 2004-10-28 Werner Koch <wk@g10code.com>
441 * Makefile.am (other_libs):
443 2004-10-18 David Shaw <dshaw@jabberwocky.com>
445 * gpgkeys_hkp.c (send_key, get_key, search_key): Use "hkp" instead
446 of "x-hkp" so it can be used as a SRV tag.
448 2004-10-16 David Shaw <dshaw@jabberwocky.com>
450 * gpgkeys_finger.c [_WIN32] (connect_server): Fix typo.
452 2004-10-15 Werner Koch <wk@g10code.com>
454 * gpgkeys_ldap.c (main, show_help): Kludge to implement standard
455 GNU options. Factored help printing out.
456 * gpgkeys_finger.c (main, show_help): Ditto.
457 * gpgkeys_hkp.c (main, show_help): Ditto.
458 * gpgkeys_http.c (main, show_help): Ditto.
459 * gpgkeys_test.in, gpgkeys_mailto.in: Implement --version and --help.
461 * Makefile.am: Add ksutil.h.
463 2004-10-14 David Shaw <dshaw@jabberwocky.com>
465 * gpgkeys_finger.c (main): We do not support relay fingering
466 (i.e. "finger://relayhost/user@example.com"), but finger URLs are
467 occasionally miswritten that way. Give an error in this case.
469 2004-10-14 Werner Koch <wk@g10code.com>
471 * gpgkeys_finger.c (get_key): s/unsigned char/byte/ due
472 to a strange typedef for RISC OS. Noted by Stefan.
474 2004-10-13 David Shaw <dshaw@jabberwocky.com>
476 * gpgkeys_ldap.c (main), gpgkeys_hkp.c (main), gpgkeys_http.c
477 (main), gpgkeys_finger.c (main): Call timeout functions before
478 performing an action that could block for a long time.
480 * ksutil.h, ksutil.c: New. Right now just contains timeout
483 2004-10-11 David Shaw <dshaw@jabberwocky.com>
485 * gpgkeys_finger.c, gpgkeys_hkp.c, gpgkeys_http.c, gpgkeys_ldap.c:
486 Fix a few occurances of "filename" to `filename'.
488 2004-10-11 Werner Koch <wk@g10code.com>
490 * gpgkeys_finger.c: New.
492 2004-08-27 Stefan Bellon <sbellon@sbellon.de>
494 * gpgkeys_hkp.c (search_key): Fix the prior faulty fix by
495 introducing a cast but leaving skey unsigned.
497 * gpgkeys_hkp.c (search_key): Change type of variable skey from
498 unsigned char* to char* to fix type incompatibility.
500 2004-08-23 David Shaw <dshaw@jabberwocky.com>
502 * gpgkeys_ldap.c (get_key, search_key), gpgkeys_hkp.c (get_key,
503 search_key), gpgkeys_http.c (get_key): Do not give informational
504 logs since this is now done inside gpg.
506 * gpgkeys_hkp.c (dehtmlize): Understand the quote character
507 (i.e. """) in HTML responses.
508 (search_key): Search key must be unsigned for url encoder to work
509 properly for 8-bit values.
511 * gpgkeys_ldap.c (get_key): Factor out informational display into
512 new function build_info().
514 * gpgkeys_ldap.c (build_attrs): Properly terminate user ID strings
515 that got shrunk due to encoding.
517 2004-08-22 David Shaw <dshaw@jabberwocky.com>
519 * gpgkeys_ldap.c (find_basekeyspacedn): Use LDAP_SCOPE_BASE along
520 with a full DN rather than LDAP_SCOPE_ONELEVEL plus a filter to
521 find the pgpServerInfo object. Some LDAP setups don't like the
523 (main): Stop binding to the server since it seems no server really
524 requires it, and some require it not be there.
526 2004-07-29 David Shaw <dshaw@jabberwocky.com>
528 * gpgkeys_ldap.c (main): Add "debug" option. This is only really
529 useful with OpenLDAP, but it's practically vital to debug SSL and
530 TLS setups. Add "basedn" option. This allows users to override
531 the autodetection for base DN. SSL overrides TLS, so TLS will not
532 be started on SSL connections (starting an already started car).
534 2004-07-28 David Shaw <dshaw@jabberwocky.com>
536 * gpgkeys_ldap.c (build_attrs): Add "pgpKeySize" and "pgpSubKeyID"
537 attributes so we can do subkey searches.
539 * gpgkeys_ldap.c (main): Under certain error conditions, we might
540 try and unbind twice. Don't.
542 * gpgkeys_ldap.c (join_two_modlists): New.
543 (send_key): Use new function so we can try a modify operation
544 first, and fail over to an add if that fails. Add cannot cope
545 with the NULLs at the head of the modify request, so we jump into
546 the list in the middle.
548 2004-07-27 David Shaw <dshaw@jabberwocky.com>
550 * gpgkeys_ldap.c (main): Don't try and error out before making a
551 ldaps connection to the NAI keyserver since we cannot tell if it
552 is a NAI keyserver until we connect. Fail if we cannot find a
553 base keyspace DN. Fix a false success message for TLS being
556 2004-07-20 Werner Koch <wk@gnupg.org>
558 * gpgkeys_ldap.c [_WIN32]: Include Windows specific header files.
559 Suggested by Brian Gladman.
561 2004-05-26 David Shaw <dshaw@jabberwocky.com>
563 * gpgkeys_http.c: General polish and removal of leftover stuff
566 2004-05-21 David Shaw <dshaw@jabberwocky.com>
568 * gpgkeys_http.c (get_key): Cosmetic fix - make sure that URLs
569 with no path use a path of "/".
571 * gpgkeys_ldap.c (ldap2epochtime): We can always rely on timegm()
572 being available now, since it's a replacement function.
574 2004-05-20 David Shaw <dshaw@jabberwocky.com>
576 * gpgkeys_http.c: New program to do a simple HTTP file fetch using
577 the keyserver interface.
579 * Makefile.am: Build it.
581 2004-02-28 David Shaw <dshaw@jabberwocky.com>
583 * Makefile.am: Don't split LDADD across two lines since some make
584 programs can't handle blank lines after a \ continuation. Noted
585 by Christoph Moench-Tegeder.
587 2004-02-25 David Shaw <dshaw@jabberwocky.com>
589 * gpgkeys_ldap.c (send_key): List pgpCertID as one of the deleted
590 attributes. This guarantees that if something goes wrong, we
591 won't be able to complete the transaction, thus leaving any key
592 already existing on the server intact.
594 2004-02-23 David Shaw <dshaw@jabberwocky.com>
596 * gpgkeys_ldap.c (delete_one_attr): Removed.
597 (make_one_attr): Delete functionality added. Optional deduping
598 functionality added (currently only used for pgpSignerID).
599 (build_attrs): Translate sig entries into pgpSignerID. Properly
600 build the timestamp for pgpKeyCreateTime and pgpKeyExpireTime.
602 2004-02-22 David Shaw <dshaw@jabberwocky.com>
604 * gpgkeys_ldap.c (delete_one_attr): New function to replace
605 attributes with NULL (a "delete" that works even for nonexistant
607 (send_key): Use it here to remove attributes so a modify operation
608 starts with a clean playing field. Bias sends to modify before
609 add, since (I suspect) people update their existing keys more
610 often than they make and send new keys to the server.
612 2004-02-21 David Shaw <dshaw@jabberwocky.com>
614 * gpgkeys_ldap.c (epoch2ldaptime): New. Converse of
616 (make_one_attr): New. Build a modification list in memory to send
618 (build_attrs): New. Parse INFO lines sent over by gpg.
619 (free_mod_values): New. Unwinds a modification list.
620 (send_key_keyserver): Renamed from old send_key().
621 (send_key): New function to send a key to a LDAP server.
622 (main): Use send_key() for real LDAP servers, send_key_keyserver()
625 2004-02-20 David Shaw <dshaw@jabberwocky.com>
627 * gpgkeys_ldap.c: Replacement prototypes for setenv and unsetenv.
628 (search_key): Catch a SIZELIMIT_EXCEEDED error and show the user
629 whatever the server did give us.
630 (find_basekeyspacedn): There is no guarantee that namingContexts
633 * Makefile.am: Link gpgkeys_ldap with libutil.a to get the
634 replacement functions (and eventually translations, etc).
636 2004-02-19 David Shaw <dshaw@jabberwocky.com>
638 * gpgkeys_ldap.c (ldap2epochtime): LDAP timestamps are UTC, so do
639 not correct for timezones.
640 (main): Find the basekeyspacedn before we try to start TLS, so we
641 can give a better error message when a user tries to use TLS with
644 * Makefile.am: Add automake conditionals to symlink gpgkeys_ldaps
645 to gpgkeys_ldap when needed.
647 * gpgkeys_ldap.c (main): Add support for LDAPS and TLS
648 connections. These are only useful and usable when talking to
649 real LDAP keyservers. Add new "tls" option to tune TLS use from
650 off, to try quietly, to try loudly, or to require TLS.
652 * gpgkeys_ldap.c (find_basekeyspacedn): New function to figure out
653 what kind of LDAP server we're talking to (either real LDAP or the
654 LDAP keyserver), and return the baseKeySpaceDN to find keys under.
655 (main): Call it from here, and remove the old code that only
656 handled the LDAP keyserver.
658 2004-02-18 David Shaw <dshaw@jabberwocky.com>
660 * gpgkeys_ldap.c (ldap_to_gpg_err): Make sure that
661 LDAP_OPT_ERROR_NUMBER is defined before we use it.
663 * gpgkeys_mailto.in: Fix VERSION number.
665 2004-01-13 Werner Koch <wk@gnupg.org>
667 * gpgkeys_hkp.c (send_key): Add a content type.
669 2004-01-11 David Shaw <dshaw@jabberwocky.com>
671 * gpgkeys_hkp.c (search_key): Catch a mangled input file (useful
672 if something other than GnuPG is calling the program).
673 (main): Avoid possible pre-string write. Noted by Christian
676 * gpgkeys_ldap.c (main): Avoid possible pre-string write.
678 2003-12-28 David Shaw <dshaw@jabberwocky.com>
680 * gpgkeys_hkp.c (send_key, get_key, main): Work with new HTTP code
681 that passes the proxy in from the outside. If the command file
682 sends a proxy, use it. If it sends "http-proxy" with no
683 arguments, use $http_proxy from the environment. Suggested by
686 2003-12-28 Stefan Bellon <sbellon@sbellon.de>
688 * gpgkeys_hkp.c, gpgkeys_ldap.c [__riscos__]: Removal of
689 unnecessary #ifdef __riscos__ sections.
691 2003-11-27 Werner Koch <wk@gnupg.org>
693 * gpgkeys_hkp.c (get_key): Fixed invalid use of fprintf without
696 2003-10-25 Werner Koch <wk@gnupg.org>
698 * Makefile.am (gpgkeys_hkp_LDADD): Replaced INTLLIBS by LIBINTL.
700 2003-07-10 David Shaw <dshaw@jabberwocky.com>
702 * Makefile.am: Use W32LIBS where appropriate.
704 2003-05-30 David Shaw <dshaw@jabberwocky.com>
706 * gpgkeys_hkp.c, gpgkeys_ldap.c: #include <getopt.h> if it is
707 available. Also include extern references for optarg and optind
708 since there is no guarantee that any header file will include
709 them. Standards? We don't need no stinkin' standards.
711 * Makefile.am: Use @GETOPT@ to pull in libiberty on those
712 platforms that need it.
714 2003-04-08 David Shaw <dshaw@jabberwocky.com>
716 * gpgkeys_hkp.c (dehtmlize, parse_hkp_index): Fix memory
717 corruption bug on some platforms.
719 2003-03-11 David Shaw <dshaw@jabberwocky.com>
721 * gpgkeys_hkp.c (get_key): Properly handle CRLF line endings in
723 (main): Accept "try-dns-srv" option.
725 * Makefile.am: Use @CAPLIBS@ to link in -lcap if we are using
726 capabilities. Use @SRVLIBS@ to link in the resolver if we are
729 2003-02-11 David Shaw <dshaw@jabberwocky.com>
731 * Makefile.am: Use a local copy of libexecdir along with @PACKAGE@
732 so it can be easily overridden at make time.
734 2003-01-29 David Shaw <dshaw@jabberwocky.com>
736 * gpgkeys_mailto.in: Fix regexp to work properly if the "keyid" is
737 not a keyid, but rather a text string from the user ID.
739 2003-01-06 David Shaw <dshaw@jabberwocky.com>
741 * gpgkeys_hkp.c (get_key): Use options=mr when getting a key so
742 keyserver doesn't attach the HTML header which we will just have
745 2002-11-17 David Shaw <dshaw@jabberwocky.com>
747 * gpgkeys_ldap.c (main), gpgkeys_hkp.c (main): Use new keyserver
750 2002-11-14 David Shaw <dshaw@jabberwocky.com>
752 * gpgkeys_ldap.c (get_key): The deduping code requires
753 "pgpcertid", but that was not available when running without
754 verbose on. Noted by Stefan.
756 2002-11-10 David Shaw <dshaw@jabberwocky.com>
758 * gpgkeys_ldap.c (get_key): Fix typo in deduping code.
760 2002-11-05 David Shaw <dshaw@jabberwocky.com>
762 * gpgkeys_ldap.c (key_in_keylist, add_key_to_keylist,
763 free_keylist, get_key, search_key): The LDAP keyserver doesn't
764 remove duplicates, so remove them locally. Do not include the key
765 modification time in the search response.
767 2002-11-04 David Shaw <dshaw@jabberwocky.com>
769 * gpgkeys_hkp.c (send_key), gpgkeys_ldap.c (send_key): Properly
770 handle an input file that does not include any key data at all.
772 2002-10-24 David Shaw <dshaw@jabberwocky.com>
774 * gpgkeys_hkp.c (main), gpgkeys_ldap.c (main): Add -V flag to
775 output protocol and program version.
777 2002-10-21 David Shaw <dshaw@jabberwocky.com>
779 * Makefile.am: Anything linking with libutil.a needs INTLLIBS as
780 well on platforms where INTLLIBS is set.
782 2002-10-14 David Shaw <dshaw@jabberwocky.com>
784 * gpgkeys_hkp.c (write_quoted): Use %-encoding instead of
786 (parse_hkp_index): Use new keyserver key listing format, and add
787 support for disabled keys via include-disabled.
789 * gpgkeys_ldap.c (get_key): Don't print keysize unless it's >0.
790 (printquoted): Use %-encoding instead of \-encoding.
791 (search_key): Use new keyserver key listing format.
793 2002-10-08 David Shaw <dshaw@jabberwocky.com>
795 * gpgkeys_ldap.c (search_key, main): Make sure LDAP values are
796 freed in case of error.
798 * gpgkeys_ldap.c (fail_all): New function to unwind a keylist and
800 (main): Call fail_all from here, as needed. Also add a NO_MEMORY
801 error in an appropriate place and fix error return code.
802 (ldap_err_to_gpg_err): Add KEYSERVER_UNREACHABLE.
804 * gpgkeys_hkp.c (fail_all): New function to unwind a keylist and
806 (main): Call fail_all from here. Also add a NO_MEMORY error in an
808 (get_key): Use new UNREACHABLE error for network errors.
810 2002-09-26 Werner Koch <wk@gnupg.org>
812 * gpgkeys_ldap.c (send_key): Removed non-constant initializers.
814 2002-09-24 David Shaw <dshaw@jabberwocky.com>
816 * gpgkeys_ldap.c (ldap_err_to_gpg_err, ldap_to_gpg_err, send_key,
817 get_key, search_key, main): Some minor error reporting
818 enhancements for use with GPA (show reasons for KEY FAILED).
820 * gpgkeys_hkp.c (send_key, get_key, search_key, main): Some minor
821 error reporting enhancements for use with GPA (show reasons for
824 2002-09-20 Werner Koch <wk@gnupg.org>
826 * gpgkeys_hkp.c (handle_old_hkp_index): s/input/inp/ to avoid
829 2002-09-19 David Shaw <dshaw@jabberwocky.com>
831 * gpgkeys_hkp.c (get_key, handle_old_hkp_index, search_key):
832 Properly handle line truncation.
834 2002-09-16 David Shaw <dshaw@jabberwocky.com>
836 * gpgkeys_mailto.in: Add quasi-RFC-2368 mailto:email@addr?from=
837 syntax so people can set their own email address to respond to.
839 * gpgkeys_hkp.c (get_key): Properly respond with KEY FAILED (to
840 gpg) and "key not found" (to user) on failure.
842 2002-09-13 David Shaw <dshaw@jabberwocky.com>
844 * gpgkeys_hkp.c: (search_key, handle_old_hkp_index): Try and
845 request a machine-readable key index. If the server supports
846 this, pass it through. If the server does not support it, parse
849 2002-09-12 Stefan Bellon <sbellon@sbellon.de>
851 * gpgkeys_hkp.c: Tidied up RISC OS initializations.
853 2002-09-12 David Shaw <dshaw@jabberwocky.com>
855 * gpgkeys_hkp.c (main): Remove warning - this is no longer
858 2002-09-09 Werner Koch <wk@gnupg.org>
860 * gpgkeys_hkp.c (send_key, get_key, search_key): Check return
862 (dehtmlize): Use ascii_tolower to protect against weird locales.
863 Cast the argument for isspace for the sake of broken HP/UXes.
864 (search_key): Check return value of realloc.
866 2002-09-09 David Shaw <dshaw@jabberwocky.com>
868 * gpgkeys_ldap.c (get_key): Some compilers (RISC OS, HPUX c89)
869 don't like using variables as array initializers.
871 * gpgkeys_hkp.c (send_key): Use CRLF in headers.
873 2002-08-28 David Shaw <dshaw@jabberwocky.com>
875 * gpgkeys_hkp.c (parse_hkp_index): Use same types on all
876 platforms. This was probably leftover from earlier code where the
879 * gpgkeys_hkp.c: Overall cleanup from iobuf conversion. Be
880 consistent in m_alloc and malloc usage. Remove include-disabled
881 (meaningless on HKP). RISC OS tweak.
883 2002-08-27 David Shaw <dshaw@jabberwocky.com>
885 * gpgkeys_hkp.c, Makefile.am: Convert over to using iobufs.
887 * gpgkeys_hkp.c (http_get, http_post): Use CRLF for line endings.
889 * gpgkeys_hkp.c: Include util.h on RISC OS as per Stefan. Include
890 a replacement for hstrerror() for those platforms (such as RISC
891 OS) that don't have it.
893 2002-08-26 David Shaw <dshaw@jabberwocky.com>
895 * Makefile.am: May as well include gpgkeys_hkp.c in the
896 distribution now. It works well enough without proxies, and isn't
897 built by default. It would be good to get some test experience
900 * gpgkeys_hkp.c (main): Don't warn about include-subkeys - it
901 isn't unsupported, it's actually non-meaningful in the context of
904 * gpgkeys_hkp.c (parse_hkp_index, dehtmlize): Move HTML
905 functionality into new "dehtmlize" function. Remove HTML before
906 trying to parse each line from the keyserver. If the keyserver
907 provides key type information in the listing, use it. (Copy over
910 2002-08-19 David Shaw <dshaw@jabberwocky.com>
912 * gpgkeys_hkp.c (get_key, parse_hkp_index): Bring over latest code
915 * gpgkeys_ldap.c (get_key): Fix cosmetic URL display problem
916 (extra ":" at the end).
918 2002-08-03 Stefan Bellon <sbellon@sbellon.de>
920 * gpgkeys_ldap.c: Tidied up RISC OS initializations.
922 2002-07-25 David Shaw <dshaw@jabberwocky.com>
924 * gpgkeys_hkp.c: "Warning" -> "WARNING"
926 2002-07-24 David Shaw <dshaw@jabberwocky.com>
928 * Makefile.am: Install keyserver helpers in @GNUPG_LIBEXECDIR@
930 2002-07-15 David Shaw <dshaw@jabberwocky.com>
932 * gpgkeys_ldap.c (send_key, get_key, main): Consult the server
933 version string to determine whether to use pgpKey or pgpKeyV2.
935 2002-07-09 David Shaw <dshaw@jabberwocky.com>
937 * gpgkeys_mailto.in: Use new OPAQUE tag for non net-path URIs.
938 Fail more elegantly if there is no email address to send to. Show
939 the GnuPG version in the message body.
941 2002-07-04 David Shaw <dshaw@jabberwocky.com>
943 * gpgkeys_ldap.c (get_key), gpgkeys_hkp.c (get_key): Display
944 keyserver URI as a URI, but only if verbose.
946 2002-07-01 David Shaw <dshaw@jabberwocky.com>
948 * gpgkeys_hkp.c (parse_hkp_index): Error if the keyserver returns
949 an unparseable HKP response.
951 * gpgkeys_hkp.c (main): Warn on honor-http-proxy,
952 broken-http-proxy, and include-subkeys (not supported yet).
954 * gpgkeys_ldap.c (main), gpgkeys_hkp.c (http_connect, main): Fix
955 some shadowing warnings.
957 2002-06-11 David Shaw <dshaw@jabberwocky.com>
959 * Makefile.am: Don't hard-code the LDAP libraries - get them from
960 LDAPLIBS via configure. Also, gpgkeys_hkp is a program, not a
963 2002-06-10 David Shaw <dshaw@jabberwocky.com>
965 * gpgkeys_ldap.c (include_subkeys): Default "include-subkeys" to
966 off, since GnuPG now defaults it to on.
968 2002-06-06 David Shaw <dshaw@jabberwocky.com>
970 * gpgkeys_hkp.c (parse_hkp_index): Type tweaks.
972 * gpgkeys_hkp.c (main): Add experimental code warning.
974 2002-06-05 David Shaw <dshaw@jabberwocky.com>
976 * Makefile.am, gpgkeys_hkp.c (new): Experimental HKP keyserver
979 2002-05-08 David Shaw <dshaw@jabberwocky.com>
981 * gpgkeys_ldap.c: Include <lber.h> if we absolutely must. This
982 helps when compiling against a very old OpenLDAP.
984 2002-04-29 David Shaw <dshaw@jabberwocky.com>
986 * gpgkeys_mailto.in: Properly handle key requests in full
989 2002-03-29 David Shaw <dshaw@jabberwocky.com>
991 * gpgkeys_ldap.c (printquoted): Quote backslashes within keyserver
994 2002-02-25 David Shaw <dshaw@jabberwocky.com>
996 * gpgkeys_ldap (get_key): LDAP keyservers do not support v3
997 fingerprints, so error out if someone tries. Actually, they don't
998 support any fingerprints, but at least we can calculate a keyid
999 from a v4 fingerprint.
1001 2002-02-23 David Shaw <dshaw@jabberwocky.com>
1003 * gpgkeys_ldap: Clarify the notion of a partial failure. This is
1004 possible if more than one key is being handled in a batch, and one
1005 fails while the other succeeds. Note that a search that comes up
1006 with no results is not a failure - that is a valid response of "no
1009 * gpgkeys_ldap.c (get_key): Allow GnuPG to send us full v4
1010 fingerprints, long key ids, or short key ids while fetching.
1011 Since the LDAP server doesn't actually handle fingerprints, chop
1012 them down to long key ids for actual use.
1014 * gpgkeys_ldap.c (main, get_key): When searching for a keyid,
1015 search for subkeys as well as primary keys. This is mostly
1016 significant when automatically fetching the key based on the id in
1017 a header (i.e. "signature made by...."). "no-include-subkeys"
1020 2002-02-14 David Shaw <dshaw@jabberwocky.com>
1022 * gpgkeys_ldap.c: Fix compiler warning.
1024 * gpgkeys_ldap.c: Be much more robust with mangled input files.
1026 2001-12-28 David Shaw <dshaw@jabberwocky.com>
1028 * gpgkeys_mailto.in: Use the new OUTOFBAND indicator so gpg knows
1029 not to try and import anything. Also turn on perl -w for
1032 * gpgkeys_ldap.c (main): If we're using temp files (rather than
1033 stdin/stdout), make sure the file is closed when we're done.
1035 2001-12-20 David Shaw <dshaw@jabberwocky.com>
1037 * Properly free the LDAP response when we're done with it.
1039 * Now that we handle multiple keys, we must remove duplicates as
1040 the LDAP keyserver returns keys with multiple user IDs multiple
1043 * Properly handle multiple keys with the same key ID (it's really
1044 rare, so fetch "0xDEADBEEF" to test this).
1046 2001-12-17 David Shaw <dshaw@jabberwocky.com>
1048 * gpgkeys_ldap.c, gpgkeys_mailto.in: Fix GNU capitalization
1049 issues. Prefix log messages with "gpgkeys" to clarify which
1050 program is generating them.
1052 2001-12-14 David Shaw <dshaw@jabberwocky.com>
1054 * gpgkeys_ldap.c (search_key): Use unsigned int rather than uint
1057 2001-12-04 David Shaw <dshaw@jabberwocky.com>
1059 * Initial version of gpgkeys_ldap (LDAP keyserver helper) and
1060 gpgkeys_mailto (email keyserver helper)
1063 Copyright 1998, 1999, 2000, 2001, 2002, 2003,
1064 2004 Free Software Foundation, Inc.
1066 This file is free software; as a special exception the author gives
1067 unlimited permission to copy and/or distribute it, with or without
1068 modifications, as long as this notice is preserved.
1070 This file is distributed in the hope that it will be useful, but
1071 WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
1072 implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.