1 2008-12-05 Werner Koch <wk@g10code.com>
3 * percent.c, t-percent.c: New.
5 * exechelp.c (gnupg_spawn_process, gnupg_spawn_process_fd)
6 (gnupg_spawn_process_detached) [W32]: Remove debug output.
8 2008-11-20 Werner Koch <wk@g10code.com>
10 * audit.c (writeout_li): Translate OKTEXT.
12 2008-11-04 Werner Koch <wk@g10code.com>
14 * i18n.c (i18n_init) [USE_SIMPLE_GETTEXT]: Adjust for changed
16 * homedir.c (gnupg_localedir): New.
18 2008-10-20 Werner Koch <wk@g10code.com>
20 * http.c (http_register_tls_callback) [!HTTP_USE_GNUTLS]: Mark
22 * localename.c (do_nl_locale_name): Ditto.
23 * audit.c (event2str): Silent gcc warning.
24 * sysutils.c (translate_sys2libc_fd): Mark unused arg.
25 (translate_sys2libc_fd_int): Ditto.
26 * iobuf.c (translate_file_handle): Ditto.
27 * asshelp.c (send_one_option): Ditto.
28 * exechelp.c (gnupg_spawn_process): Ditto.
29 * signal.c (got_usr_signal): Ditto
30 * estream.c (es_func_fd_create) [!W32]: Ditto.
31 (es_func_fp_create) [!W32]: Ditto.
32 (es_write_hexstring): Ditto.
33 (dummy_mutex_call_void, dummy_mutex_call_int) [HAVE_PTH]: New.
34 (ESTREAM_MUTEX_LOCK, ESTREAM_MUTEX_UNLOCK, ESTREAM_MUTEX_TRYLOCK)
35 (ESTREAM_MUTEX_INITIALIZE) [HAVE_PTH]: Use dummy calls so to mark
38 2008-10-19 Werner Koch <wk@g10code.com>
40 * estream-printf.c (estream_vsnprintf): Fix return value.
41 (check_snprintf): Add a new test.
42 (one_test) [W32]: Disable test.
44 2008-10-17 Werner Koch <wk@g10code.com>
46 * util.h (snprintf) [W32]: Redefine to estream_snprintf.
48 2008-09-03 Werner Koch <wk@g10code.com>
50 * convert.c (hex2str): New.
52 * t-convert.c (test_hex2str): New.
54 2008-08-19 Werner Koch <wk@g10code.com>
56 * iobuf.c: Avoid passing a NULL (iobuf_t)->desc to the log
57 function. Should in general never be NULL, but well. Reported by
60 2008-06-26 Werner Koch <wk@g10code.com>
62 * estream.c (es_write_sanitized): Loose check for control
63 characters to better cope with utf-8. The range 0x80..0x9f is
64 nowadays not anymore accidently used for control charaters.
66 2008-06-25 Marcus Brinkmann <marcus@g10code.de>
68 Revert last three changes related to handle translation.
70 (FD_TRANSLATE_MAX, fd_translate, fd_translate_len)
71 (translate_table_init, translate_table_lookup): Removed.
72 * iobuf.c (check_special_filename): Do not use
73 translate_table_lookup.
74 * sysutils.h (translate_table_init, translate_table_lookup):
77 2008-06-19 Werner Koch <wk@g10code.com>
79 * sysutils.c: Remove <ctype.h>.
80 (fd_translate_max): Use macro for the size.
81 (translate_table_init): Protect read against EINTR and replace
84 2008-06-18 Marcus Brinkmann <marcus@g10code.de>
86 * sysutils.c (TRANS_MAX): Bump up to 350 to be on the safe side.
88 * sysutils.h (translate_table_init, translate_table_lookup): New
90 * sysutils.c: Include <ctype.h>.
91 (FD_TRANSLATE_MAX): New macro.
92 (fd_translate, fd_translate_len): New static variables.
93 (translate_table_init, translate_table_lookup): New functions.
94 (translate_sys2libc_fd_int): Translate file descriptor.
95 * iobuf.c (check_special_filename): Translate handle values from
98 2008-06-16 Werner Koch <wk@g10code.com>
100 * homedir.c (w32_commondir): New.
101 (gnupg_sysconfdir): Use it.
103 2008-06-09 Werner Koch <wk@g10code.com>
107 2008-06-05 Werner Koch <wk@g10code.com>
109 * util.h (gnupg_copy_time): Replace strcpy by memcpy.
111 2008-05-26 Werner Koch <wk@g10code.com>
113 * asshelp.c (send_one_option, send_pinentry_environment): use
114 xfree and xtrystrdup.
116 * i18n.c (i18n_switchto_utf8) [USE_SIMPLE_GETTEXT]: Return NULL.
118 * homedir.c (gnupg_module_name): Add
119 GNUPG_MODULE_NAME_CONNECT_AGENT and GNUPG_MODULE_NAME_GPGCONF.
121 2008-04-21 Werner Koch <wk@g10code.com>
123 * http.c (http_wait_response) [W32]: Use DuplicateHandle because
125 (cookie_read) [W32]: Use recv in place of read.
127 2008-04-08 Werner Koch <wk@g10code.com>
129 * i18n.c (i18n_switchto_utf8, i18n_switchback)
130 [USE_SIMPLE_GETTEXT]: Implement.
132 2008-04-07 Werner Koch <wk@g10code.com>
134 * b64enc.c (b64enc_start): Detect PGP mode.
135 (b64enc_finish): Write PGP CRC.
136 * util.h (struct b64state): Add field CRC.
139 * pka.c (get_pka_info): Use xtrymalloc and check result.
141 2008-03-25 Werner Koch <wk@g10code.com>
143 * localename.c: Strip all W32 code. Include w32help.h.
144 (gnupg_messages_locale_name) [W32]: Use the gettext_localename.
146 2008-03-17 Werner Koch <wk@g10code.com>
148 * iobuf.c (IOBUF_BUFFER_SIZE): Actually use this macro.
150 * simple-pwquery.c (agent_send_all_options): Fix last change.
152 2008-03-06 Werner Koch <wk@g10code.com>
154 * simple-pwquery.c (agent_send_all_options): Add support for
155 XAUTHORITY and PINENTRY_USER_DATA.
157 2008-02-15 Marcus Brinkmann <marcus@g10code.de>
159 * exechelp.c (gnupg_spawn_process_fd): Add flag DETACHED_PROCESS
160 unconditionally (required for all callers at the moment).
162 2008-02-14 Werner Koch <wk@g10code.com>
164 * sysutils.c (gnupg_allow_set_foregound_window): New.
165 (WINVER) [W32]: Define.
167 2008-01-31 Werner Koch <wk@g10code.com>
169 * audit.c (audit_print_result): Make sure that the output is
172 2008-01-27 Werner Koch <wk@g10code.com>
174 * exechelp.c (gnupg_spawn_process): Add arg FLAGS and changed all
175 callers to pass 0 for it.
177 2007-12-13 Werner Koch <wk@g10code.com>
179 * sexputil.c (hash_algo_from_sigval): New.
181 * Makefile.am (module_tests): Add it.
183 2007-12-11 Werner Koch <wk@g10code.com>
185 * asshelp.c (send_pinentry_environment): Allow using of old
186 gpg-agents not capabale of the xauthority and pinentry_user_data
189 2007-12-04 Werner Koch <wk@g10code.com>
191 * Makefile.am (t_helpfile_LDADD, module_maint_tests): New.
194 * membuf.h (is_membuf_ready, MEMBUF_ZERO): New.
195 * localename.c: New. Taken from gettext with modifications as done
196 for GpgOL. Export one new function.
197 * util.h (gnupg_messages_locale_name, gnupg_get_help_string): Added.
199 * sysutils.c (gnupg_reopen_std): New. Taken from ../g10/gpg.c.
201 2007-11-27 Werner Koch <wk@g10code.com>
203 * Makefile.am (CLEANFILES): New.
205 * homedir.c (dirmngr_socket_name): Use CSIDL_WINDOWS.
207 2007-11-15 Werner Koch <wk@g10code.com>
209 * asshelp.c (send_pinentry_environment): Add args XAUTHORITY and
211 (start_new_gpg_agent): Ditto.
213 2007-11-07 Werner Koch <wk@g10code.com>
218 2007-11-05 Werner Koch <wk@g10code.com>
220 * audit.c, audit.h: New.
221 * Makefile.am: Add rules to build audit-events.h.
223 * mkstrtable.awk: New. Taken from libgpg-error.
225 2007-10-19 Werner Koch <wk@g10code.com>
227 * i18n.c (i18n_switchto_utf8, i18n_switchback): New.
229 2007-10-01 Werner Koch <wk@g10code.com>
231 * sysutils.h (FD2INT, INT2FD): New.
233 2007-09-21 Werner Koch <wk@g10code.com>
235 * homedir.c (default_homedir): Make registry work. Reported by
238 2007-08-29 Werner Koch <wk@g10code.com>
240 * exechelp.c (gnupg_wait_process): Add arg EXITCODE. Changed all
242 (gnupg_create_inbound_pipe): New.
243 * util.h (GNUPG_MODULE_NAME_GPGSM, GNUPG_MODULE_NAME_GPG): New.
244 * homedir.c (gnupg_module_name): Add them
246 2007-08-28 Werner Koch <wk@g10code.com>
248 * gettime.c (check_isotime, add_isotime): New. Originally written
250 (add_days_to_isotime): New.
251 (date2jd, jd2date, days_per_month, days_per_year): New. Taken from
252 my ancient (1988) code used in Wedit (time2.c).
254 2007-08-27 Werner Koch <wk@g10code.com>
256 * util.h (GNUPG_MODULE_NAME_CHECK_PATTERN): New.
257 * homedir.c (gnupg_module_name): Add it.
258 * exechelp.c (w32_fd_or_null) [W32]: New.
259 (gnupg_spawn_process_fd): New.
260 (gnupg_wait_process) [W32]: Close the handle after if the process has
263 2007-08-22 Werner Koch <wk@g10code.com>
265 Updated estream from libestream.
267 * estream.c (mem_malloc, mem_realloc, mem_free): New. Use them
268 instead of the ES_MEM_foo.
269 * estream.c (estream_cookie_mem): Remove members DONT_FREE,
270 APPEND_ZERO, PTR and SIZE. Add MEMORY_LIMIT. Put GROW into a new
272 (es_func_mem_create): Remove APPEND_ZERO, DONT_FREE, PTR and
273 SIZE. Add MEMORY_LIMIT.
274 (es_func_mem_write, es_func_mem_seek, es_func_mem_destroy): Revamp.
275 (es_open_memstream): Change API to just take a memory limit and a
276 mode argument. Rename to ..
277 (es_fopenmem): .. this.
278 (HAVE_W32_SYSTEM) [_WIN32]: Define if not defined.
279 (tmpfd) [W32]: Implement directly using the W32 API.
280 (es_fgets): Rewrite without using doreadline.
282 2007-08-21 Werner Koch <wk@g10code.com>
284 * sysutils.c (gnupg_tmpfile): New.
286 * Makefile.am (module_tests): Add t-sysutils.
288 2007-08-20 Werner Koch <wk@g10code.com>
290 * exechelp.c [W32]: Redefine X_OK to F_OK.
292 2007-08-16 Werner Koch <wk@g10code.com>
294 * Makefile.am (t_convert_DEPENDENCIES): Remove
295 ($(PROGRAMS)): Remove.
296 (t_common_ldadd): Use libcommon.a and not the macro.
298 2007-08-14 Werner Koch <wk@g10code.com>
300 * homedir.c (dirmngr_socket_name): New.
302 2007-08-07 Werner Koch <wk@g10code.com>
304 * tlv.c, tlv.h: Move from ../scd/.
305 * tlv.c (parse_sexp, parse_ber_header): Add ERRSOURCE arg and prefix
307 * tlv.h: Use macro to convey ERRSOURCE.
309 2007-08-02 Werner Koch <wk@g10code.com>
311 * gc-opt-flags.h: New.
313 2007-08-01 Werner Koch <wk@g10code.com>
315 * estream-printf.c (read_dummy_value): Removed as it is useless now.
316 (read_values): Remove check on !vaargs which is not anymore needed
317 and anyway not portable. Reported by Peter O'Gorman.
319 2007-07-16 Werner Koch <wk@g10code.com>
321 * estream.c (es_func_file_create): Clear NO_CLOSE flag.
323 2007-07-12 Werner Koch <wk@g10code.com>
325 * sysutils.h (gnupg_fd_t): New.
326 * sysutils.c (translate_sys2libc_fd): Use that type instead of int.
327 (translate_sys2libc_fd_int): New.
329 2007-07-09 Werner Koch <wk@g10code.com>
331 * t-gettime.c (test_isotime2epoch): Use time_t and not u32.
333 2007-07-05 Werner Koch <wk@g10code.com>
336 * gettime.c (isotime2epoch, epoch2isotime): New.
338 2007-07-04 Werner Koch <wk@g10code.com>
340 * estream.c (es_init_do): Do not throw an error if pth has already
343 2007-06-26 Werner Koch <wk@g10code.com>
345 * Makefile.am ($(PROGRAMS)): New.
347 * util.h (init_common_subsystems): Moved to ..
349 * util.h: Include init.h.
351 * homedir.c (standard_homedir): New.
352 (default_homedir) [W32]: Reimplemented in terms of
353 standard_homedir. Fixed memory leak.
355 2007-06-25 Werner Koch <wk@g10code.com>
357 * iobuf.c: Add more documentation and slighly restructured macro
358 defintion for better readability.
359 (FILEP_OR_FD): Rename to fp_or_fd_t.
360 (CLOSE_CACHE): Rename to close_cache_t.
362 * sysutils.c (translate_sys2libc_fd): New using the code from iobuf.c.
363 * iobuf.c: Include sysutils.h.
364 (iobuf_translate_file_handle): Remove.
365 (translate_file_handle): Use new function.
367 * estream-printf.c [TEST]: Header including fixes.
368 (do_format): Do not append a trailing Nul. This avoids spurious
369 Nuls in the es_printf output.
370 (estream_vsnprintf, estream_vasprintf): Take this in account.
372 * estream.h (struct es__stream): Change FLAGS to a bit structure.
373 (ES__FLAG_WRITING): Replace by a bit from FLAGS. * estream.c
374 (struct estream_internal): Rename FLAGS to MODEFLAGS so that they
375 are not confused with the estream flags.
376 (es_initialize, es_create): Add arg MODEFLAGS so that we can setup
377 the intial writemode. Changed all callers to pass them.
378 (es_convert_mode): Set O_BINARY.
379 (es_func_fd_create, es_func_fp_create, es_func_file_create) [W32]:
380 Call setmode if requested.
382 2007-06-24 Werner Koch <wk@g10code.com>
384 * estream.c (do_fpopen, es_fpopen, es_fpopen_nc): New.
385 (es_func_fp_create, es_func_fp_read, es_func_fp_write)
386 (es_func_fp_seek, es_func_fp_destroy): New.
388 2007-06-22 Werner Koch <wk@g10code.com>
390 * estream.c (es_fdopen): Factored code out to..
393 (estream_cookie_fd): Add field NO_CLOSE.
394 (es_func_fd_create): Add arg NO_CLOSE and changed all callers.
395 (es_func_fd_destroy): Handle the new flag.
397 * homedir.c (gnupg_libexecdir) [W32]: Factor code out to ..
398 (w32_rootdir): .. new.
399 (gnupg_sysconfdir, gnupg_libdir, gnupg_datadir) [W32]: Return
400 name based on w32_rootdir().
402 2007-06-21 Werner Koch <wk@g10code.com>
404 * membuf.h (get_membuf_len): New.
406 * membuf.c (init_membuf_secure): Really allocate in secure memory.
407 (put_membuf_str): New.
409 * ttyio.c (tty_getf): New.
411 * util.h (ctrl_t): Declare it here.
413 * asshelp.c (start_new_gpg_agent): New. Based on code from
416 2007-06-20 Werner Koch <wk@g10code.com>
418 * sysutils.c (gnupg_sleep): New.
419 * sysutils.h [W32]: Remove _sleep wrapper. Changed all callers to
422 * exechelp.c (build_w32_commandline_copy): New.
423 (build_w32_commandline): Factored some code out to new function
424 and correctly process a PGMNAME with spaces.
425 (gnupg_spawn_process_detached) [W32]: Implement.
427 2007-06-14 Werner Koch <wk@g10code.com>
429 * simple-pwquery.h (MAP_SPWQ_ERROR_IMPL): New.
430 (SPWQ_NO_PIN_ENTRY): New.
431 * simple-pwquery.c (simple_pw_set_socket): New.
432 (agent_open): Use it if GPG_AGENT_INFO is not set.
433 (simple_pwquery): Extended to allow returning of otehyr error codes.
435 * util.h (GNUPG_MODULE_NAME_AGENT, GNUPG_MODULE_NAME_PINENTRY)
436 (GNUPG_MODULE_NAME_SCDAEMON, GNUPG_MODULE_NAME_DIRMNGR)
437 (GNUPG_MODULE_NAME_PROTECT_TOOL): New.
438 * homedir.c (gnupg_module_name): New.
441 2007-06-12 Werner Koch <wk@g10code.com>
443 * homedir.c (gnupg_sysconfdir): New.
444 (gnupg_libexecdir): New. Taken from g10/misc.c:get_libexecdir.
445 (gnupg_datadir): New.
448 * http.c (connect_server) [W32]: Do not call init_sockets if
449 HTTP_NO_WSASTARTUP is defined.
453 * estream.c (es_init_do): Init stream lock here because we can't
454 use a static initialization with W32pth.
456 2007-06-11 Werner Koch <wk@g10code.com>
458 * Makefile.am (t_common_ldadd): Use libcommonstd macro.
460 2007-06-06 Werner Koch <wk@g10code.com>
462 * Makefile.am: Include am/cmacros.am.
464 * sysutils.h [W32]: Remove prototypes for the registry access.
465 * w32reg.c: Move to ../jnlib/w32-reg.c.
467 * i18n.c (i18n_init): New.
469 * simple-gettext.c: Remove.
471 * iobuf.c (iobuf_get_filelength): Rename SIZE to EXSIZE to silent
474 2007-06-04 Werner Koch <wk@g10code.com>
476 * http.c [W32]: Include unistd.h also in this case.
477 (write_server) [W32]: Fixed error code.
478 (init_sockets): Fixed syntax error.
479 (cookie_close): Replace close by sock_close macro.
481 * estream.c [w32]: Do not init Mutex.
483 * Makefile.am (common_sources) [USE_SNS_SRV]: Build srv.c only
486 * ttyio.c (init_ttyfp) [W32]: Do not use TTYFP.
488 * util.h: Include ../jnlib/dynload.h.
490 * dynload.h: Move to ../jnlib.
492 2007-05-30 Werner Koch <wk@g10code.com>
494 * estream.c (MEM_FREE, MEM_ALLOC, MEM_REALLOC): Prefix with ES_ as
495 windows.h also has such definitions,
497 2007-05-15 Werner Koch <wk@g10code.com>
499 * util.h: Do not include gnulib's vasprintf. Redefine asprintf
502 * xasprintf.c (xasprintf, xtryasprintf): Use estream_vasprintf.
504 * estream-printf.h, estream-printf.c: New. Taken from current
506 * Makefile.am (common_sources): Add them.
508 2007-05-14 Werner Koch <wk@g10code.com>
510 * sexp-parse.h (smklen): New.
511 * sexputil.c: Include sexp-parse.h.
512 (make_simple_sexp_from_hexstr): Replace sprintf by smklen.
514 2007-05-07 Werner Koch <wk@g10code.com>
516 * signal.c (got_fatal_signal): Protect SIG from being clobbered by
517 a faulty signal implementaion. Suggested by James Juran.
519 2007-04-25 Werner Koch <wk@g10code.com>
521 * i18n.h (ngettext): New.
522 * simple-gettext.c (ngettext): New.
524 2007-04-20 Werner Koch <wk@g10code.com>
526 * miscellaneous.c (my_gcry_logger, my_gcry_outofcore_handler):
527 Moved from gpg-agent to here.
528 (my_gcry_fatalerror_handler): new.
529 (setup_libgcrypt_logging): New.
531 2007-03-19 Werner Koch <wk@g10code.com>
533 * miscellaneous.c (print_hexstring): New.
534 * estream.c (es_fprintf_unlocked): New.
535 (es_write_sanitized): New.
536 (es_write_hexstring): New.
537 (es_write_sanitized_utf8_buffer) [GNUPG_MAJOR_VERSION]: New.
539 2007-03-09 David Shaw <dshaw@jabberwocky.com>
541 From STABLE-BRANCH-1-4
543 * http.c (do_parse_uri): Remove the hkp port 11371 detection. We
544 implement hkp in the keyserver handler, and the support here makes
545 it appear like a bad hkp request actually succeeded.
547 2007-01-31 Werner Koch <wk@g10code.com>
549 * Makefile.am (t_common_ldadd): Add LIBINCONV and LIBINTL.
551 2007-01-25 Werner Koch <wk@g10code.com>
553 * simple-pwquery.c (simple_pwquery): New arg OPT_CHECK.
555 2006-12-13 David Shaw <dshaw@jabberwocky.com>
557 * Makefile.am (AM_CPPFLAGS): Include intl/ so we can reference the
560 2006-11-23 Werner Koch <wk@g10code.com>
562 * http.c: Include i18n.h
564 2006-11-21 Werner Koch <wk@g10code.com>
566 * estream.c: Remove explicit Pth soft mapping diabling becuase it
567 is now done in config.h.
569 2006-11-15 Werner Koch <wk@g10code.com>
571 * estream.c: Disabled Pth soft mapping.
572 (my_funopen_hook_ret_t): New.
573 (print_fun_writer): Use it here.
575 * iobuf.c (fd_cache_close): Use %d instead of %p for debug output.
577 2006-11-03 Werner Koch <wk@g10code.com>
579 * Makefile.am (t_convert_DEPENDENCIES): Add libcommon. From
582 2006-10-24 Marcus Brinkmann <marcus@g10code.de>
584 * Makefile.am (libcommon_a_CFLAGS): Add $(LIBASSUAN_CFLAGS).
585 (libsimple_pwquery_a_CFLAGS): New variable.
587 2006-10-20 Werner Koch <wk@g10code.com>
589 * convert.c (hex2bin): New.
591 2006-10-17 Werner Koch <wk@g10code.com>
593 * estream.c (struct estream_internal, es_initialize)
594 (es_deinitialize, print_fun_writer, es_print): New and modified
595 functions to avoid tempfiles for printf style printing.
597 * Makefile.am (libcommonpth_a_SOURCES): New. We now build a secon
598 version of the library with explicit Pth support.
599 * exechelp.c, estream.c: Make use of WITHOUT_GNU_PTH.
601 2006-10-08 Werner Koch <wk@g10code.com>
603 * gpgrlhelp.c: Trun all functions into dummies if readline is not
606 2006-10-06 Werner Koch <wk@g10code.com>
608 * Makefile.am (AM_CFLAGS): Use PTH version of libassuan.
610 * util.h (GNUPG_GCC_A_SENTINEL): Defined for gcc >= 4.
612 2006-10-04 David Shaw <dshaw@jabberwocky.com>
614 * gpgrlhelp.c: readline requires stdio.h.
616 2006-10-04 Werner Koch <wk@g10code.com>
618 * membuf.c (init_membuf_secure): New.
619 (put_membuf): Make sure that ERRNO is set even if the underlying
620 malloc code does not work properly.
621 (get_membuf): Set ERRNO on error.
622 (get_membuf): Allow to pass LEN as NULL.
624 2006-10-02 Werner Koch <wk@g10code.com>
626 * iobuf.c (iobuf_unread): Removed. This code is not required.
627 Also removed the entire unget buffer stuff.
629 2006-09-27 Werner Koch <wk@g10code.com>
631 * util.h: Do not include strsep.h and strpbrk.h.
632 (isascii): Removed as it is now in jnlib.
634 * iobuf.c (pop_filter, underflow, iobuf_close): Free the unget
637 2006-09-27 Florian Weimer <fweimer@bfk.de> (wk)
639 * iobuf.c (iobuf_unread): New.
641 2006-09-22 Werner Koch <wk@g10code.com>
643 * i18n.h: Changed license to an all permissive one.
645 * ttyio.c (tty_get): We need to use readline too. Added two more
648 2006-09-21 Werner Koch <wk@g10code.com>
650 * ttyio.c (tty_private_set_rl_hooks): New.
651 (tty_enable_completion, tty_disable_completion): Use a hook to
652 enable readline support. Now always available.
653 (tty_cleanup_rl_after_signal): New.
655 * ttyio.h: Removed readline specific stuff. Included util.h.
656 * common-defs.h: New.
658 2006-09-15 Werner Koch <wk@g10code.com>
662 (bin2hex, bin2hexcolon, do_binhex): New.
665 2006-09-14 Werner Koch <wk@g10code.com>
667 * util.h (out_of_core): Use new gpg_error_from_syserror function.
669 * http.c (init_sockets): Changed it to require 2.2 unless it is
670 build within gnupg 1 where we require 1.1 (and not anymore allow
673 2006-09-07 Werner Koch <wk@g10code.com>
675 * exechelp.c (gnupg_spawn_process): Factor out post fork code to ..
676 (do_exec): .. new function. Allow passing of -1 for the fds.
677 (gnupg_spawn_process): Terminate gcrypt's secure memory in the child.
678 (gnupg_spawn_process_detached): New.
680 2006-09-06 Werner Koch <wk@g10code.com>
682 * maperror.c: Removed.
684 * util.h (out_of_core): New.
686 2006-09-04 Werner Koch <wk@g10code.com>
688 * http.c (http_get_header): New.
689 (capitalize_header_name, store_header): New.
690 (parse_response): Store headers away.
691 (send_request): Return GPG_ERR_NOT_FOUND if connect_server failed.
692 * http.h: New flag HTTP_FLAG_NEED_HEADER.
694 2006-08-21 Werner Koch <wk@g10code.com>
696 * Makefile.am (libcommon_a_SOURCES): Added keyserver.h
698 * openpgpdefs.h: New. Stripped from ..g10/packet.h.
700 2006-08-16 Werner Koch <wk@g10code.com>
702 * keyserver.h: Moved from ../include to here.
704 * http.c: Include srv.h.
706 * srv.c, srv.h: New. Taken from GnuPG 1.4
708 2006-08-14 Werner Koch <wk@g10code.com>
710 * http.h (struct http_context_s): Moved to implementation.
711 * http.c (http_open): Changed call to return a context.
712 (http_open_document): Ditto.
713 (http_get_read_ptr, http_get_read_ptr, http_get_status_code): New.
714 (do_parse_uri): Replaced strlwr by straight code to ease
715 standalone use of this file.
716 (http_wait_response): Removed arg STATUS_CODE as it is available
717 through an accessor function. Adjusted caller.
718 (http_escape_string): New.
720 * estream.c (es_read_line): Renamed to ..
721 (doreadline): .. this. Changed all callers.
722 (es_read_line): New. This is theusual limited getline variabnt as
723 used at several places. Here taken and adjusted from xreadline.c
726 2006-08-11 Werner Koch <wk@g10code.com>
728 * http.c: Major internal changes to optionallly support GNUTLS and
730 (http_open): Move initialization of the stream ...
731 (send_request): .. here.
732 (http_register_tls_callback): New.
734 * estream.c (es_writen): Try to seek only is a seek function has
737 2006-08-09 Werner Koch <wk@g10code.com>
739 * http.c, http.h: New. Taken from gnupg 1.4.5, merged with
740 changes done for the Dirmngr project (by g10 Code) and cleaned up
742 (make_header_line): New. Change all caller to make user of the new
743 * Makefile.am (libcommon_a_SOURCES): Added http.c and http.h.
745 2006-05-23 Werner Koch <wk@g10code.com>
747 * gettime.c (isotimestamp): New.
749 * ttyio.c (tty_get_ttyname): Posixly correct usage of ctermid.
751 * dns-cert.c: New. Taken from 1.4.3's util/cert.c.
754 2006-05-22 Werner Koch <wk@g10code.com>
756 * pka.c: New. Taked from 1.4.3.
758 * Makefile.am: Added pka.
760 2006-05-19 Werner Koch <wk@g10code.com>
762 * yesno.c (answer_is_yes_no_default, answer_is_yes_no_quit):
764 (answer_is_okay_cancel): new. From 1.4.3.
766 * miscellaneous.c (match_multistr): New. Taken from 1.4.3.
768 * ttyio.c (tty_enable_completion, tty_disable_completion): New
770 * ttyio.h: Add prototypes and stubs.
772 2006-04-19 Werner Koch <wk@g10code.com>
774 * iobuf.c (iobuf_get_fd): New. Taken from 1.4.3.
775 (iobuf_is_pipe_filename): New.
776 (pop_filter): Made static.
777 (iobuf_skip_rest): New. Orginal patch by Florian
778 Weimer. Added new argument PARTIAL.
779 (block_filter): Remove the old gpg indeterminate length mode.
780 (block_filter): Properly handle a partial body stream
781 that ends with a 5-byte length that happens to be zero.
782 (iobuf_set_block_mode, iobuf_in_block_mode): Removed as
784 (iobuf_get_filelength): New arg OVERFLOW.
785 (iobuf_get_filelength) [W32]: Use GetFileSizeEx if available
786 * miscellaneous.c (is_file_compressed): Take care of OVERFLOW.
788 2006-04-18 Werner Koch <wk@g10code.com>
790 * homedir.c (w32_shgetfolderpath): New. Taken from gpg 1.4.3.
791 (default_homedir): Use it.
793 2005-10-08 Marcus Brinkmann <marcus@g10code.de>
795 * signal.c (get_signal_name): Check value of HAVE_DECL_SYS_SIGLIST
796 instead of just if it is defined.
798 2005-09-28 Marcus Brinkmann <marcus@g10code.de>
800 * Makefile.am (AM_CFLAGS): Add $(LIBASSUAN_CFLAGS).
802 2005-07-04 Marcus Brinkmann <marcus@g10code.de>
804 * simple-pwquery.h (simple_pwclear): New prototype.
805 * simple-pwquery.c (simple_pwclear): New function.
807 2005-06-15 Werner Koch <wk@g10code.com>
809 * miscellaneous.c (make_printable_string): Made P a void*.
811 * sexputil.c (keygrip_from_canon_sexp, cmp_simple_canon_sexp):
812 Fixed signed/unsigned pointer mismatch.
813 (make_simple_sexp_from_hexstr): Ditto. This is all too ugly; I
814 wonder why gcc-4's default is to warn about them and forcing us to
815 use cast the warning away.
816 * iobuf.c (block_filter): Ditto.
817 (iobuf_flush): Ditto.
818 (iobuf_read_line): Ditto.
819 (iobuf_read): Make BUFFER a void *.
820 (iobuf_write): Make BUFFER a const void *.
821 * ttyio.c (tty_print_utf8_string2): Ditto.
822 * estream.c (estream_cookie_mem): Make MEMORY unsigned char*.
823 (es_write): Make BUFFER a void *.
825 (es_func_fd_read, es_func_fd_write, es_func_mem_read)
826 (es_func_mem_write): Ditto.
827 (es_read, es_readn): Ditto.
828 (es_func_mem_write): Made MEMORY_NEW an unsigned char *.
829 * estream.h (es_cookie_read_function_t)
830 (es_cookie_write_function_t): Changed buffer arg to void*.
832 2005-06-03 Werner Koch <wk@g10code.com>
834 * estream.c: Use HAVE_CONFIG_H and not USE_CONFIG_H!
835 (es_func_fd_read, es_func_fd_write): Protect against EINTR.
837 2005-06-01 Werner Koch <wk@g10code.com>
839 * Makefile.am (AM_CPPFLAGS): Added.
841 * util.h: Add some includes for gnulib.
842 (ttyname, isascii): Define them inline.
843 * fseeko.c, ftello.c: Removed.
844 * strsep.c, mkdtemp.c: Removed.
845 * ttyname.c, isascii.c: Removed.
847 2005-05-31 Werner Koch <wk@g10code.com>
849 * dynload.h: s/__inline__/inline/.
851 2005-05-13 Werner Koch <wk@g10code.com>
853 * signal.c (got_fatal_signal): Print the signal number if we can't
855 (get_signal_name): Return NULL if no name is available. Fixed
856 conditional for sys_siglist to the correct one.
858 2005-04-17 Werner Koch <wk@g10code.com>
860 * sexputil.c (cmp_simple_canon_sexp): New.
861 (make_simple_sexp_from_hexstr): New.
863 2005-04-07 Werner Koch <wk@g10code.com>
867 2005-04-11 Marcus Brinkmann <marcus@g10code.de>
869 * simple-pwquery.c (simple_pwquery): Use spwq_secure_free.
871 2005-03-03 Werner Koch <wk@g10code.com>
873 * Makefile.am (AM_CFLAGS): Added PTH_CFLAGS. Noted by Kazu Yamamoto.
875 2005-02-25 Werner Koch <wk@g10code.com>
877 * xasprintf.c (xtryasprintf): New.
879 2005-01-26 Moritz Schulte <moritz@g10code.com>
881 * Makefile.am (libcommon_a_SOURCES): New source files: estream.c,
883 * estream.c, estream.h: New files.
885 2005-01-03 Werner Koch <wk@g10code.com>
887 * asshelp.c (send_pinentry_environment): Fixed changed from
888 2004-12-18; cut+paste error for lc-messages.
890 2004-12-21 Werner Koch <wk@g10code.com>
892 * simple-pwquery.c (agent_open) [W32]: Implement for W32.
893 (readline) [W32]: Use recv instead of read.
894 (writen) [W32]: Use send instead of write.
895 (my_stpcpy): Define a stpcpy replacement so that this file
896 continues to be self-contained.
897 (agent_send_all_options) [W32]: Don't call ttyname.
899 2004-12-21 Marcus Brinkmann <marcus@g10code.de>
901 * simple-pwquery.h (simple_query): Add prototype.
902 * simple-pwquery.c (simple_query): New function.
904 2004-12-21 Werner Koch <wk@g10code.com>
906 * signal.c (got_fatal_signal, got_usr_signal)
907 (got_fatal_signal) [DOSISH]: Don't build.
908 * simple-gettext.c: Include sysutils.h
910 * homedir.c: New. Use CSIDL_APPDATA for W32 as the default home
912 * Makefile.am (libcommon_a_SOURCES): Add it.
913 (EXTRA_DIST): Removed mkerror and mkerrtok.
915 2004-12-20 Werner Koch <wk@g10code.com>
917 * sysutils.h [W32]: Define sleep.
918 * util.h: Add prototype for mkdtemp.
920 * membuf.c (put_membuf): Wipe out buffer after a failed realloc.
922 2004-12-19 Werner Koch <wk@g10code.com>
924 * maperror.c (map_assuan_err_with_source): Oops, args were swapped.
926 2004-12-18 Werner Koch <wk@g10code.com>
928 * maperror.c (map_assuan_err): Renamed to ..
929 (map_assuan_err_with_source): .. this and add arg SOURCE.c
930 * asshelp.c (send_pinentry_environment, send_one_option): Add arg
933 2004-12-15 Werner Koch <wk@g10code.com>
935 * sysutils.h [W32]: Prototypes for registry functions.
936 * w32reg.c: Include sysutils.h
938 * simple-pwquery.c [W32]: Dummy code to allow a build.
940 * exechelp.c [W32]: Implemented for W32 .
944 * asshelp.c (send_one_option): New.
945 (send_pinentry_environment): Cleaned up and made sure that empty
948 2004-12-07 Werner Koch <wk@g10code.com>
950 * asshelp.c (send_pinentry_environment) [W32]: Do not use ttyname.
952 2004-12-06 Werner Koch <wk@g10code.com>
954 * exechelp.h, exechelp.c: New. Based on code from ../sm/import.c.
956 2004-12-03 Werner Koch <wk@g10code.com>
958 * strsep.c: Fixed copyright comments.
960 2004-11-26 Werner Koch <wk@g10code.com>
962 * simple-gettext.c: New taken from gnupg 1.3.x
964 * simple-pwquery.c [_WIN32]: Include winsock2.h.
965 (agent_open): Disable it until we have our AF_UNIX implementation
967 * fseeko.c, ftello.c: Include sys/types for the sake of W32.
969 2004-11-23 Werner Koch <wk@g10code.com>
971 * b64enc.c: Include stdio.h and string.h
973 2004-08-18 Werner Koch <wk@g10code.de>
975 * simple-pwquery.c (simple_pwquery): Handle gpg-error style return
978 2004-07-20 Werner Koch <wk@g10code.de>
980 * maperror.c: Removed header ksba.h. Not required anymore.
982 2004-06-14 Werner Koch <wk@gnupg.org>
984 * xreadline.c: New. Based on the iobuf_read_line function.
986 2004-05-12 Werner Koch <wk@gnupg.org>
988 * util.h (xtrycalloc_secure,xtrymalloc_secure): New.
990 2004-05-11 Werner Koch <wk@gnupg.org>
992 * sysutils.c (disable_core_dumps): Only set the current limit.
993 (enable_core_dumps): New.
995 2004-04-13 Werner Koch <wk@gnupg.org>
997 * simple-pwquery.c (copy_and_escape): Relaxed quoting.
999 2004-04-05 Werner Koch <wk@gnupg.org>
1001 * errors.h (STATUS_NEWSIG): New.
1003 2004-03-11 Werner Koch <wk@gnupg.org>
1005 * dynload.h [__MINGW32__]: Define RTLD_LAZY.
1007 2004-03-09 Werner Koch <wk@gnupg.org>
1009 * maperror.c (map_assuan_err): Map the Locale_Problem item.
1011 2004-03-03 Werner Koch <wk@gnupg.org>
1013 * asshelp.c, asshelp.h: New.
1014 (send_pinentry_environment): New. Code taken from ../sm/call-agent.c.
1016 2004-02-19 Werner Koch <wk@gnupg.org>
1018 * simple-pwquery.c (agent_open): Don't mangle INFOSTR.
1020 2004-02-17 Werner Koch <wk@gnupg.org>
1022 * simple-pwquery.c (agent_open): Ignore an empty GPG_AGENT_INFO.
1024 * errors.h: Added STATUS_IMPORT_OK.
1026 2004-02-10 Werner Koch <wk@gnupg.org>
1028 * b64enc.c: New. Based on code from ../sm/base64.c.
1030 2004-01-30 Marcus Brinkmann <marcus@g10code.de>
1032 * Makefile.am (libcommon_a_SOURCES): Add xasprintf.c.
1033 * miscellaneous.c (xasprintf): Moved to ...
1034 * xasprintf (xasprintf): ... here. New file.
1035 This allows to use xasprintf without sucking in gpg-error.
1037 2004-01-27 Werner Koch <wk@gnupg.org>
1039 * sexp-parse.h: New; moved from../agent.
1041 * util.h (xtoi_4): New.
1043 2003-12-23 Werner Koch <wk@gnupg.org>
1045 * maperror.c (map_assuan_err): Prepared for a new error code.
1047 2003-12-17 Werner Koch <wk@gnupg.org>
1049 * gettime.c (asctimestamp): Add a note on a non-avoidable gcc warning.
1051 * util.h [!HAVE_VASPRINTF]: Add printf format attribute to the
1052 replacement function.
1054 * miscellaneous.c (xasprintf): New.
1056 2003-11-14 Werner Koch <wk@gnupg.org>
1058 * mkdtemp.c (mkdtemp): Use gcry_create_nonce.
1060 * cryptmiss.c: Removed.
1062 2003-11-13 Werner Koch <wk@gnupg.org>
1064 * util.h (vasprintf): Also fixed the prototype.
1066 * vasprintf.c (vasprintf): ARGS should not be a pointer. Fixed
1067 segv on Solaris. Reported by Andrew J. Schorr.
1069 2003-11-12 Werner Koch <wk@gnupg.org>
1071 * maperror.c (map_ksba_err, map_gcry_err, map_kbx_err): Removed.
1073 2003-10-31 Werner Koch <wk@gnupg.org>
1075 * util.h (gnupg_isotime_t): New.
1076 (gnupg_copy_time): New.
1078 * gettime.c (gnupg_get_isotime): New.
1080 2003-09-23 Werner Koch <wk@gnupg.org>
1082 * iobuf.c (check_special_filename): Replaced is isdigit by digitp
1083 to avoid passing negative values and potential locale problems.
1084 Problem noted by Christian Biere.
1086 * util.h (ascii_isspace): New.
1088 2003-09-18 Werner Koch <wk@gnupg.org>
1090 * ttyio.c (tty_fprintf): New.
1091 (tty_print_string, tty_print_utf8_string2)
1092 (tty_print_utf8_string): Made P argument const byte*.
1094 2003-08-20 Marcus Brinkmann <marcus@g10code.de>
1096 * maperror.c (map_ksba_err): Map -1. Use gpg_err_make to set
1099 2003-08-14 Timo Schulz <twoaday@freakmail.de>
1101 * dynload.h. New. W32 wrapper around the dynload mechanism.
1103 2003-07-15 Werner Koch <wk@gnupg.org>
1105 * simple-pwquery.c, simple-pwquery.h: New; moved from ../agent.
1106 * Makefile.am (libsimple_pwquery_a_LIBADD): New.
1108 2003-06-25 Werner Koch <wk@gnupg.org>
1110 * maperror.c (map_to_assuan_status): Directly map 0 to 0.
1112 2003-06-17 Werner Koch <wk@gnupg.org>
1114 * gettime.c (scan_isodatestr,add_days_to_timestamp,strtimevalue)
1115 (strtimestamp,asctimestamp): New. Code taken from gnupg 1.3.2
1118 * yesno.c: New. Code taken from gnupg 1.3.2 mischelp.c
1120 * miscellaneous.c: New.
1122 * util.h: Include utf8conf.h
1124 2003-06-16 Werner Koch <wk@gnupg.org>
1126 * gettime.c (make_timestamp): New.
1128 * ttyio.c: New. Taken from gnupg 1.2.
1129 * ttyio.h: Move from ../include.
1131 2003-06-13 Werner Koch <wk@gnupg.org>
1133 * util.h (seterr): Removed macro.
1134 (xmalloc_secure,xcalloc_secure): New.
1136 2003-06-11 Werner Koch <wk@gnupg.org>
1138 * iobuf.c (iobuf_writebyte,iobuf_write): Return error code from
1140 (iobuf_writestr): Ditto.
1142 2003-06-10 Werner Koch <wk@gnupg.org>
1144 * iobuf.c, iobuf.h: New. Taken from current gnupg 1.3 CVS. Run
1145 indent on it and adjusted error handling to libgpg-error style.
1146 Replaced IOBUF by iobuf_t. Renamed malloc functions.
1148 2003-06-04 Werner Koch <wk@gnupg.org>
1150 * errors.h: Removed all error codes. We keep the status codes for
1152 * Makefile.am: Do not create errors.c anymore; remove it from the
1155 * maperror.c: Don't include error.h. Change all error codes to
1157 (map_assuan_err): Changed to new Assuan error code convention.
1158 (map_to_assuan_status): Likewise.
1159 (map_gcry_err,map_kbx_err): Not needed. For now dummy functions.
1161 * membuf.c, membuf.h: New. Code taken from ../sm/call-agent.h.
1162 * Makefile.am: Added above.
1164 2003-04-29 Werner Koch <wk@gnupg.org>
1166 * util.h (fopencokokie): Removed prototype and struct.
1168 * fopencookie.c: Removed.
1170 * maperror.c: Use system assuan.h
1172 2002-10-31 Neal H. Walfield <neal@g10code.de>
1174 * isascii.c: New file.
1175 * putc_unlocked.c: Likewise.
1177 2002-10-28 Neal H. Walfield <neal@g10code.de>
1179 * signal.c (caught_fatal_sig): Remove superfluous zero
1181 (caught_sigusr1): Likewise.
1183 2002-09-04 Neal H. Walfield <neal@g10code.de>
1185 * vasprintf.c (vasprintf) [va_copy]: Use va_copy.
1186 [!va_copy && __va_copy]: Use __va_copy.
1187 [!va_copy && !__va_copy]: Only now fall back to using memcpy.
1189 2002-08-21 Werner Koch <wk@gnupg.org>
1191 * errors.h: Added STATUS_IMPORT_PROBLEM.
1193 2002-08-20 Werner Koch <wk@gnupg.org>
1195 * vasprintf.c: Hack to handle NULL for %s.
1197 2002-08-09 Werner Koch <wk@gnupg.org>
1199 * signal.c: New. Taken from GnuPG 1.1.91.
1201 2002-07-23 Werner Koch <wk@gnupg.org>
1203 * util.h (_IO_cookie_io_functions_t): Fixed typo. Noted by
1206 2002-07-22 Werner Koch <wk@gnupg.org>
1208 * fseeko.c, ftello.c: New.
1210 2002-06-28 Werner Koch <wk@gnupg.org>
1212 * maperror.c (map_to_assuan_status): Map more errorcodes to Bad
1215 2002-06-26 Werner Koch <wk@gnupg.org>
1217 * maperror.c (map_to_assuan_status): Map EOF to No_Data_Available.
1219 2002-06-10 Werner Koch <wk@gnupg.org>
1221 * errors.h (gnupg_error_token): Add new prototype.
1222 (STATUS_ERROR): New.
1225 * Makefile.am: Use it to create the new error token function.
1227 2002-06-04 Werner Koch <wk@gnupg.org>
1229 * maperror.c (map_to_assuan_status): Map Bad_CA_Certificate.
1231 2002-05-23 Werner Koch <wk@gnupg.org>
1233 * no-pth.c, Makefile.am: Removed.
1235 2002-05-22 Werner Koch <wk@gnupg.org>
1237 * mkdtemp.c: Replaced byte by unsigned char because it is no longer
1238 defined in gcrypt.h.
1240 2002-05-21 Werner Koch <wk@gnupg.org>
1242 * maperror.c (map_gcry_err): Add libgcrypt's new S-expression errors.
1243 (map_ksba_err): Add a few mappings.
1245 2002-05-14 Werner Koch <wk@gnupg.org>
1249 2002-05-03 Werner Koch <wk@gnupg.org>
1251 * errors.h: Added STARUS_EXPSIG and STATUS_EXPKEYSIG.
1253 2002-04-15 Werner Koch <wk@gnupg.org>
1257 2002-02-14 Werner Koch <wk@gnupg.org>
1259 * maperror.c: Add more assuan<->gnupg mappings.
1261 2002-02-12 Werner Koch <wk@gnupg.org>
1263 * fopencookie.c: Dummy function.
1265 * vasprintf.c: New. Taken from binutils-2.9.1 and dropped all non
1266 ANSI-C stuff. Merged with asprintf version.
1270 2002-01-23 Werner Koch <wk@gnupg.org>
1272 * mkdtemp.c: Copied from gnupg-1.0.6c and changed to use libgcrypt.
1274 2002-01-19 Werner Koch <wk@gnupg.org>
1276 * sysutils.c: New. This is the misc.c file from gnupg 1.0.6 with
1277 the OpenPGP stuff removed.
1280 2002-01-15 Werner Koch <wk@gnupg.org>
1282 * maperror.c: Add mapping for Not_Trusted.
1284 2002-01-11 Werner Koch <wk@gnupg.org>
1286 * maperror.c (map_assuan_err): Codes for CRL
1288 2002-01-08 Werner Koch <wk@gnupg.org>
1290 * util.h (spacep): New.
1292 2002-01-02 Werner Koch <wk@gnupg.org>
1294 * maperror.c (map_to_assuan_status): New. Merged from ../agent
1297 2001-12-20 Werner Koch <wk@gnupg.org>
1299 * maperror.c (map_gcry_err): Add some mappings.
1301 2001-12-18 Werner Koch <wk@gnupg.org>
1303 * Makefile.am (AM_CPPFLAGS): Include flags for gcrypt and ksba
1305 2001-12-14 Werner Koch <wk@gnupg.org>
1307 * util.h (digitp, hexdigitp): New ctype like macros.
1308 (atoi_1,atoi_2,atoi_4,xtoi_1,xtoi_2): New.
1311 Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007,
1312 2008 Free Software Foundation, Inc.
1314 This file is free software; as a special exception the author gives
1315 unlimited permission to copy and/or distribute it, with or without
1316 modifications, as long as this notice is preserved.
1318 This file is distributed in the hope that it will be useful, but
1319 WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
1320 implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.