1 2008-11-20 Werner Koch <wk@g10code.com>
3 * audit.c (writeout_li): Translate OKTEXT.
5 2008-11-04 Werner Koch <wk@g10code.com>
7 * i18n.c (i18n_init) [USE_SIMPLE_GETTEXT]: Adjust for changed
9 * homedir.c (gnupg_localedir): New.
11 2008-10-20 Werner Koch <wk@g10code.com>
13 * http.c (http_register_tls_callback) [!HTTP_USE_GNUTLS]: Mark
15 * localename.c (do_nl_locale_name): Ditto.
16 * audit.c (event2str): Silent gcc warning.
17 * sysutils.c (translate_sys2libc_fd): Mark unused arg.
18 (translate_sys2libc_fd_int): Ditto.
19 * iobuf.c (translate_file_handle): Ditto.
20 * asshelp.c (send_one_option): Ditto.
21 * exechelp.c (gnupg_spawn_process): Ditto.
22 * signal.c (got_usr_signal): Ditto
23 * estream.c (es_func_fd_create) [!W32]: Ditto.
24 (es_func_fp_create) [!W32]: Ditto.
25 (es_write_hexstring): Ditto.
26 (dummy_mutex_call_void, dummy_mutex_call_int) [HAVE_PTH]: New.
27 (ESTREAM_MUTEX_LOCK, ESTREAM_MUTEX_UNLOCK, ESTREAM_MUTEX_TRYLOCK)
28 (ESTREAM_MUTEX_INITIALIZE) [HAVE_PTH]: Use dummy calls so to mark
31 2008-10-19 Werner Koch <wk@g10code.com>
33 * estream-printf.c (estream_vsnprintf): Fix return value.
34 (check_snprintf): Add a new test.
35 (one_test) [W32]: Disable test.
37 2008-10-17 Werner Koch <wk@g10code.com>
39 * util.h (snprintf) [W32]: Redefine to estream_snprintf.
41 2008-09-03 Werner Koch <wk@g10code.com>
43 * convert.c (hex2str): New.
45 * t-convert.c (test_hex2str): New.
47 2008-08-19 Werner Koch <wk@g10code.com>
49 * iobuf.c: Avoid passing a NULL (iobuf_t)->desc to the log
50 function. Should in general never be NULL, but well. Reported by
53 2008-06-26 Werner Koch <wk@g10code.com>
55 * estream.c (es_write_sanitized): Loose check for control
56 characters to better cope with utf-8. The range 0x80..0x9f is
57 nowadays not anymore accidently used for control charaters.
59 2008-06-25 Marcus Brinkmann <marcus@g10code.de>
61 Revert last three changes related to handle translation.
63 (FD_TRANSLATE_MAX, fd_translate, fd_translate_len)
64 (translate_table_init, translate_table_lookup): Removed.
65 * iobuf.c (check_special_filename): Do not use
66 translate_table_lookup.
67 * sysutils.h (translate_table_init, translate_table_lookup):
70 2008-06-19 Werner Koch <wk@g10code.com>
72 * sysutils.c: Remove <ctype.h>.
73 (fd_translate_max): Use macro for the size.
74 (translate_table_init): Protect read against EINTR and replace
77 2008-06-18 Marcus Brinkmann <marcus@g10code.de>
79 * sysutils.c (TRANS_MAX): Bump up to 350 to be on the safe side.
81 * sysutils.h (translate_table_init, translate_table_lookup): New
83 * sysutils.c: Include <ctype.h>.
84 (FD_TRANSLATE_MAX): New macro.
85 (fd_translate, fd_translate_len): New static variables.
86 (translate_table_init, translate_table_lookup): New functions.
87 (translate_sys2libc_fd_int): Translate file descriptor.
88 * iobuf.c (check_special_filename): Translate handle values from
91 2008-06-16 Werner Koch <wk@g10code.com>
93 * homedir.c (w32_commondir): New.
94 (gnupg_sysconfdir): Use it.
96 2008-06-09 Werner Koch <wk@g10code.com>
100 2008-06-05 Werner Koch <wk@g10code.com>
102 * util.h (gnupg_copy_time): Replace strcpy by memcpy.
104 2008-05-26 Werner Koch <wk@g10code.com>
106 * asshelp.c (send_one_option, send_pinentry_environment): use
107 xfree and xtrystrdup.
109 * i18n.c (i18n_switchto_utf8) [USE_SIMPLE_GETTEXT]: Return NULL.
111 * homedir.c (gnupg_module_name): Add
112 GNUPG_MODULE_NAME_CONNECT_AGENT and GNUPG_MODULE_NAME_GPGCONF.
114 2008-04-21 Werner Koch <wk@g10code.com>
116 * http.c (http_wait_response) [W32]: Use DuplicateHandle because
118 (cookie_read) [W32]: Use recv in place of read.
120 2008-04-08 Werner Koch <wk@g10code.com>
122 * i18n.c (i18n_switchto_utf8, i18n_switchback)
123 [USE_SIMPLE_GETTEXT]: Implement.
125 2008-04-07 Werner Koch <wk@g10code.com>
127 * b64enc.c (b64enc_start): Detect PGP mode.
128 (b64enc_finish): Write PGP CRC.
129 * util.h (struct b64state): Add field CRC.
132 * pka.c (get_pka_info): Use xtrymalloc and check result.
134 2008-03-25 Werner Koch <wk@g10code.com>
136 * localename.c: Strip all W32 code. Include w32help.h.
137 (gnupg_messages_locale_name) [W32]: Use the gettext_localename.
139 2008-03-17 Werner Koch <wk@g10code.com>
141 * iobuf.c (IOBUF_BUFFER_SIZE): Actually use this macro.
143 * simple-pwquery.c (agent_send_all_options): Fix last change.
145 2008-03-06 Werner Koch <wk@g10code.com>
147 * simple-pwquery.c (agent_send_all_options): Add support for
148 XAUTHORITY and PINENTRY_USER_DATA.
150 2008-02-15 Marcus Brinkmann <marcus@g10code.de>
152 * exechelp.c (gnupg_spawn_process_fd): Add flag DETACHED_PROCESS
153 unconditionally (required for all callers at the moment).
155 2008-02-14 Werner Koch <wk@g10code.com>
157 * sysutils.c (gnupg_allow_set_foregound_window): New.
158 (WINVER) [W32]: Define.
160 2008-01-31 Werner Koch <wk@g10code.com>
162 * audit.c (audit_print_result): Make sure that the output is
165 2008-01-27 Werner Koch <wk@g10code.com>
167 * exechelp.c (gnupg_spawn_process): Add arg FLAGS and changed all
168 callers to pass 0 for it.
170 2007-12-13 Werner Koch <wk@g10code.com>
172 * sexputil.c (hash_algo_from_sigval): New.
174 * Makefile.am (module_tests): Add it.
176 2007-12-11 Werner Koch <wk@g10code.com>
178 * asshelp.c (send_pinentry_environment): Allow using of old
179 gpg-agents not capabale of the xauthority and pinentry_user_data
182 2007-12-04 Werner Koch <wk@g10code.com>
184 * Makefile.am (t_helpfile_LDADD, module_maint_tests): New.
187 * membuf.h (is_membuf_ready, MEMBUF_ZERO): New.
188 * localename.c: New. Taken from gettext with modifications as done
189 for GpgOL. Export one new function.
190 * util.h (gnupg_messages_locale_name, gnupg_get_help_string): Added.
192 * sysutils.c (gnupg_reopen_std): New. Taken from ../g10/gpg.c.
194 2007-11-27 Werner Koch <wk@g10code.com>
196 * Makefile.am (CLEANFILES): New.
198 * homedir.c (dirmngr_socket_name): Use CSIDL_WINDOWS.
200 2007-11-15 Werner Koch <wk@g10code.com>
202 * asshelp.c (send_pinentry_environment): Add args XAUTHORITY and
204 (start_new_gpg_agent): Ditto.
206 2007-11-07 Werner Koch <wk@g10code.com>
211 2007-11-05 Werner Koch <wk@g10code.com>
213 * audit.c, audit.h: New.
214 * Makefile.am: Add rules to build audit-events.h.
216 * mkstrtable.awk: New. Taken from libgpg-error.
218 2007-10-19 Werner Koch <wk@g10code.com>
220 * i18n.c (i18n_switchto_utf8, i18n_switchback): New.
222 2007-10-01 Werner Koch <wk@g10code.com>
224 * sysutils.h (FD2INT, INT2FD): New.
226 2007-09-21 Werner Koch <wk@g10code.com>
228 * homedir.c (default_homedir): Make registry work. Reported by
231 2007-08-29 Werner Koch <wk@g10code.com>
233 * exechelp.c (gnupg_wait_process): Add arg EXITCODE. Changed all
235 (gnupg_create_inbound_pipe): New.
236 * util.h (GNUPG_MODULE_NAME_GPGSM, GNUPG_MODULE_NAME_GPG): New.
237 * homedir.c (gnupg_module_name): Add them
239 2007-08-28 Werner Koch <wk@g10code.com>
241 * gettime.c (check_isotime, add_isotime): New. Originally written
243 (add_days_to_isotime): New.
244 (date2jd, jd2date, days_per_month, days_per_year): New. Taken from
245 my ancient (1988) code used in Wedit (time2.c).
247 2007-08-27 Werner Koch <wk@g10code.com>
249 * util.h (GNUPG_MODULE_NAME_CHECK_PATTERN): New.
250 * homedir.c (gnupg_module_name): Add it.
251 * exechelp.c (w32_fd_or_null) [W32]: New.
252 (gnupg_spawn_process_fd): New.
253 (gnupg_wait_process) [W32]: Close the handle after if the process has
256 2007-08-22 Werner Koch <wk@g10code.com>
258 Updated estream from libestream.
260 * estream.c (mem_malloc, mem_realloc, mem_free): New. Use them
261 instead of the ES_MEM_foo.
262 * estream.c (estream_cookie_mem): Remove members DONT_FREE,
263 APPEND_ZERO, PTR and SIZE. Add MEMORY_LIMIT. Put GROW into a new
265 (es_func_mem_create): Remove APPEND_ZERO, DONT_FREE, PTR and
266 SIZE. Add MEMORY_LIMIT.
267 (es_func_mem_write, es_func_mem_seek, es_func_mem_destroy): Revamp.
268 (es_open_memstream): Change API to just take a memory limit and a
269 mode argument. Rename to ..
270 (es_fopenmem): .. this.
271 (HAVE_W32_SYSTEM) [_WIN32]: Define if not defined.
272 (tmpfd) [W32]: Implement directly using the W32 API.
273 (es_fgets): Rewrite without using doreadline.
275 2007-08-21 Werner Koch <wk@g10code.com>
277 * sysutils.c (gnupg_tmpfile): New.
279 * Makefile.am (module_tests): Add t-sysutils.
281 2007-08-20 Werner Koch <wk@g10code.com>
283 * exechelp.c [W32]: Redefine X_OK to F_OK.
285 2007-08-16 Werner Koch <wk@g10code.com>
287 * Makefile.am (t_convert_DEPENDENCIES): Remove
288 ($(PROGRAMS)): Remove.
289 (t_common_ldadd): Use libcommon.a and not the macro.
291 2007-08-14 Werner Koch <wk@g10code.com>
293 * homedir.c (dirmngr_socket_name): New.
295 2007-08-07 Werner Koch <wk@g10code.com>
297 * tlv.c, tlv.h: Move from ../scd/.
298 * tlv.c (parse_sexp, parse_ber_header): Add ERRSOURCE arg and prefix
300 * tlv.h: Use macro to convey ERRSOURCE.
302 2007-08-02 Werner Koch <wk@g10code.com>
304 * gc-opt-flags.h: New.
306 2007-08-01 Werner Koch <wk@g10code.com>
308 * estream-printf.c (read_dummy_value): Removed as it is useless now.
309 (read_values): Remove check on !vaargs which is not anymore needed
310 and anyway not portable. Reported by Peter O'Gorman.
312 2007-07-16 Werner Koch <wk@g10code.com>
314 * estream.c (es_func_file_create): Clear NO_CLOSE flag.
316 2007-07-12 Werner Koch <wk@g10code.com>
318 * sysutils.h (gnupg_fd_t): New.
319 * sysutils.c (translate_sys2libc_fd): Use that type instead of int.
320 (translate_sys2libc_fd_int): New.
322 2007-07-09 Werner Koch <wk@g10code.com>
324 * t-gettime.c (test_isotime2epoch): Use time_t and not u32.
326 2007-07-05 Werner Koch <wk@g10code.com>
329 * gettime.c (isotime2epoch, epoch2isotime): New.
331 2007-07-04 Werner Koch <wk@g10code.com>
333 * estream.c (es_init_do): Do not throw an error if pth has already
336 2007-06-26 Werner Koch <wk@g10code.com>
338 * Makefile.am ($(PROGRAMS)): New.
340 * util.h (init_common_subsystems): Moved to ..
342 * util.h: Include init.h.
344 * homedir.c (standard_homedir): New.
345 (default_homedir) [W32]: Reimplemented in terms of
346 standard_homedir. Fixed memory leak.
348 2007-06-25 Werner Koch <wk@g10code.com>
350 * iobuf.c: Add more documentation and slighly restructured macro
351 defintion for better readability.
352 (FILEP_OR_FD): Rename to fp_or_fd_t.
353 (CLOSE_CACHE): Rename to close_cache_t.
355 * sysutils.c (translate_sys2libc_fd): New using the code from iobuf.c.
356 * iobuf.c: Include sysutils.h.
357 (iobuf_translate_file_handle): Remove.
358 (translate_file_handle): Use new function.
360 * estream-printf.c [TEST]: Header including fixes.
361 (do_format): Do not append a trailing Nul. This avoids spurious
362 Nuls in the es_printf output.
363 (estream_vsnprintf, estream_vasprintf): Take this in account.
365 * estream.h (struct es__stream): Change FLAGS to a bit structure.
366 (ES__FLAG_WRITING): Replace by a bit from FLAGS. * estream.c
367 (struct estream_internal): Rename FLAGS to MODEFLAGS so that they
368 are not confused with the estream flags.
369 (es_initialize, es_create): Add arg MODEFLAGS so that we can setup
370 the intial writemode. Changed all callers to pass them.
371 (es_convert_mode): Set O_BINARY.
372 (es_func_fd_create, es_func_fp_create, es_func_file_create) [W32]:
373 Call setmode if requested.
375 2007-06-24 Werner Koch <wk@g10code.com>
377 * estream.c (do_fpopen, es_fpopen, es_fpopen_nc): New.
378 (es_func_fp_create, es_func_fp_read, es_func_fp_write)
379 (es_func_fp_seek, es_func_fp_destroy): New.
381 2007-06-22 Werner Koch <wk@g10code.com>
383 * estream.c (es_fdopen): Factored code out to..
386 (estream_cookie_fd): Add field NO_CLOSE.
387 (es_func_fd_create): Add arg NO_CLOSE and changed all callers.
388 (es_func_fd_destroy): Handle the new flag.
390 * homedir.c (gnupg_libexecdir) [W32]: Factor code out to ..
391 (w32_rootdir): .. new.
392 (gnupg_sysconfdir, gnupg_libdir, gnupg_datadir) [W32]: Return
393 name based on w32_rootdir().
395 2007-06-21 Werner Koch <wk@g10code.com>
397 * membuf.h (get_membuf_len): New.
399 * membuf.c (init_membuf_secure): Really allocate in secure memory.
400 (put_membuf_str): New.
402 * ttyio.c (tty_getf): New.
404 * util.h (ctrl_t): Declare it here.
406 * asshelp.c (start_new_gpg_agent): New. Based on code from
409 2007-06-20 Werner Koch <wk@g10code.com>
411 * sysutils.c (gnupg_sleep): New.
412 * sysutils.h [W32]: Remove _sleep wrapper. Changed all callers to
415 * exechelp.c (build_w32_commandline_copy): New.
416 (build_w32_commandline): Factored some code out to new function
417 and correctly process a PGMNAME with spaces.
418 (gnupg_spawn_process_detached) [W32]: Implement.
420 2007-06-14 Werner Koch <wk@g10code.com>
422 * simple-pwquery.h (MAP_SPWQ_ERROR_IMPL): New.
423 (SPWQ_NO_PIN_ENTRY): New.
424 * simple-pwquery.c (simple_pw_set_socket): New.
425 (agent_open): Use it if GPG_AGENT_INFO is not set.
426 (simple_pwquery): Extended to allow returning of otehyr error codes.
428 * util.h (GNUPG_MODULE_NAME_AGENT, GNUPG_MODULE_NAME_PINENTRY)
429 (GNUPG_MODULE_NAME_SCDAEMON, GNUPG_MODULE_NAME_DIRMNGR)
430 (GNUPG_MODULE_NAME_PROTECT_TOOL): New.
431 * homedir.c (gnupg_module_name): New.
434 2007-06-12 Werner Koch <wk@g10code.com>
436 * homedir.c (gnupg_sysconfdir): New.
437 (gnupg_libexecdir): New. Taken from g10/misc.c:get_libexecdir.
438 (gnupg_datadir): New.
441 * http.c (connect_server) [W32]: Do not call init_sockets if
442 HTTP_NO_WSASTARTUP is defined.
446 * estream.c (es_init_do): Init stream lock here because we can't
447 use a static initialization with W32pth.
449 2007-06-11 Werner Koch <wk@g10code.com>
451 * Makefile.am (t_common_ldadd): Use libcommonstd macro.
453 2007-06-06 Werner Koch <wk@g10code.com>
455 * Makefile.am: Include am/cmacros.am.
457 * sysutils.h [W32]: Remove prototypes for the registry access.
458 * w32reg.c: Move to ../jnlib/w32-reg.c.
460 * i18n.c (i18n_init): New.
462 * simple-gettext.c: Remove.
464 * iobuf.c (iobuf_get_filelength): Rename SIZE to EXSIZE to silent
467 2007-06-04 Werner Koch <wk@g10code.com>
469 * http.c [W32]: Include unistd.h also in this case.
470 (write_server) [W32]: Fixed error code.
471 (init_sockets): Fixed syntax error.
472 (cookie_close): Replace close by sock_close macro.
474 * estream.c [w32]: Do not init Mutex.
476 * Makefile.am (common_sources) [USE_SNS_SRV]: Build srv.c only
479 * ttyio.c (init_ttyfp) [W32]: Do not use TTYFP.
481 * util.h: Include ../jnlib/dynload.h.
483 * dynload.h: Move to ../jnlib.
485 2007-05-30 Werner Koch <wk@g10code.com>
487 * estream.c (MEM_FREE, MEM_ALLOC, MEM_REALLOC): Prefix with ES_ as
488 windows.h also has such definitions,
490 2007-05-15 Werner Koch <wk@g10code.com>
492 * util.h: Do not include gnulib's vasprintf. Redefine asprintf
495 * xasprintf.c (xasprintf, xtryasprintf): Use estream_vasprintf.
497 * estream-printf.h, estream-printf.c: New. Taken from current
499 * Makefile.am (common_sources): Add them.
501 2007-05-14 Werner Koch <wk@g10code.com>
503 * sexp-parse.h (smklen): New.
504 * sexputil.c: Include sexp-parse.h.
505 (make_simple_sexp_from_hexstr): Replace sprintf by smklen.
507 2007-05-07 Werner Koch <wk@g10code.com>
509 * signal.c (got_fatal_signal): Protect SIG from being clobbered by
510 a faulty signal implementaion. Suggested by James Juran.
512 2007-04-25 Werner Koch <wk@g10code.com>
514 * i18n.h (ngettext): New.
515 * simple-gettext.c (ngettext): New.
517 2007-04-20 Werner Koch <wk@g10code.com>
519 * miscellaneous.c (my_gcry_logger, my_gcry_outofcore_handler):
520 Moved from gpg-agent to here.
521 (my_gcry_fatalerror_handler): new.
522 (setup_libgcrypt_logging): New.
524 2007-03-19 Werner Koch <wk@g10code.com>
526 * miscellaneous.c (print_hexstring): New.
527 * estream.c (es_fprintf_unlocked): New.
528 (es_write_sanitized): New.
529 (es_write_hexstring): New.
530 (es_write_sanitized_utf8_buffer) [GNUPG_MAJOR_VERSION]: New.
532 2007-03-09 David Shaw <dshaw@jabberwocky.com>
534 From STABLE-BRANCH-1-4
536 * http.c (do_parse_uri): Remove the hkp port 11371 detection. We
537 implement hkp in the keyserver handler, and the support here makes
538 it appear like a bad hkp request actually succeeded.
540 2007-01-31 Werner Koch <wk@g10code.com>
542 * Makefile.am (t_common_ldadd): Add LIBINCONV and LIBINTL.
544 2007-01-25 Werner Koch <wk@g10code.com>
546 * simple-pwquery.c (simple_pwquery): New arg OPT_CHECK.
548 2006-12-13 David Shaw <dshaw@jabberwocky.com>
550 * Makefile.am (AM_CPPFLAGS): Include intl/ so we can reference the
553 2006-11-23 Werner Koch <wk@g10code.com>
555 * http.c: Include i18n.h
557 2006-11-21 Werner Koch <wk@g10code.com>
559 * estream.c: Remove explicit Pth soft mapping diabling becuase it
560 is now done in config.h.
562 2006-11-15 Werner Koch <wk@g10code.com>
564 * estream.c: Disabled Pth soft mapping.
565 (my_funopen_hook_ret_t): New.
566 (print_fun_writer): Use it here.
568 * iobuf.c (fd_cache_close): Use %d instead of %p for debug output.
570 2006-11-03 Werner Koch <wk@g10code.com>
572 * Makefile.am (t_convert_DEPENDENCIES): Add libcommon. From
575 2006-10-24 Marcus Brinkmann <marcus@g10code.de>
577 * Makefile.am (libcommon_a_CFLAGS): Add $(LIBASSUAN_CFLAGS).
578 (libsimple_pwquery_a_CFLAGS): New variable.
580 2006-10-20 Werner Koch <wk@g10code.com>
582 * convert.c (hex2bin): New.
584 2006-10-17 Werner Koch <wk@g10code.com>
586 * estream.c (struct estream_internal, es_initialize)
587 (es_deinitialize, print_fun_writer, es_print): New and modified
588 functions to avoid tempfiles for printf style printing.
590 * Makefile.am (libcommonpth_a_SOURCES): New. We now build a secon
591 version of the library with explicit Pth support.
592 * exechelp.c, estream.c: Make use of WITHOUT_GNU_PTH.
594 2006-10-08 Werner Koch <wk@g10code.com>
596 * gpgrlhelp.c: Trun all functions into dummies if readline is not
599 2006-10-06 Werner Koch <wk@g10code.com>
601 * Makefile.am (AM_CFLAGS): Use PTH version of libassuan.
603 * util.h (GNUPG_GCC_A_SENTINEL): Defined for gcc >= 4.
605 2006-10-04 David Shaw <dshaw@jabberwocky.com>
607 * gpgrlhelp.c: readline requires stdio.h.
609 2006-10-04 Werner Koch <wk@g10code.com>
611 * membuf.c (init_membuf_secure): New.
612 (put_membuf): Make sure that ERRNO is set even if the underlying
613 malloc code does not work properly.
614 (get_membuf): Set ERRNO on error.
615 (get_membuf): Allow to pass LEN as NULL.
617 2006-10-02 Werner Koch <wk@g10code.com>
619 * iobuf.c (iobuf_unread): Removed. This code is not required.
620 Also removed the entire unget buffer stuff.
622 2006-09-27 Werner Koch <wk@g10code.com>
624 * util.h: Do not include strsep.h and strpbrk.h.
625 (isascii): Removed as it is now in jnlib.
627 * iobuf.c (pop_filter, underflow, iobuf_close): Free the unget
630 2006-09-27 Florian Weimer <fweimer@bfk.de> (wk)
632 * iobuf.c (iobuf_unread): New.
634 2006-09-22 Werner Koch <wk@g10code.com>
636 * i18n.h: Changed license to an all permissive one.
638 * ttyio.c (tty_get): We need to use readline too. Added two more
641 2006-09-21 Werner Koch <wk@g10code.com>
643 * ttyio.c (tty_private_set_rl_hooks): New.
644 (tty_enable_completion, tty_disable_completion): Use a hook to
645 enable readline support. Now always available.
646 (tty_cleanup_rl_after_signal): New.
648 * ttyio.h: Removed readline specific stuff. Included util.h.
649 * common-defs.h: New.
651 2006-09-15 Werner Koch <wk@g10code.com>
655 (bin2hex, bin2hexcolon, do_binhex): New.
658 2006-09-14 Werner Koch <wk@g10code.com>
660 * util.h (out_of_core): Use new gpg_error_from_syserror function.
662 * http.c (init_sockets): Changed it to require 2.2 unless it is
663 build within gnupg 1 where we require 1.1 (and not anymore allow
666 2006-09-07 Werner Koch <wk@g10code.com>
668 * exechelp.c (gnupg_spawn_process): Factor out post fork code to ..
669 (do_exec): .. new function. Allow passing of -1 for the fds.
670 (gnupg_spawn_process): Terminate gcrypt's secure memory in the child.
671 (gnupg_spawn_process_detached): New.
673 2006-09-06 Werner Koch <wk@g10code.com>
675 * maperror.c: Removed.
677 * util.h (out_of_core): New.
679 2006-09-04 Werner Koch <wk@g10code.com>
681 * http.c (http_get_header): New.
682 (capitalize_header_name, store_header): New.
683 (parse_response): Store headers away.
684 (send_request): Return GPG_ERR_NOT_FOUND if connect_server failed.
685 * http.h: New flag HTTP_FLAG_NEED_HEADER.
687 2006-08-21 Werner Koch <wk@g10code.com>
689 * Makefile.am (libcommon_a_SOURCES): Added keyserver.h
691 * openpgpdefs.h: New. Stripped from ..g10/packet.h.
693 2006-08-16 Werner Koch <wk@g10code.com>
695 * keyserver.h: Moved from ../include to here.
697 * http.c: Include srv.h.
699 * srv.c, srv.h: New. Taken from GnuPG 1.4
701 2006-08-14 Werner Koch <wk@g10code.com>
703 * http.h (struct http_context_s): Moved to implementation.
704 * http.c (http_open): Changed call to return a context.
705 (http_open_document): Ditto.
706 (http_get_read_ptr, http_get_read_ptr, http_get_status_code): New.
707 (do_parse_uri): Replaced strlwr by straight code to ease
708 standalone use of this file.
709 (http_wait_response): Removed arg STATUS_CODE as it is available
710 through an accessor function. Adjusted caller.
711 (http_escape_string): New.
713 * estream.c (es_read_line): Renamed to ..
714 (doreadline): .. this. Changed all callers.
715 (es_read_line): New. This is theusual limited getline variabnt as
716 used at several places. Here taken and adjusted from xreadline.c
719 2006-08-11 Werner Koch <wk@g10code.com>
721 * http.c: Major internal changes to optionallly support GNUTLS and
723 (http_open): Move initialization of the stream ...
724 (send_request): .. here.
725 (http_register_tls_callback): New.
727 * estream.c (es_writen): Try to seek only is a seek function has
730 2006-08-09 Werner Koch <wk@g10code.com>
732 * http.c, http.h: New. Taken from gnupg 1.4.5, merged with
733 changes done for the Dirmngr project (by g10 Code) and cleaned up
735 (make_header_line): New. Change all caller to make user of the new
736 * Makefile.am (libcommon_a_SOURCES): Added http.c and http.h.
738 2006-05-23 Werner Koch <wk@g10code.com>
740 * gettime.c (isotimestamp): New.
742 * ttyio.c (tty_get_ttyname): Posixly correct usage of ctermid.
744 * dns-cert.c: New. Taken from 1.4.3's util/cert.c.
747 2006-05-22 Werner Koch <wk@g10code.com>
749 * pka.c: New. Taked from 1.4.3.
751 * Makefile.am: Added pka.
753 2006-05-19 Werner Koch <wk@g10code.com>
755 * yesno.c (answer_is_yes_no_default, answer_is_yes_no_quit):
757 (answer_is_okay_cancel): new. From 1.4.3.
759 * miscellaneous.c (match_multistr): New. Taken from 1.4.3.
761 * ttyio.c (tty_enable_completion, tty_disable_completion): New
763 * ttyio.h: Add prototypes and stubs.
765 2006-04-19 Werner Koch <wk@g10code.com>
767 * iobuf.c (iobuf_get_fd): New. Taken from 1.4.3.
768 (iobuf_is_pipe_filename): New.
769 (pop_filter): Made static.
770 (iobuf_skip_rest): New. Orginal patch by Florian
771 Weimer. Added new argument PARTIAL.
772 (block_filter): Remove the old gpg indeterminate length mode.
773 (block_filter): Properly handle a partial body stream
774 that ends with a 5-byte length that happens to be zero.
775 (iobuf_set_block_mode, iobuf_in_block_mode): Removed as
777 (iobuf_get_filelength): New arg OVERFLOW.
778 (iobuf_get_filelength) [W32]: Use GetFileSizeEx if available
779 * miscellaneous.c (is_file_compressed): Take care of OVERFLOW.
781 2006-04-18 Werner Koch <wk@g10code.com>
783 * homedir.c (w32_shgetfolderpath): New. Taken from gpg 1.4.3.
784 (default_homedir): Use it.
786 2005-10-08 Marcus Brinkmann <marcus@g10code.de>
788 * signal.c (get_signal_name): Check value of HAVE_DECL_SYS_SIGLIST
789 instead of just if it is defined.
791 2005-09-28 Marcus Brinkmann <marcus@g10code.de>
793 * Makefile.am (AM_CFLAGS): Add $(LIBASSUAN_CFLAGS).
795 2005-07-04 Marcus Brinkmann <marcus@g10code.de>
797 * simple-pwquery.h (simple_pwclear): New prototype.
798 * simple-pwquery.c (simple_pwclear): New function.
800 2005-06-15 Werner Koch <wk@g10code.com>
802 * miscellaneous.c (make_printable_string): Made P a void*.
804 * sexputil.c (keygrip_from_canon_sexp, cmp_simple_canon_sexp):
805 Fixed signed/unsigned pointer mismatch.
806 (make_simple_sexp_from_hexstr): Ditto. This is all too ugly; I
807 wonder why gcc-4's default is to warn about them and forcing us to
808 use cast the warning away.
809 * iobuf.c (block_filter): Ditto.
810 (iobuf_flush): Ditto.
811 (iobuf_read_line): Ditto.
812 (iobuf_read): Make BUFFER a void *.
813 (iobuf_write): Make BUFFER a const void *.
814 * ttyio.c (tty_print_utf8_string2): Ditto.
815 * estream.c (estream_cookie_mem): Make MEMORY unsigned char*.
816 (es_write): Make BUFFER a void *.
818 (es_func_fd_read, es_func_fd_write, es_func_mem_read)
819 (es_func_mem_write): Ditto.
820 (es_read, es_readn): Ditto.
821 (es_func_mem_write): Made MEMORY_NEW an unsigned char *.
822 * estream.h (es_cookie_read_function_t)
823 (es_cookie_write_function_t): Changed buffer arg to void*.
825 2005-06-03 Werner Koch <wk@g10code.com>
827 * estream.c: Use HAVE_CONFIG_H and not USE_CONFIG_H!
828 (es_func_fd_read, es_func_fd_write): Protect against EINTR.
830 2005-06-01 Werner Koch <wk@g10code.com>
832 * Makefile.am (AM_CPPFLAGS): Added.
834 * util.h: Add some includes for gnulib.
835 (ttyname, isascii): Define them inline.
836 * fseeko.c, ftello.c: Removed.
837 * strsep.c, mkdtemp.c: Removed.
838 * ttyname.c, isascii.c: Removed.
840 2005-05-31 Werner Koch <wk@g10code.com>
842 * dynload.h: s/__inline__/inline/.
844 2005-05-13 Werner Koch <wk@g10code.com>
846 * signal.c (got_fatal_signal): Print the signal number if we can't
848 (get_signal_name): Return NULL if no name is available. Fixed
849 conditional for sys_siglist to the correct one.
851 2005-04-17 Werner Koch <wk@g10code.com>
853 * sexputil.c (cmp_simple_canon_sexp): New.
854 (make_simple_sexp_from_hexstr): New.
856 2005-04-07 Werner Koch <wk@g10code.com>
860 2005-04-11 Marcus Brinkmann <marcus@g10code.de>
862 * simple-pwquery.c (simple_pwquery): Use spwq_secure_free.
864 2005-03-03 Werner Koch <wk@g10code.com>
866 * Makefile.am (AM_CFLAGS): Added PTH_CFLAGS. Noted by Kazu Yamamoto.
868 2005-02-25 Werner Koch <wk@g10code.com>
870 * xasprintf.c (xtryasprintf): New.
872 2005-01-26 Moritz Schulte <moritz@g10code.com>
874 * Makefile.am (libcommon_a_SOURCES): New source files: estream.c,
876 * estream.c, estream.h: New files.
878 2005-01-03 Werner Koch <wk@g10code.com>
880 * asshelp.c (send_pinentry_environment): Fixed changed from
881 2004-12-18; cut+paste error for lc-messages.
883 2004-12-21 Werner Koch <wk@g10code.com>
885 * simple-pwquery.c (agent_open) [W32]: Implement for W32.
886 (readline) [W32]: Use recv instead of read.
887 (writen) [W32]: Use send instead of write.
888 (my_stpcpy): Define a stpcpy replacement so that this file
889 continues to be self-contained.
890 (agent_send_all_options) [W32]: Don't call ttyname.
892 2004-12-21 Marcus Brinkmann <marcus@g10code.de>
894 * simple-pwquery.h (simple_query): Add prototype.
895 * simple-pwquery.c (simple_query): New function.
897 2004-12-21 Werner Koch <wk@g10code.com>
899 * signal.c (got_fatal_signal, got_usr_signal)
900 (got_fatal_signal) [DOSISH]: Don't build.
901 * simple-gettext.c: Include sysutils.h
903 * homedir.c: New. Use CSIDL_APPDATA for W32 as the default home
905 * Makefile.am (libcommon_a_SOURCES): Add it.
906 (EXTRA_DIST): Removed mkerror and mkerrtok.
908 2004-12-20 Werner Koch <wk@g10code.com>
910 * sysutils.h [W32]: Define sleep.
911 * util.h: Add prototype for mkdtemp.
913 * membuf.c (put_membuf): Wipe out buffer after a failed realloc.
915 2004-12-19 Werner Koch <wk@g10code.com>
917 * maperror.c (map_assuan_err_with_source): Oops, args were swapped.
919 2004-12-18 Werner Koch <wk@g10code.com>
921 * maperror.c (map_assuan_err): Renamed to ..
922 (map_assuan_err_with_source): .. this and add arg SOURCE.c
923 * asshelp.c (send_pinentry_environment, send_one_option): Add arg
926 2004-12-15 Werner Koch <wk@g10code.com>
928 * sysutils.h [W32]: Prototypes for registry functions.
929 * w32reg.c: Include sysutils.h
931 * simple-pwquery.c [W32]: Dummy code to allow a build.
933 * exechelp.c [W32]: Implemented for W32 .
937 * asshelp.c (send_one_option): New.
938 (send_pinentry_environment): Cleaned up and made sure that empty
941 2004-12-07 Werner Koch <wk@g10code.com>
943 * asshelp.c (send_pinentry_environment) [W32]: Do not use ttyname.
945 2004-12-06 Werner Koch <wk@g10code.com>
947 * exechelp.h, exechelp.c: New. Based on code from ../sm/import.c.
949 2004-12-03 Werner Koch <wk@g10code.com>
951 * strsep.c: Fixed copyright comments.
953 2004-11-26 Werner Koch <wk@g10code.com>
955 * simple-gettext.c: New taken from gnupg 1.3.x
957 * simple-pwquery.c [_WIN32]: Include winsock2.h.
958 (agent_open): Disable it until we have our AF_UNIX implementation
960 * fseeko.c, ftello.c: Include sys/types for the sake of W32.
962 2004-11-23 Werner Koch <wk@g10code.com>
964 * b64enc.c: Include stdio.h and string.h
966 2004-08-18 Werner Koch <wk@g10code.de>
968 * simple-pwquery.c (simple_pwquery): Handle gpg-error style return
971 2004-07-20 Werner Koch <wk@g10code.de>
973 * maperror.c: Removed header ksba.h. Not required anymore.
975 2004-06-14 Werner Koch <wk@gnupg.org>
977 * xreadline.c: New. Based on the iobuf_read_line function.
979 2004-05-12 Werner Koch <wk@gnupg.org>
981 * util.h (xtrycalloc_secure,xtrymalloc_secure): New.
983 2004-05-11 Werner Koch <wk@gnupg.org>
985 * sysutils.c (disable_core_dumps): Only set the current limit.
986 (enable_core_dumps): New.
988 2004-04-13 Werner Koch <wk@gnupg.org>
990 * simple-pwquery.c (copy_and_escape): Relaxed quoting.
992 2004-04-05 Werner Koch <wk@gnupg.org>
994 * errors.h (STATUS_NEWSIG): New.
996 2004-03-11 Werner Koch <wk@gnupg.org>
998 * dynload.h [__MINGW32__]: Define RTLD_LAZY.
1000 2004-03-09 Werner Koch <wk@gnupg.org>
1002 * maperror.c (map_assuan_err): Map the Locale_Problem item.
1004 2004-03-03 Werner Koch <wk@gnupg.org>
1006 * asshelp.c, asshelp.h: New.
1007 (send_pinentry_environment): New. Code taken from ../sm/call-agent.c.
1009 2004-02-19 Werner Koch <wk@gnupg.org>
1011 * simple-pwquery.c (agent_open): Don't mangle INFOSTR.
1013 2004-02-17 Werner Koch <wk@gnupg.org>
1015 * simple-pwquery.c (agent_open): Ignore an empty GPG_AGENT_INFO.
1017 * errors.h: Added STATUS_IMPORT_OK.
1019 2004-02-10 Werner Koch <wk@gnupg.org>
1021 * b64enc.c: New. Based on code from ../sm/base64.c.
1023 2004-01-30 Marcus Brinkmann <marcus@g10code.de>
1025 * Makefile.am (libcommon_a_SOURCES): Add xasprintf.c.
1026 * miscellaneous.c (xasprintf): Moved to ...
1027 * xasprintf (xasprintf): ... here. New file.
1028 This allows to use xasprintf without sucking in gpg-error.
1030 2004-01-27 Werner Koch <wk@gnupg.org>
1032 * sexp-parse.h: New; moved from../agent.
1034 * util.h (xtoi_4): New.
1036 2003-12-23 Werner Koch <wk@gnupg.org>
1038 * maperror.c (map_assuan_err): Prepared for a new error code.
1040 2003-12-17 Werner Koch <wk@gnupg.org>
1042 * gettime.c (asctimestamp): Add a note on a non-avoidable gcc warning.
1044 * util.h [!HAVE_VASPRINTF]: Add printf format attribute to the
1045 replacement function.
1047 * miscellaneous.c (xasprintf): New.
1049 2003-11-14 Werner Koch <wk@gnupg.org>
1051 * mkdtemp.c (mkdtemp): Use gcry_create_nonce.
1053 * cryptmiss.c: Removed.
1055 2003-11-13 Werner Koch <wk@gnupg.org>
1057 * util.h (vasprintf): Also fixed the prototype.
1059 * vasprintf.c (vasprintf): ARGS should not be a pointer. Fixed
1060 segv on Solaris. Reported by Andrew J. Schorr.
1062 2003-11-12 Werner Koch <wk@gnupg.org>
1064 * maperror.c (map_ksba_err, map_gcry_err, map_kbx_err): Removed.
1066 2003-10-31 Werner Koch <wk@gnupg.org>
1068 * util.h (gnupg_isotime_t): New.
1069 (gnupg_copy_time): New.
1071 * gettime.c (gnupg_get_isotime): New.
1073 2003-09-23 Werner Koch <wk@gnupg.org>
1075 * iobuf.c (check_special_filename): Replaced is isdigit by digitp
1076 to avoid passing negative values and potential locale problems.
1077 Problem noted by Christian Biere.
1079 * util.h (ascii_isspace): New.
1081 2003-09-18 Werner Koch <wk@gnupg.org>
1083 * ttyio.c (tty_fprintf): New.
1084 (tty_print_string, tty_print_utf8_string2)
1085 (tty_print_utf8_string): Made P argument const byte*.
1087 2003-08-20 Marcus Brinkmann <marcus@g10code.de>
1089 * maperror.c (map_ksba_err): Map -1. Use gpg_err_make to set
1092 2003-08-14 Timo Schulz <twoaday@freakmail.de>
1094 * dynload.h. New. W32 wrapper around the dynload mechanism.
1096 2003-07-15 Werner Koch <wk@gnupg.org>
1098 * simple-pwquery.c, simple-pwquery.h: New; moved from ../agent.
1099 * Makefile.am (libsimple_pwquery_a_LIBADD): New.
1101 2003-06-25 Werner Koch <wk@gnupg.org>
1103 * maperror.c (map_to_assuan_status): Directly map 0 to 0.
1105 2003-06-17 Werner Koch <wk@gnupg.org>
1107 * gettime.c (scan_isodatestr,add_days_to_timestamp,strtimevalue)
1108 (strtimestamp,asctimestamp): New. Code taken from gnupg 1.3.2
1111 * yesno.c: New. Code taken from gnupg 1.3.2 mischelp.c
1113 * miscellaneous.c: New.
1115 * util.h: Include utf8conf.h
1117 2003-06-16 Werner Koch <wk@gnupg.org>
1119 * gettime.c (make_timestamp): New.
1121 * ttyio.c: New. Taken from gnupg 1.2.
1122 * ttyio.h: Move from ../include.
1124 2003-06-13 Werner Koch <wk@gnupg.org>
1126 * util.h (seterr): Removed macro.
1127 (xmalloc_secure,xcalloc_secure): New.
1129 2003-06-11 Werner Koch <wk@gnupg.org>
1131 * iobuf.c (iobuf_writebyte,iobuf_write): Return error code from
1133 (iobuf_writestr): Ditto.
1135 2003-06-10 Werner Koch <wk@gnupg.org>
1137 * iobuf.c, iobuf.h: New. Taken from current gnupg 1.3 CVS. Run
1138 indent on it and adjusted error handling to libgpg-error style.
1139 Replaced IOBUF by iobuf_t. Renamed malloc functions.
1141 2003-06-04 Werner Koch <wk@gnupg.org>
1143 * errors.h: Removed all error codes. We keep the status codes for
1145 * Makefile.am: Do not create errors.c anymore; remove it from the
1148 * maperror.c: Don't include error.h. Change all error codes to
1150 (map_assuan_err): Changed to new Assuan error code convention.
1151 (map_to_assuan_status): Likewise.
1152 (map_gcry_err,map_kbx_err): Not needed. For now dummy functions.
1154 * membuf.c, membuf.h: New. Code taken from ../sm/call-agent.h.
1155 * Makefile.am: Added above.
1157 2003-04-29 Werner Koch <wk@gnupg.org>
1159 * util.h (fopencokokie): Removed prototype and struct.
1161 * fopencookie.c: Removed.
1163 * maperror.c: Use system assuan.h
1165 2002-10-31 Neal H. Walfield <neal@g10code.de>
1167 * isascii.c: New file.
1168 * putc_unlocked.c: Likewise.
1170 2002-10-28 Neal H. Walfield <neal@g10code.de>
1172 * signal.c (caught_fatal_sig): Remove superfluous zero
1174 (caught_sigusr1): Likewise.
1176 2002-09-04 Neal H. Walfield <neal@g10code.de>
1178 * vasprintf.c (vasprintf) [va_copy]: Use va_copy.
1179 [!va_copy && __va_copy]: Use __va_copy.
1180 [!va_copy && !__va_copy]: Only now fall back to using memcpy.
1182 2002-08-21 Werner Koch <wk@gnupg.org>
1184 * errors.h: Added STATUS_IMPORT_PROBLEM.
1186 2002-08-20 Werner Koch <wk@gnupg.org>
1188 * vasprintf.c: Hack to handle NULL for %s.
1190 2002-08-09 Werner Koch <wk@gnupg.org>
1192 * signal.c: New. Taken from GnuPG 1.1.91.
1194 2002-07-23 Werner Koch <wk@gnupg.org>
1196 * util.h (_IO_cookie_io_functions_t): Fixed typo. Noted by
1199 2002-07-22 Werner Koch <wk@gnupg.org>
1201 * fseeko.c, ftello.c: New.
1203 2002-06-28 Werner Koch <wk@gnupg.org>
1205 * maperror.c (map_to_assuan_status): Map more errorcodes to Bad
1208 2002-06-26 Werner Koch <wk@gnupg.org>
1210 * maperror.c (map_to_assuan_status): Map EOF to No_Data_Available.
1212 2002-06-10 Werner Koch <wk@gnupg.org>
1214 * errors.h (gnupg_error_token): Add new prototype.
1215 (STATUS_ERROR): New.
1218 * Makefile.am: Use it to create the new error token function.
1220 2002-06-04 Werner Koch <wk@gnupg.org>
1222 * maperror.c (map_to_assuan_status): Map Bad_CA_Certificate.
1224 2002-05-23 Werner Koch <wk@gnupg.org>
1226 * no-pth.c, Makefile.am: Removed.
1228 2002-05-22 Werner Koch <wk@gnupg.org>
1230 * mkdtemp.c: Replaced byte by unsigned char because it is no longer
1231 defined in gcrypt.h.
1233 2002-05-21 Werner Koch <wk@gnupg.org>
1235 * maperror.c (map_gcry_err): Add libgcrypt's new S-expression errors.
1236 (map_ksba_err): Add a few mappings.
1238 2002-05-14 Werner Koch <wk@gnupg.org>
1242 2002-05-03 Werner Koch <wk@gnupg.org>
1244 * errors.h: Added STARUS_EXPSIG and STATUS_EXPKEYSIG.
1246 2002-04-15 Werner Koch <wk@gnupg.org>
1250 2002-02-14 Werner Koch <wk@gnupg.org>
1252 * maperror.c: Add more assuan<->gnupg mappings.
1254 2002-02-12 Werner Koch <wk@gnupg.org>
1256 * fopencookie.c: Dummy function.
1258 * vasprintf.c: New. Taken from binutils-2.9.1 and dropped all non
1259 ANSI-C stuff. Merged with asprintf version.
1263 2002-01-23 Werner Koch <wk@gnupg.org>
1265 * mkdtemp.c: Copied from gnupg-1.0.6c and changed to use libgcrypt.
1267 2002-01-19 Werner Koch <wk@gnupg.org>
1269 * sysutils.c: New. This is the misc.c file from gnupg 1.0.6 with
1270 the OpenPGP stuff removed.
1273 2002-01-15 Werner Koch <wk@gnupg.org>
1275 * maperror.c: Add mapping for Not_Trusted.
1277 2002-01-11 Werner Koch <wk@gnupg.org>
1279 * maperror.c (map_assuan_err): Codes for CRL
1281 2002-01-08 Werner Koch <wk@gnupg.org>
1283 * util.h (spacep): New.
1285 2002-01-02 Werner Koch <wk@gnupg.org>
1287 * maperror.c (map_to_assuan_status): New. Merged from ../agent
1290 2001-12-20 Werner Koch <wk@gnupg.org>
1292 * maperror.c (map_gcry_err): Add some mappings.
1294 2001-12-18 Werner Koch <wk@gnupg.org>
1296 * Makefile.am (AM_CPPFLAGS): Include flags for gcrypt and ksba
1298 2001-12-14 Werner Koch <wk@gnupg.org>
1300 * util.h (digitp, hexdigitp): New ctype like macros.
1301 (atoi_1,atoi_2,atoi_4,xtoi_1,xtoi_2): New.
1304 Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007,
1305 2008 Free Software Foundation, Inc.
1307 This file is free software; as a special exception the author gives
1308 unlimited permission to copy and/or distribute it, with or without
1309 modifications, as long as this notice is preserved.
1311 This file is distributed in the hope that it will be useful, but
1312 WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
1313 implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.