2008-06-18 Marcus Brinkmann <marcus@g10code.de>
[gnupg.git] / common / ChangeLog
blob65126200c91f15af99d95090417dac2c54fbc0e8
1 2008-06-18  Marcus Brinkmann  <marcus@g10code.de>
3         * sysutils.c (TRANS_MAX): Bump up to 350 to be on the safe side.
5         * sysutils.h (translate_table_init, translate_table_lookup): New
6         prototypes.
7         * sysutils.c: Include <ctype.h>.
8         (FD_TRANSLATE_MAX): New macro.
9         (fd_translate, fd_translate_len): New static variables.
10         (translate_table_init, translate_table_lookup): New functions.
11         (translate_sys2libc_fd_int): Translate file descriptor.
12         * iobuf.c (check_special_filename): Translate handle values from
13         special filenames.
15 2008-06-16  Werner Koch  <wk@g10code.com>
17         * homedir.c (w32_commondir): New.
18         (gnupg_sysconfdir): Use it.
20 2008-06-09  Werner Koch  <wk@g10code.com>
22         * b64dec.c: New.
24 2008-06-05  Werner Koch  <wk@g10code.com>
26         * util.h (gnupg_copy_time): Replace strcpy by memcpy.
28 2008-05-26  Werner Koch  <wk@g10code.com>
30         * asshelp.c (send_one_option, send_pinentry_environment): use
31         xfree and xtrystrdup.
33         * i18n.c (i18n_switchto_utf8) [USE_SIMPLE_GETTEXT]: Return NULL.
35         * homedir.c (gnupg_module_name): Add
36         GNUPG_MODULE_NAME_CONNECT_AGENT and GNUPG_MODULE_NAME_GPGCONF.
38 2008-04-21  Werner Koch  <wk@g10code.com>
40         * http.c (http_wait_response) [W32]: Use DuplicateHandle because
41         it is a socket.
42         (cookie_read) [W32]: Use recv in place of read.
44 2008-04-08  Werner Koch  <wk@g10code.com>
46         * i18n.c (i18n_switchto_utf8, i18n_switchback)
47         [USE_SIMPLE_GETTEXT]: Implement.
49 2008-04-07  Werner Koch  <wk@g10code.com>
51         * b64enc.c (b64enc_start): Detect PGP mode.
52         (b64enc_finish): Write PGP CRC.
53         * util.h (struct b64state): Add field CRC.
54         * t-b64.c: New.
56         * pka.c (get_pka_info): Use xtrymalloc and check result.
58 2008-03-25  Werner Koch  <wk@g10code.com>
60         * localename.c: Strip all W32 code.  Include w32help.h.
61         (gnupg_messages_locale_name) [W32]: Use the gettext_localename.
63 2008-03-17  Werner Koch  <wk@g10code.com>
65         * iobuf.c (IOBUF_BUFFER_SIZE): Actually use this macro.
67         * simple-pwquery.c (agent_send_all_options): Fix last change.
69 2008-03-06  Werner Koch  <wk@g10code.com>
71         * simple-pwquery.c (agent_send_all_options): Add support for
72         XAUTHORITY and PINENTRY_USER_DATA.
74 2008-02-15  Marcus Brinkmann  <marcus@g10code.de>
76         * exechelp.c (gnupg_spawn_process_fd): Add flag DETACHED_PROCESS
77         unconditionally (required for all callers at the moment).
79 2008-02-14  Werner Koch  <wk@g10code.com>
81         * sysutils.c (gnupg_allow_set_foregound_window): New.
82         (WINVER) [W32]: Define.
84 2008-01-31  Werner Koch  <wk@g10code.com>
86         * audit.c (audit_print_result): Make sure that the output is
87         always UTF8.
89 2008-01-27  Werner Koch  <wk@g10code.com>
91         * exechelp.c (gnupg_spawn_process): Add arg FLAGS and changed all
92         callers to pass 0 for it.
94 2007-12-13  Werner Koch  <wk@g10code.com>
96         * sexputil.c (hash_algo_from_sigval): New.
97         * t-sexputil.c: New.
98         * Makefile.am (module_tests): Add it.
100 2007-12-11  Werner Koch  <wk@g10code.com>
102         * asshelp.c (send_pinentry_environment): Allow using of old
103         gpg-agents not capabale of the xauthority and pinentry_user_data
104         options.
106 2007-12-04  Werner Koch  <wk@g10code.com>
108         * Makefile.am (t_helpfile_LDADD, module_maint_tests): New.
109         * t-helpfile.c: New.
110         * helpfile.c: New.
111         * membuf.h (is_membuf_ready, MEMBUF_ZERO): New.
112         * localename.c: New.  Taken from gettext with modifications as done
113         for GpgOL.  Export one new function.
114         * util.h (gnupg_messages_locale_name, gnupg_get_help_string): Added.
116         * sysutils.c (gnupg_reopen_std): New.  Taken from ../g10/gpg.c.
118 2007-11-27  Werner Koch  <wk@g10code.com>
120         * Makefile.am (CLEANFILES): New.
122         * homedir.c (dirmngr_socket_name): Use CSIDL_WINDOWS.
124 2007-11-15  Werner Koch  <wk@g10code.com>
126         * asshelp.c (send_pinentry_environment): Add args XAUTHORITY and
127         PINENTRY_USER_DATA.
128         (start_new_gpg_agent): Ditto.
130 2007-11-07  Werner Koch  <wk@g10code.com>
132         * status.h: New.
133         * errors.h: Remove.
135 2007-11-05  Werner Koch  <wk@g10code.com>
137         * audit.c, audit.h: New. 
138         * Makefile.am: Add rules to build audit-events.h.
139         * exaudit.awk: New.
140         * mkstrtable.awk: New.  Taken from libgpg-error.
142 2007-10-19  Werner Koch  <wk@g10code.com>
144         * i18n.c (i18n_switchto_utf8, i18n_switchback): New.
146 2007-10-01  Werner Koch  <wk@g10code.com>
148         * sysutils.h (FD2INT, INT2FD): New.
150 2007-09-21  Werner Koch  <wk@g10code.com>
152         * homedir.c (default_homedir): Make registry work.  Reported by
153         Marc Mutz.
155 2007-08-29  Werner Koch  <wk@g10code.com>
157         * exechelp.c (gnupg_wait_process): Add arg EXITCODE.  Changed all
158         callers.
159         (gnupg_create_inbound_pipe): New.
160         * util.h (GNUPG_MODULE_NAME_GPGSM, GNUPG_MODULE_NAME_GPG): New.
161         * homedir.c (gnupg_module_name): Add them
162         
163 2007-08-28  Werner Koch  <wk@g10code.com>
165         * gettime.c (check_isotime, add_isotime): New.  Originally written
166         for DirMngr by me.
167         (add_days_to_isotime): New.
168         (date2jd, jd2date, days_per_month, days_per_year): New. Taken from
169         my ancient (1988) code used in Wedit (time2.c).
171 2007-08-27  Werner Koch  <wk@g10code.com>
173         * util.h (GNUPG_MODULE_NAME_CHECK_PATTERN): New.
174         * homedir.c (gnupg_module_name): Add it.
175         * exechelp.c (w32_fd_or_null) [W32]: New.
176         (gnupg_spawn_process_fd): New.
177         (gnupg_wait_process) [W32]: Close the handle after if the process has
178         returned.
180 2007-08-22  Werner Koch  <wk@g10code.com>
182         Updated estream from libestream.
183         
184         * estream.c (mem_malloc, mem_realloc, mem_free): New.  Use them
185         instead of the ES_MEM_foo.
186         * estream.c (estream_cookie_mem): Remove members DONT_FREE,
187         APPEND_ZERO, PTR and SIZE.  Add MEMORY_LIMIT.  Put GROW into a new
188         FLAGS struct.
189         (es_func_mem_create): Remove APPEND_ZERO, DONT_FREE, PTR and
190         SIZE.  Add MEMORY_LIMIT.
191         (es_func_mem_write, es_func_mem_seek, es_func_mem_destroy): Revamp.
192         (es_open_memstream): Change API to just take a memory limit and a
193         mode argument.  Rename to ..
194         (es_fopenmem): .. this.
195         (HAVE_W32_SYSTEM) [_WIN32]: Define if not defined.
196         (tmpfd) [W32]: Implement directly using the W32 API.
197         (es_fgets): Rewrite without using doreadline.
199 2007-08-21  Werner Koch  <wk@g10code.com>
201         * sysutils.c (gnupg_tmpfile): New.
202         * t-sysutils.c: New.
203         * Makefile.am (module_tests): Add t-sysutils.
205 2007-08-20  Werner Koch  <wk@g10code.com>
207         * exechelp.c [W32]: Redefine X_OK to F_OK.
209 2007-08-16  Werner Koch  <wk@g10code.com>
211         * Makefile.am (t_convert_DEPENDENCIES): Remove
212         ($(PROGRAMS)): Remove.
213         (t_common_ldadd): Use libcommon.a and not the macro.
215 2007-08-14  Werner Koch  <wk@g10code.com>
217         * homedir.c (dirmngr_socket_name): New.
219 2007-08-07  Werner Koch  <wk@g10code.com>
221         * tlv.c, tlv.h: Move from ../scd/.
222         * tlv.c (parse_sexp, parse_ber_header): Add ERRSOURCE arg and prefix
223         name with a _.
224         * tlv.h: Use macro to convey ERRSOURCE.
226 2007-08-02  Werner Koch  <wk@g10code.com>
228         * gc-opt-flags.h: New.
230 2007-08-01  Werner Koch  <wk@g10code.com>
232         * estream-printf.c (read_dummy_value): Removed as it is useless now.
233         (read_values): Remove check on !vaargs which is not anymore needed
234         and anyway not portable.  Reported by Peter O'Gorman.
236 2007-07-16  Werner Koch  <wk@g10code.com>
238         * estream.c (es_func_file_create): Clear NO_CLOSE flag.
240 2007-07-12  Werner Koch  <wk@g10code.com>
242         * sysutils.h (gnupg_fd_t): New.
243         * sysutils.c (translate_sys2libc_fd): Use that type instead of int.
244         (translate_sys2libc_fd_int): New.
246 2007-07-09  Werner Koch  <wk@g10code.com>
248         * t-gettime.c (test_isotime2epoch): Use time_t and not u32.
250 2007-07-05  Werner Koch  <wk@g10code.com>
252         * t-gettime.c: New. 
253         * gettime.c (isotime2epoch, epoch2isotime): New.
255 2007-07-04  Werner Koch  <wk@g10code.com>
257         * estream.c (es_init_do): Do not throw an error if pth has already
258         been initialized.
260 2007-06-26  Werner Koch  <wk@g10code.com>
262         * Makefile.am ($(PROGRAMS)): New.
264         * util.h (init_common_subsystems): Moved to ..
265         * init.h: .. New.
266         * util.h: Include init.h.
268         * homedir.c (standard_homedir): New.
269         (default_homedir) [W32]: Reimplemented in terms of
270         standard_homedir.  Fixed memory leak.
272 2007-06-25  Werner Koch  <wk@g10code.com>
274         * iobuf.c: Add more documentation and slighly restructured macro
275         defintion for better readability.
276         (FILEP_OR_FD): Rename to fp_or_fd_t.
277         (CLOSE_CACHE): Rename to close_cache_t.
279         * sysutils.c (translate_sys2libc_fd): New using the code from iobuf.c.
280         * iobuf.c: Include sysutils.h.
281         (iobuf_translate_file_handle): Remove.
282         (translate_file_handle): Use new function.
284         * estream-printf.c [TEST]: Header including fixes. 
285         (do_format): Do not append a trailing Nul.  This avoids spurious
286         Nuls in the es_printf output.
287         (estream_vsnprintf, estream_vasprintf): Take this in account.
289         * estream.h (struct es__stream): Change FLAGS to a bit structure.
290         (ES__FLAG_WRITING): Replace by a bit from FLAGS.  * estream.c
291         (struct estream_internal): Rename FLAGS to MODEFLAGS so that they
292         are not confused with the estream flags.
293         (es_initialize, es_create): Add arg MODEFLAGS so that we can setup
294         the intial writemode.  Changed all callers to pass them.
295         (es_convert_mode): Set O_BINARY.
296         (es_func_fd_create, es_func_fp_create, es_func_file_create) [W32]:
297         Call setmode if requested.
298         
299 2007-06-24  Werner Koch  <wk@g10code.com>
301         * estream.c (do_fpopen, es_fpopen, es_fpopen_nc): New.
302         (es_func_fp_create, es_func_fp_read, es_func_fp_write) 
303         (es_func_fp_seek, es_func_fp_destroy): New.
305 2007-06-22  Werner Koch  <wk@g10code.com>
307         * estream.c (es_fdopen): Factored code out to..
308         (do_fdopen): .. new.
309         (es_fdopen_nc): New.
310         (estream_cookie_fd): Add field NO_CLOSE. 
311         (es_func_fd_create): Add arg NO_CLOSE and changed all callers.
312         (es_func_fd_destroy): Handle the new flag.
314         * homedir.c (gnupg_libexecdir) [W32]: Factor code out to ..
315         (w32_rootdir): .. new.
316         (gnupg_sysconfdir, gnupg_libdir, gnupg_datadir) [W32]: Return
317         name based on w32_rootdir().
319 2007-06-21  Werner Koch  <wk@g10code.com>
321         * membuf.h (get_membuf_len): New.
323         * membuf.c (init_membuf_secure): Really allocate in secure memory.
324         (put_membuf_str): New.
326         * ttyio.c (tty_getf): New.
328         * util.h (ctrl_t): Declare it here.
330         * asshelp.c (start_new_gpg_agent): New.  Based on code from
331         ../sm/call-agent.c
333 2007-06-20  Werner Koch  <wk@g10code.com>
335         * sysutils.c (gnupg_sleep): New.
336         * sysutils.h [W32]: Remove _sleep wrapper.  Changed all callers to
337         use gnupg_sleep.
339         * exechelp.c (build_w32_commandline_copy): New.
340         (build_w32_commandline): Factored some code out to new function
341         and correctly process a PGMNAME with spaces.
342         (gnupg_spawn_process_detached) [W32]: Implement.
344 2007-06-14  Werner Koch  <wk@g10code.com>
346         * simple-pwquery.h (MAP_SPWQ_ERROR_IMPL): New.
347         (SPWQ_NO_PIN_ENTRY): New.
348         * simple-pwquery.c (simple_pw_set_socket): New.
349         (agent_open): Use it if GPG_AGENT_INFO is not set.
350         (simple_pwquery): Extended to allow returning of otehyr error codes.
352         * util.h (GNUPG_MODULE_NAME_AGENT, GNUPG_MODULE_NAME_PINENTRY) 
353         (GNUPG_MODULE_NAME_SCDAEMON, GNUPG_MODULE_NAME_DIRMNGR) 
354         (GNUPG_MODULE_NAME_PROTECT_TOOL): New.
355         * homedir.c (gnupg_module_name): New.
356         (gnupg_bindir): New.
358 2007-06-12  Werner Koch  <wk@g10code.com>
360         * homedir.c (gnupg_sysconfdir): New.
361         (gnupg_libexecdir): New.  Taken from g10/misc.c:get_libexecdir.
362         (gnupg_datadir): New.
363         (gnupg_libdir): New.
365         * http.c (connect_server) [W32]: Do not call init_sockets if
366         HTTP_NO_WSASTARTUP is defined.
368         * init.c: New.
370         * estream.c (es_init_do): Init stream lock here because we can't
371         use a static initialization with W32pth.
373 2007-06-11  Werner Koch  <wk@g10code.com>
375         * Makefile.am (t_common_ldadd): Use libcommonstd macro.
377 2007-06-06  Werner Koch  <wk@g10code.com>
379         * Makefile.am: Include am/cmacros.am.
381         * sysutils.h [W32]: Remove prototypes for the registry access.
382         * w32reg.c:  Move to ../jnlib/w32-reg.c.
384         * i18n.c (i18n_init): New.
386         * simple-gettext.c: Remove.
388         * iobuf.c (iobuf_get_filelength): Rename SIZE to EXSIZE to silent
389         shadowing warning.
391 2007-06-04  Werner Koch  <wk@g10code.com>
393         * http.c [W32]: Include unistd.h also in this case.
394         (write_server) [W32]: Fixed error code.
395         (init_sockets): Fixed syntax error.
396         (cookie_close): Replace close by sock_close macro.
398         * estream.c [w32]: Do not init Mutex.
400         * Makefile.am (common_sources) [USE_SNS_SRV]: Build srv.c only
401         when needed.
403         * ttyio.c (init_ttyfp) [W32]: Do not use TTYFP.
405         * util.h: Include ../jnlib/dynload.h.
407         * dynload.h:  Move to ../jnlib.
409 2007-05-30  Werner Koch  <wk@g10code.com>
411         * estream.c (MEM_FREE, MEM_ALLOC, MEM_REALLOC): Prefix with ES_ as
412         windows.h also has such definitions,
414 2007-05-15  Werner Koch  <wk@g10code.com>
416         * util.h: Do not include gnulib's vasprintf.  Redefine asprintf
417         and vasprintf.
419         * xasprintf.c (xasprintf, xtryasprintf): Use estream_vasprintf.
421         * estream-printf.h, estream-printf.c: New.  Taken from current
422         libestream SVN.
423         * Makefile.am (common_sources): Add them.
425 2007-05-14  Werner Koch  <wk@g10code.com>
427         * sexp-parse.h (smklen): New.
428         * sexputil.c: Include sexp-parse.h.
429         (make_simple_sexp_from_hexstr): Replace sprintf by smklen.
431 2007-05-07  Werner Koch  <wk@g10code.com>
433         * signal.c (got_fatal_signal): Protect SIG from being clobbered by
434         a faulty signal implementaion.  Suggested by James Juran. 
436 2007-04-25  Werner Koch  <wk@g10code.com>
438         * i18n.h (ngettext): New.
439         * simple-gettext.c (ngettext): New.
441 2007-04-20  Werner Koch  <wk@g10code.com>
443         * miscellaneous.c (my_gcry_logger, my_gcry_outofcore_handler):
444         Moved from gpg-agent to here.
445         (my_gcry_fatalerror_handler): new.
446         (setup_libgcrypt_logging): New.
448 2007-03-19  Werner Koch  <wk@g10code.com>
450         * miscellaneous.c (print_hexstring): New.
451         * estream.c (es_fprintf_unlocked): New.
452         (es_write_sanitized): New.
453         (es_write_hexstring): New.
454         (es_write_sanitized_utf8_buffer) [GNUPG_MAJOR_VERSION]: New.
456 2007-03-09  David Shaw  <dshaw@jabberwocky.com>
458         From STABLE-BRANCH-1-4
460         * http.c (do_parse_uri): Remove the hkp port 11371 detection.  We
461         implement hkp in the keyserver handler, and the support here makes
462         it appear like a bad hkp request actually succeeded.
464 2007-01-31  Werner Koch  <wk@g10code.com>
466         * Makefile.am (t_common_ldadd): Add LIBINCONV and LIBINTL.
468 2007-01-25  Werner Koch  <wk@g10code.com>
470         * simple-pwquery.c (simple_pwquery): New arg OPT_CHECK.
472 2006-12-13  David Shaw  <dshaw@jabberwocky.com>
474         * Makefile.am (AM_CPPFLAGS): Include intl/ so we can reference the
475         built-in headers.
477 2006-11-23  Werner Koch  <wk@g10code.com>
479         * http.c: Include i18n.h
481 2006-11-21  Werner Koch  <wk@g10code.com>
483         * estream.c: Remove explicit Pth soft mapping diabling becuase it
484         is now done in config.h.
486 2006-11-15  Werner Koch  <wk@g10code.com>
488         * estream.c: Disabled Pth soft mapping.
489         (my_funopen_hook_ret_t): New.
490         (print_fun_writer): Use it here.
492         * iobuf.c (fd_cache_close): Use %d instead of %p for debug output.
494 2006-11-03  Werner Koch  <wk@g10code.com>
496         * Makefile.am (t_convert_DEPENDENCIES): Add libcommon.  From
497         Gentoo.
499 2006-10-24  Marcus Brinkmann  <marcus@g10code.de>
501         * Makefile.am (libcommon_a_CFLAGS): Add $(LIBASSUAN_CFLAGS).
502         (libsimple_pwquery_a_CFLAGS): New variable.
504 2006-10-20  Werner Koch  <wk@g10code.com>
506         * convert.c (hex2bin): New.
508 2006-10-17  Werner Koch  <wk@g10code.com>
510         * estream.c (struct estream_internal, es_initialize) 
511         (es_deinitialize, print_fun_writer, es_print): New and modified
512         functions to avoid tempfiles for printf style printing. 
514         * Makefile.am (libcommonpth_a_SOURCES): New. We now build a secon
515         version of the library with explicit Pth support.
516         * exechelp.c, estream.c: Make use of WITHOUT_GNU_PTH.
518 2006-10-08  Werner Koch  <wk@g10code.com>
520         * gpgrlhelp.c: Trun all functions into dummies if readline is not
521         available.
523 2006-10-06  Werner Koch  <wk@g10code.com>
525         * Makefile.am (AM_CFLAGS): Use PTH version of libassuan.
527         * util.h (GNUPG_GCC_A_SENTINEL): Defined for gcc >= 4.
529 2006-10-04  David Shaw  <dshaw@jabberwocky.com>
531         * gpgrlhelp.c: readline requires stdio.h.
533 2006-10-04  Werner Koch  <wk@g10code.com>
535         * membuf.c (init_membuf_secure): New.
536         (put_membuf): Make sure that ERRNO is set even if the underlying
537         malloc code does not work properly.
538         (get_membuf): Set ERRNO on error.
539         (get_membuf): Allow to pass LEN as NULL.
541 2006-10-02  Werner Koch  <wk@g10code.com>
543         * iobuf.c (iobuf_unread): Removed.  This code is not required.
544         Also removed the entire unget buffer stuff.
546 2006-09-27  Werner Koch  <wk@g10code.com>
548         * util.h: Do not include strsep.h and strpbrk.h.
549         (isascii): Removed as it is now in jnlib.
551         * iobuf.c (pop_filter, underflow, iobuf_close): Free the unget
552         buffer.
554 2006-09-27  Florian Weimer <fweimer@bfk.de>  (wk)
555         
556         * iobuf.c (iobuf_unread): New.
558 2006-09-22  Werner Koch  <wk@g10code.com>
560         * i18n.h: Changed license to an all permissive one.
562         * ttyio.c (tty_get): We need to use readline too.  Added two more
563         hooks.
565 2006-09-21  Werner Koch  <wk@g10code.com>
567         * ttyio.c (tty_private_set_rl_hooks): New.
568         (tty_enable_completion, tty_disable_completion): Use a hook to
569         enable readline support.  Now always available.
570         (tty_cleanup_rl_after_signal): New.
572         * ttyio.h: Removed readline specific stuff.  Included util.h.
573         * common-defs.h: New.
575 2006-09-15  Werner Koch  <wk@g10code.com>
577         * convert.c: New.
578         (hexcolon2bin): New.
579         (bin2hex, bin2hexcolon, do_binhex): New.
580         * t-convert.c: New
582 2006-09-14  Werner Koch  <wk@g10code.com>
584         * util.h (out_of_core): Use new gpg_error_from_syserror function.
586         * http.c (init_sockets): Changed it to require 2.2 unless it is
587         build within gnupg 1 where we require 1.1 (and not anymore allow
588         for 1.0).
590 2006-09-07  Werner Koch  <wk@g10code.com>
592         * exechelp.c (gnupg_spawn_process): Factor out post fork code to ..
593         (do_exec): .. new function.  Allow passing of -1 for the fds.
594         (gnupg_spawn_process): Terminate gcrypt's secure memory in the child.
595         (gnupg_spawn_process_detached): New.
597 2006-09-06  Werner Koch  <wk@g10code.com>
599         * maperror.c: Removed.
601         * util.h (out_of_core): New.
603 2006-09-04  Werner Koch  <wk@g10code.com>
605         * http.c (http_get_header): New.
606         (capitalize_header_name, store_header): New.
607         (parse_response): Store headers away.
608         (send_request): Return GPG_ERR_NOT_FOUND if connect_server failed.
609         * http.h: New flag HTTP_FLAG_NEED_HEADER.
611 2006-08-21  Werner Koch  <wk@g10code.com>
613         * Makefile.am (libcommon_a_SOURCES): Added keyserver.h
615         * openpgpdefs.h: New.  Stripped from ..g10/packet.h.
617 2006-08-16  Werner Koch  <wk@g10code.com>
619         * keyserver.h: Moved from ../include to here.
621         * http.c: Include srv.h.
623         * srv.c, srv.h: New. Taken from GnuPG 1.4
625 2006-08-14  Werner Koch  <wk@g10code.com>
627         * http.h (struct http_context_s): Moved to implementation.
628         * http.c (http_open): Changed call to return a context.
629         (http_open_document): Ditto.
630         (http_get_read_ptr, http_get_read_ptr, http_get_status_code): New.
631         (do_parse_uri): Replaced strlwr by straight code to ease
632         standalone use of this file.
633         (http_wait_response): Removed arg STATUS_CODE as it is available
634         through an accessor function. Adjusted caller.
635         (http_escape_string): New.
637         * estream.c (es_read_line): Renamed to ..
638         (doreadline): .. this.  Changed all callers.
639         (es_read_line): New.  This is theusual limited getline variabnt as
640         used at several places.  Here taken and adjusted from xreadline.c
641         (es_free): New.
643 2006-08-11  Werner Koch  <wk@g10code.com>
645         * http.c: Major internal changes to optionallly support GNUTLS and
646         ESTREAM.
647         (http_open): Move initialization of the stream ...
648         (send_request): .. here.
649         (http_register_tls_callback): New.
651         * estream.c (es_writen): Try to seek only is a seek function has
652         been registered.
654 2006-08-09  Werner Koch  <wk@g10code.com>
656         * http.c, http.h: New.  Taken from gnupg 1.4.5, merged with
657         changes done for the Dirmngr project (by g10 Code) and cleaned up
658         some stuff.
659         (make_header_line): New. Change all caller to make user of the new
660         * Makefile.am (libcommon_a_SOURCES): Added http.c and http.h.
662 2006-05-23  Werner Koch  <wk@g10code.com>
664         * gettime.c (isotimestamp): New.
666         * ttyio.c (tty_get_ttyname): Posixly correct usage of ctermid.
668         * dns-cert.c: New.  Taken from 1.4.3's util/cert.c.
669         * dns-cert.h: New.
671 2006-05-22  Werner Koch  <wk@g10code.com>
673         * pka.c: New. Taked from 1.4.3.
674         * pka.h: New.
675         * Makefile.am: Added pka.
677 2006-05-19  Werner Koch  <wk@g10code.com>
679         * yesno.c (answer_is_yes_no_default, answer_is_yes_no_quit):
680         Updated from 1.4.3.
681         (answer_is_okay_cancel): new.  From 1.4.3.
683         * miscellaneous.c (match_multistr): New.  Taken from 1.4.3.
685         * ttyio.c (tty_enable_completion, tty_disable_completion): New
686         dummy functions.
687         * ttyio.h: Add prototypes and stubs.
689 2006-04-19  Werner Koch  <wk@g10code.com>
691         * iobuf.c (iobuf_get_fd): New.  Taken from 1.4.3.
692         (iobuf_is_pipe_filename): New.
693         (pop_filter): Made static.
694         (iobuf_skip_rest): New.  Orginal patch by Florian
695         Weimer.  Added new argument PARTIAL.
696         (block_filter): Remove the old gpg indeterminate length mode.
697         (block_filter): Properly handle a partial body stream
698         that ends with a 5-byte length that happens to be zero.
699         (iobuf_set_block_mode, iobuf_in_block_mode): Removed as
700         superfluous.
701         (iobuf_get_filelength): New arg OVERFLOW.
702         (iobuf_get_filelength) [W32]: Use GetFileSizeEx if available
703         * miscellaneous.c (is_file_compressed): Take care of OVERFLOW.
705 2006-04-18  Werner Koch  <wk@g10code.com>
707         * homedir.c (w32_shgetfolderpath): New.  Taken from gpg 1.4.3.
708         (default_homedir): Use it.
710 2005-10-08  Marcus Brinkmann  <marcus@g10code.de>
712         * signal.c (get_signal_name): Check value of HAVE_DECL_SYS_SIGLIST
713         instead of just if it is defined.
715 2005-09-28  Marcus Brinkmann  <marcus@g10code.de>
717         * Makefile.am (AM_CFLAGS): Add $(LIBASSUAN_CFLAGS).
719 2005-07-04  Marcus Brinkmann  <marcus@g10code.de>
721         * simple-pwquery.h (simple_pwclear): New prototype.
722         * simple-pwquery.c (simple_pwclear): New function.
724 2005-06-15  Werner Koch  <wk@g10code.com>
726         * miscellaneous.c (make_printable_string): Made P a void*.
728         * sexputil.c (keygrip_from_canon_sexp, cmp_simple_canon_sexp):
729         Fixed signed/unsigned pointer mismatch.
730         (make_simple_sexp_from_hexstr): Ditto.  This is all too ugly; I
731         wonder why gcc-4's default is to warn about them and forcing us to
732         use cast the warning away.
733         * iobuf.c (block_filter): Ditto.
734         (iobuf_flush): Ditto.
735         (iobuf_read_line): Ditto.
736         (iobuf_read): Make BUFFER a void *.
737         (iobuf_write): Make BUFFER a const void *.
738         * ttyio.c (tty_print_utf8_string2): Ditto.
739         * estream.c (estream_cookie_mem): Make MEMORY unsigned char*.
740         (es_write): Make BUFFER a void *.
741         (es_writen): Ditto.
742         (es_func_fd_read, es_func_fd_write, es_func_mem_read) 
743         (es_func_mem_write): Ditto.
744         (es_read, es_readn): Ditto.
745         (es_func_mem_write): Made MEMORY_NEW an unsigned char *.
746         * estream.h (es_cookie_read_function_t)
747         (es_cookie_write_function_t): Changed buffer arg to void*.
749 2005-06-03  Werner Koch  <wk@g10code.com>
751         * estream.c: Use HAVE_CONFIG_H and not USE_CONFIG_H!
752         (es_func_fd_read, es_func_fd_write): Protect against EINTR.
753         
754 2005-06-01  Werner Koch  <wk@g10code.com>
756         * Makefile.am (AM_CPPFLAGS): Added.
758         * util.h: Add some includes for gnulib.
759         (ttyname, isascii): Define them inline.
760         * fseeko.c, ftello.c: Removed.
761         * strsep.c, mkdtemp.c: Removed.
762         * ttyname.c, isascii.c: Removed.
764 2005-05-31  Werner Koch  <wk@g10code.com>
766         * dynload.h: s/__inline__/inline/.
768 2005-05-13  Werner Koch  <wk@g10code.com>
770         * signal.c (got_fatal_signal): Print the signal number if we can't
771         get a name for it.
772         (get_signal_name): Return NULL if no name is available. Fixed
773         conditional for sys_siglist to the correct one.
775 2005-04-17  Werner Koch  <wk@g10code.com>
777         * sexputil.c (cmp_simple_canon_sexp): New.
778         (make_simple_sexp_from_hexstr): New.
780 2005-04-07  Werner Koch  <wk@g10code.com>
782         * sexputil.c: New.
784 2005-04-11  Marcus Brinkmann  <marcus@g10code.de>
786         * simple-pwquery.c (simple_pwquery): Use spwq_secure_free.
788 2005-03-03  Werner Koch  <wk@g10code.com>
790         * Makefile.am (AM_CFLAGS): Added PTH_CFLAGS.  Noted by Kazu Yamamoto.
792 2005-02-25  Werner Koch  <wk@g10code.com>
794         * xasprintf.c (xtryasprintf): New.
796 2005-01-26  Moritz Schulte  <moritz@g10code.com>
798         * Makefile.am (libcommon_a_SOURCES): New source files: estream.c,
799         estream.h.
800         * estream.c, estream.h: New files.
802 2005-01-03  Werner Koch  <wk@g10code.com>
804         * asshelp.c (send_pinentry_environment): Fixed changed from
805         2004-12-18; cut+paste error for lc-messages.
807 2004-12-21  Werner Koch  <wk@g10code.com>
809         * simple-pwquery.c (agent_open) [W32]: Implement for W32.
810         (readline) [W32]: Use recv instead of read.
811         (writen) [W32]: Use send instead of write.
812         (my_stpcpy): Define a stpcpy replacement so that this file
813         continues to be self-contained.
814         (agent_send_all_options) [W32]: Don't call ttyname.
816 2004-12-21  Marcus Brinkmann  <marcus@g10code.de>
818         * simple-pwquery.h (simple_query): Add prototype.
819         * simple-pwquery.c (simple_query): New function.
821 2004-12-21  Werner Koch  <wk@g10code.com>
823         * signal.c (got_fatal_signal, got_usr_signal)
824         (got_fatal_signal) [DOSISH]: Don't build.
825         * simple-gettext.c: Include sysutils.h 
827         * homedir.c: New. Use CSIDL_APPDATA for W32 as the default home
828         directory.
829         * Makefile.am (libcommon_a_SOURCES): Add it.
830         (EXTRA_DIST): Removed mkerror and mkerrtok.
832 2004-12-20  Werner Koch  <wk@g10code.com>
834         * sysutils.h [W32]: Define sleep.
835         * util.h: Add prototype for mkdtemp.
837         * membuf.c (put_membuf): Wipe out buffer after a failed realloc.
839 2004-12-19  Werner Koch  <wk@g10code.com>
841         * maperror.c (map_assuan_err_with_source): Oops, args were swapped.
843 2004-12-18  Werner Koch  <wk@g10code.com>
845         * maperror.c (map_assuan_err): Renamed to ..
846         (map_assuan_err_with_source): .. this and add arg SOURCE.c
847         * asshelp.c (send_pinentry_environment, send_one_option): Add arg
848         ERRSOURCE.
850 2004-12-15  Werner Koch  <wk@g10code.com>
852         * sysutils.h [W32]: Prototypes for registry functions.
853         * w32reg.c: Include sysutils.h
855         * simple-pwquery.c [W32]: Dummy code to allow a build.
857         * exechelp.c [W32]: Implemented for W32 .
859         * ttyname.c: New.
861         * asshelp.c (send_one_option): New.
862         (send_pinentry_environment): Cleaned up and made sure that empty
863         values are not send.
865 2004-12-07  Werner Koch  <wk@g10code.com>
867         * asshelp.c (send_pinentry_environment) [W32]: Do not use ttyname.
869 2004-12-06  Werner Koch  <wk@g10code.com>
871         * exechelp.h, exechelp.c: New.  Based on code from ../sm/import.c.
873 2004-12-03  Werner Koch  <wk@g10code.com>
875         * strsep.c: Fixed copyright comments.
877 2004-11-26  Werner Koch  <wk@g10code.com>
879         * simple-gettext.c: New taken from gnupg 1.3.x
881         * simple-pwquery.c [_WIN32]: Include winsock2.h.
882         (agent_open): Disable it until we have our AF_UNIX implementation
883         ready.
884         * fseeko.c, ftello.c: Include sys/types for the sake of W32.
886 2004-11-23  Werner Koch  <wk@g10code.com>
888         * b64enc.c: Include stdio.h and string.h
890 2004-08-18  Werner Koch  <wk@g10code.de>
892         * simple-pwquery.c (simple_pwquery): Handle gpg-error style return
893         code for canceled.
895 2004-07-20  Werner Koch  <wk@g10code.de>
897         * maperror.c: Removed header ksba.h.  Not required anymore.
899 2004-06-14  Werner Koch  <wk@gnupg.org>
901         * xreadline.c: New.  Based on the iobuf_read_line function.
903 2004-05-12  Werner Koch  <wk@gnupg.org>
905         * util.h (xtrycalloc_secure,xtrymalloc_secure): New.
907 2004-05-11  Werner Koch  <wk@gnupg.org>
909         * sysutils.c (disable_core_dumps): Only set the current limit.
910         (enable_core_dumps): New.
912 2004-04-13  Werner Koch  <wk@gnupg.org>
914         * simple-pwquery.c (copy_and_escape): Relaxed quoting.
916 2004-04-05  Werner Koch  <wk@gnupg.org>
918         * errors.h (STATUS_NEWSIG): New.
920 2004-03-11  Werner Koch  <wk@gnupg.org>
922         * dynload.h [__MINGW32__]: Define RTLD_LAZY.
924 2004-03-09  Werner Koch  <wk@gnupg.org>
926         * maperror.c (map_assuan_err): Map the Locale_Problem item.
928 2004-03-03  Werner Koch  <wk@gnupg.org>
930         * asshelp.c, asshelp.h: New.
931         (send_pinentry_environment): New. Code taken from ../sm/call-agent.c.
933 2004-02-19  Werner Koch  <wk@gnupg.org>
935         * simple-pwquery.c (agent_open): Don't mangle INFOSTR.
937 2004-02-17  Werner Koch  <wk@gnupg.org>
939         * simple-pwquery.c (agent_open): Ignore an empty GPG_AGENT_INFO.
941         * errors.h: Added STATUS_IMPORT_OK.
943 2004-02-10  Werner Koch  <wk@gnupg.org>
945         * b64enc.c: New.  Based on code from ../sm/base64.c.
947 2004-01-30  Marcus Brinkmann  <marcus@g10code.de>
949         * Makefile.am (libcommon_a_SOURCES): Add xasprintf.c.
950         * miscellaneous.c (xasprintf): Moved to ...
951         * xasprintf (xasprintf): ... here.  New file.
952         This allows to use xasprintf without sucking in gpg-error.
954 2004-01-27  Werner Koch  <wk@gnupg.org>
956         * sexp-parse.h: New; moved from../agent.
958         * util.h (xtoi_4): New.
960 2003-12-23  Werner Koch  <wk@gnupg.org>
962         * maperror.c (map_assuan_err): Prepared for a new error code.
964 2003-12-17  Werner Koch  <wk@gnupg.org>
966         * gettime.c (asctimestamp): Add a note on a non-avoidable gcc warning.
968         * util.h [!HAVE_VASPRINTF]: Add printf format attribute to the
969         replacement function.
971         * miscellaneous.c (xasprintf): New.
973 2003-11-14  Werner Koch  <wk@gnupg.org>
975         * mkdtemp.c (mkdtemp): Use gcry_create_nonce.
977         * cryptmiss.c: Removed.
979 2003-11-13  Werner Koch  <wk@gnupg.org>
981         * util.h (vasprintf): Also fixed the prototype.
983         * vasprintf.c (vasprintf): ARGS should not be a pointer.  Fixed
984         segv on Solaris.  Reported by Andrew J. Schorr.
986 2003-11-12  Werner Koch  <wk@gnupg.org>
988         * maperror.c (map_ksba_err, map_gcry_err, map_kbx_err): Removed.
990 2003-10-31  Werner Koch  <wk@gnupg.org>
992         * util.h (gnupg_isotime_t): New.
993         (gnupg_copy_time): New.
995         * gettime.c (gnupg_get_isotime): New.
997 2003-09-23  Werner Koch  <wk@gnupg.org>
999         * iobuf.c (check_special_filename): Replaced is isdigit by digitp
1000         to avoid passing negative values and potential locale problems.
1001         Problem noted by Christian Biere.
1003         * util.h (ascii_isspace): New.
1005 2003-09-18  Werner Koch  <wk@gnupg.org>
1007         * ttyio.c (tty_fprintf): New.
1008         (tty_print_string, tty_print_utf8_string2)
1009         (tty_print_utf8_string): Made P argument const byte*.
1011 2003-08-20  Marcus Brinkmann  <marcus@g10code.de>
1013         * maperror.c (map_ksba_err): Map -1.  Use gpg_err_make to set
1014         the error source.
1016 2003-08-14  Timo Schulz  <twoaday@freakmail.de>
1018         * dynload.h. New. W32 wrapper around the dynload mechanism.
1019         
1020 2003-07-15  Werner Koch  <wk@gnupg.org>
1022         * simple-pwquery.c, simple-pwquery.h:  New; moved from ../agent.  
1023         * Makefile.am (libsimple_pwquery_a_LIBADD): New.
1025 2003-06-25  Werner Koch  <wk@gnupg.org>
1027         * maperror.c (map_to_assuan_status): Directly map 0 to 0.
1029 2003-06-17  Werner Koch  <wk@gnupg.org>
1031         * gettime.c (scan_isodatestr,add_days_to_timestamp,strtimevalue)
1032         (strtimestamp,asctimestamp): New.  Code taken from gnupg 1.3.2
1033         mischelp.c.
1035         * yesno.c: New.  Code taken from gnupg 1.3.2 mischelp.c
1037         * miscellaneous.c: New.
1039         * util.h: Include utf8conf.h
1041 2003-06-16  Werner Koch  <wk@gnupg.org>
1043         * gettime.c (make_timestamp): New.
1045         * ttyio.c: New. Taken from gnupg 1.2.
1046         * ttyio.h: Move from ../include.
1048 2003-06-13  Werner Koch  <wk@gnupg.org>
1050         * util.h (seterr): Removed macro.
1051         (xmalloc_secure,xcalloc_secure): New.
1053 2003-06-11  Werner Koch  <wk@gnupg.org>
1055         * iobuf.c (iobuf_writebyte,iobuf_write): Return error code from
1056         iobuf_flush.
1057         (iobuf_writestr): Ditto.
1059 2003-06-10  Werner Koch  <wk@gnupg.org>
1061         * iobuf.c, iobuf.h: New. Taken from current gnupg 1.3 CVS.  Run
1062         indent on it and adjusted error handling to libgpg-error style.
1063         Replaced IOBUF by iobuf_t. Renamed malloc functions.
1065 2003-06-04  Werner Koch  <wk@gnupg.org>
1067         * errors.h: Removed all error codes.  We keep the status codes for
1068         now.
1069         * Makefile.am: Do not create errors.c anymore; remove it from the
1070         sources.
1072         * maperror.c: Don't include error.h.  Change all error codes to
1073         libgpg-error style.
1074         (map_assuan_err): Changed to new Assuan error code convention.
1075         (map_to_assuan_status): Likewise.
1076         (map_gcry_err,map_kbx_err): Not needed.  For now dummy functions.
1078         * membuf.c, membuf.h: New.  Code taken from ../sm/call-agent.h.
1079         * Makefile.am: Added above.
1081 2003-04-29  Werner Koch  <wk@gnupg.org>
1083         * util.h (fopencokokie): Removed prototype and struct.
1085         * fopencookie.c: Removed.
1087         * maperror.c: Use system assuan.h
1089 2002-10-31  Neal H. Walfield  <neal@g10code.de>
1091         * isascii.c: New file.
1092         * putc_unlocked.c: Likewise.
1094 2002-10-28  Neal H. Walfield  <neal@g10code.de>
1096         * signal.c (caught_fatal_sig): Remove superfluous zero
1097         initializer.
1098         (caught_sigusr1): Likewise.
1100 2002-09-04  Neal H. Walfield  <neal@g10code.de>
1102         * vasprintf.c (vasprintf) [va_copy]: Use va_copy.
1103         [!va_copy && __va_copy]: Use __va_copy.
1104         [!va_copy && !__va_copy]: Only now fall back to using memcpy.
1106 2002-08-21  Werner Koch  <wk@gnupg.org>
1108         * errors.h: Added STATUS_IMPORT_PROBLEM.
1110 2002-08-20  Werner Koch  <wk@gnupg.org>
1112         * vasprintf.c: Hack to handle NULL for %s.
1114 2002-08-09  Werner Koch  <wk@gnupg.org>
1116         * signal.c: New. Taken from GnuPG 1.1.91.
1118 2002-07-23  Werner Koch  <wk@gnupg.org>
1120         * util.h (_IO_cookie_io_functions_t): Fixed typo.  Noted by
1121         Richard Lefebvre.
1123 2002-07-22  Werner Koch  <wk@gnupg.org>
1125         * fseeko.c, ftello.c: New.
1127 2002-06-28  Werner Koch  <wk@gnupg.org>
1129         * maperror.c (map_to_assuan_status): Map more errorcodes to Bad
1130         Certificate.
1132 2002-06-26  Werner Koch  <wk@gnupg.org>
1134         * maperror.c (map_to_assuan_status): Map EOF to No_Data_Available.
1136 2002-06-10  Werner Koch  <wk@gnupg.org>
1138         * errors.h (gnupg_error_token): Add new prototype.
1139         (STATUS_ERROR): New.
1141         * mkerrtok: New.
1142         * Makefile.am: Use it to create the new error token function.
1144 2002-06-04  Werner Koch  <wk@gnupg.org>
1146         * maperror.c (map_to_assuan_status): Map Bad_CA_Certificate.
1148 2002-05-23  Werner Koch  <wk@gnupg.org>
1150         * no-pth.c, Makefile.am: Removed.
1152 2002-05-22  Werner Koch  <wk@gnupg.org>
1154         * mkdtemp.c: Replaced byte by unsigned char because it is no longer
1155         defined in gcrypt.h.
1157 2002-05-21  Werner Koch  <wk@gnupg.org>
1159         * maperror.c (map_gcry_err): Add libgcrypt's new S-expression errors.
1160         (map_ksba_err): Add a few mappings.
1162 2002-05-14  Werner Koch  <wk@gnupg.org>
1164         * gettime.c: New.
1166 2002-05-03  Werner Koch  <wk@gnupg.org>
1168         * errors.h: Added STARUS_EXPSIG and STATUS_EXPKEYSIG.
1170 2002-04-15  Werner Koch  <wk@gnupg.org>
1172         * cryptmiss.c: New.
1174 2002-02-14  Werner Koch  <wk@gnupg.org>
1176         * maperror.c: Add more assuan<->gnupg mappings.
1178 2002-02-12  Werner Koch  <wk@gnupg.org>
1180         * fopencookie.c: Dummy function.
1182         * vasprintf.c: New.  Taken from binutils-2.9.1 and dropped all non
1183         ANSI-C stuff.  Merged with asprintf version.
1185         * no-pth.c: New.
1187 2002-01-23  Werner Koch  <wk@gnupg.org>
1189         * mkdtemp.c: Copied from gnupg-1.0.6c and changed to use libgcrypt.
1191 2002-01-19  Werner Koch  <wk@gnupg.org>
1193         * sysutils.c: New.  This is the misc.c file from gnupg 1.0.6 with
1194         the OpenPGP stuff removed.
1195         * sysutils.h: New.
1196         
1197 2002-01-15  Werner Koch  <wk@gnupg.org>
1199         * maperror.c: Add mapping for Not_Trusted. 
1201 2002-01-11  Werner Koch  <wk@gnupg.org>
1203         * maperror.c (map_assuan_err): Codes for CRL
1205 2002-01-08  Werner Koch  <wk@gnupg.org>
1207         * util.h (spacep): New.
1209 2002-01-02  Werner Koch  <wk@gnupg.org>
1211         * maperror.c (map_to_assuan_status): New.  Merged from ../agent
1212         and ../sm.
1214 2001-12-20  Werner Koch  <wk@gnupg.org>
1216         * maperror.c (map_gcry_err): Add some mappings.
1218 2001-12-18  Werner Koch  <wk@gnupg.org>
1220         * Makefile.am (AM_CPPFLAGS): Include flags for gcrypt and ksba
1222 2001-12-14  Werner Koch  <wk@gnupg.org>
1224         * util.h (digitp, hexdigitp): New ctype like macros.
1225         (atoi_1,atoi_2,atoi_4,xtoi_1,xtoi_2): New.
1226         
1227         
1228  Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007,
1229            2008 Free Software Foundation, Inc.
1231  This file is free software; as a special exception the author gives
1232  unlimited permission to copy and/or distribute it, with or without
1233  modifications, as long as this notice is preserved.
1235  This file is distributed in the hope that it will be useful, but
1236  WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
1237  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
1238