1 2011-12-01 Werner Koch <wk@g10code.com>
3 NB: ChangeLog files are no longer manually maintained. Starting
4 on December 1st, 2011 we put change information only in the GIT
5 commit log, and generate a top-level ChangeLog file from logs at
6 "make dist". See doc/HACKING for details.
8 2011-11-30 Werner Koch <wk@gnupg.org>
10 Rewrite dns-cert.c to not use the gpg-only iobuf stuff.
11 * dns-cert.c: Remove iobuf.h.
12 (get_dns_cert): Rename to _get_dns_cert. Remove MAX_SIZE arg.
13 Change iobuf arg to a estream-t. Rewrite function to make use of
14 estream instead of iobuf. Require all parameters. Return an
15 gpg_error_t error instead of the type. Add arg ERRSOURCE.
16 * dns-cert.h (get_dns_cert): New macro to pass the error source to
18 * t-dns-cert.c (main): Adjust for changes in get_dns_cert.
20 * estream.c (es_fopenmem_init): New.
21 * estream.h (es_fopenmem_init): New.
23 2011-11-29 Werner Koch <wk@g10code.com>
25 * estream.c (func_mem_create): Don't set FUNC_REALLOC if GROW is
26 not set. Require FUNC_REALLOC if DATA is NULL and FUNC_FREE is
29 * dns-cert.c: Use new CERTTYPE_ constants for better readability.
31 2011-11-28 Werner Koch <wk@g10code.com>
33 * t-dns-cert.c (main): Increase MAX_SIZE to 64k.
35 * dns-cert.c (get_dns_cert): Factor test code out to ...
36 * t-dns-cert.c: new file.
38 2011-10-24 Werner Koch <wk@g10code.com>
40 * dotlock.h, dotlock.c: Add alternative to allow distribution of
41 these files under a modified BSD license
43 2011-09-30 Werner Koch <wk@g10code.com>
45 Change the license of all JNLIB parts from LPGLv3+ to to LGPLv3+
48 * dotlock.h (DOTLOCK_EXT_SYM_PREFIX): New macro.
50 2011-09-29 Werner Koch <wk@g10code.com>
52 * dotlock.c (DOTLOCK_USE_PTHREAD): New macro.
53 [DOTLOCK_USE_PTHREAD] (all_lockfiles_mutex): New.
54 (LOCK_all_lockfiles, UNLOCK_all_lockfiles): New. Use them to
55 protect access to all_lockfiles.
56 (dotlock_set_fd, dotlock_get_fd): New.
58 2011-09-28 Werner Koch <wk@g10code.com>
60 * dotlock.c (dotlock_take, dotlock_take_unix, dotlock_take_w32):
61 Implement arbitrary timeout values.
62 (dotlock_create): Add arg FLAGS for future extensions.
64 2011-09-27 Werner Koch <wk@g10code.com>
66 * dotlock.c (dotlock_take_unix): Check only the link count and not
67 the error return from link.
68 (use_hardlinks_p): New.
69 (dotlock_create_unix): Test for hardlinks.
70 (dotlock_take_unix): Implement O_EXCL locking.
72 2011-09-23 Werner Koch <wk@g10code.com>
74 * dotlock.c: Factor Unix and W32 specific code out into specific
75 functions. Define HAVE_POSIX_SYSTEM. Rearrange some functions.
76 (disable_dotlock): Rename to dotlock_disable.
77 (create_dotlock): Rename to dotlock_create.
78 (destroy_dotlock): Rename to dotlock_destroy.
79 (make_dotlock): Rename to dotlock_take.
80 (release_dotlock): Rename to dotlock_release.
82 2011-09-22 Werner Koch <wk@g10code.com>
84 * dotlock.c: Remove support for RISCOS.
86 2011-08-10 Werner Koch <wk@g10code.com>
88 * t-exechelp.c (test_close_all_fds): Don't use the DUMMY_FD var.
90 * pka.c (get_pka_info): Remove unused var.
92 * signal.c (got_fatal_signal): Remove unused var.
94 * estream.c (es_fread, es_fwrite): Remove unused var.
96 2011-07-20 Werner Koch <wk@g10code.com>
98 * ssh-utils.c, ssh-utils.h: New.
100 * Makefile.am (t_ssh_utils_LDADD): New.
101 (module_tests): Add t-ssh-utils.c
103 2011-06-01 Marcus Brinkmann <mb@g10code.com>
105 * util.h: Undef snprintf before redefining it.
107 2011-05-20 Werner Koch <wk@g10code.com>
109 * util.h: Remove some error code substitutes.
111 2011-04-25 Werner Koch <wk@g10code.com>
113 * userids.c (classify_user_id): Add arg OPENPGP_HACK to fix
114 regression from 2009-12-08.
116 2011-04-01 Werner Koch <wk@g10code.com>
118 * sysutils.c (get_uint_nonce): New.
120 2011-03-03 Werner Koch <wk@g10code.com>
122 * estream.c (struct estream_list): Rename to estream_list_s and
123 simplify. A double linked list is overkill for our purpose.
124 (do_list_add, do_list_remove): Adjust accordingly.
125 (_es_get_std_stream): Ditto.
126 (do_list_iterate, estream_iterator_t): Remove; it is used only at
128 (es_fflush): Replace iteration function. Also lock each stream
129 while flushing all streams.
131 2011-02-27 Werner Koch <wk@g10code.com>
133 * gettime.c (isotime2epoch): Factor check code out to ..
135 (isotime_human_p): New.
136 (string2isotime): New.
137 * t-gettime.c (test_string2isotime): New.
139 2011-02-11 Andrey Jivsov <openpgp@brainhub.org>
141 * openpgp-oid.c (openpgp_oid_to_str): Use unsigned int for
142 get_opaque. Fixes a bug on 64 bit platforms.
144 2011-02-08 Werner Koch <wk@g10code.com>
146 * http.c (connect_server): Add arg R_HOST_NOT_FOUND.
148 2011-02-07 Werner Koch <wk@g10code.com>
150 * http.c (my_socket_new, my_socket_ref, my_socket_unref): New.
151 (cookie_close, cookie_read, cookie_write, http_close, _http_open)
152 (send_request): Replace use of an socket integer by the new socket
154 (_http_raw_connect): New.
155 (fp_onclose_notification): New.
156 (_http_raw_connect, _http_wait_response, http_close): Register and
157 unregister this notification.
158 * http.h (http_raw_connect): New.
160 * http.h (parsed_uri_s): Add field IS_OPAQUE.
161 (http_req_t): Add HTTP_REQ_OPAQUE.
162 * http.c (do_parse_uri): Parse unknown schemes into PATH.
163 (my_socket_new, my_socket_ref, my_socket_unref): New.
164 (send_request): Simplify save_errno stuff.
166 2011-02-03 Werner Koch <wk@g10code.com>
168 * status.h (STATUS_DECRYPTION_INFO): New.
170 * argparse.c (strusage): Update copyright year.
172 2011-01-31 Werner Koch <wk@g10code.com>
174 * openpgp-oid.c: New.
175 * t-openpgp-oid.c: New.
177 2011-01-20 Werner Koch <wk@g10code.com>
181 * http.c (my_select): New. Define to pth_select if building with Pth.
182 (start_server, write_server, cookie_read, cookie_write): Use it.
183 (my_connect): New. Define to pth_connect if building with Pth.
184 (connect_server): Use it.
185 (my_accept): New. Define to pth_accept if building with Pth.
186 (start_server): Use it.
188 2011-01-20 Werner Koch <wk@g10code.com>
190 * util.h (struct b64state): Add field LASTERR.
191 * b64enc.c (enc_start, b64enc_write, b64enc_finish): Handle
192 LASTERR. This is to make sure that we don't leak strduped data.
193 * b64dec.c (b64dec_start, b64dec_proc, b64dec_finish): Ditto.
195 * http.c (escape_data): New.
196 (insert_escapes): Implement using escape_data.
197 (http_escape_data): New.
199 2011-01-19 Werner Koch <wk@g10code.com>
201 * homedir.c (gnupg_module_name): Use NAME_OF_INSTALLED_GPG instead
204 2011-01-18 Werner Koch <wk@g10code.com>
206 * iobuf.c (file_es_filter_ctx_t): New.
207 (file_es_filter): New.
210 * membuf.c (clear_membuf, peek_membuf): New.
212 * util.h (GPG_ERR_NO_KEYSERVER): New.
214 * keyserver.h (keyserver_spec): Move from ../g10/options.h to here.
216 * http.c (do_parse_uri): Add arg NO_SCHEME_CHECK. Change all
217 callers. Support HKP and HKPS.
218 (_http_parse_uri): Do proper error management.
219 * http.h (parsed_uri_s): Add field IS_HTTP.
220 (http_parse_uri): Support NO_SCHEME_CHECK arg.
222 * estream.c (es_func_mem_write): Fix computation of NEWSIZE.
224 2011-01-10 Werner Koch <wk@g10code.com>
226 * session-env.c (update_var): Fix same value detection. Fixes
229 2010-12-17 Werner Koch <wk@g10code.com>
231 * asshelp.c (lock_spawning): Add arg VERBOSE. Improve timeout
232 management. Make callers pass a value for VERBOSE.
233 (lock_agent_spawning, unlock_agent_spawning): Remove. Change
234 callers to use lock_spawning and unlock_spawning.
236 2010-12-17 Marcus Brinkmann <mb@g10code.com>
238 * homedir.c (gnupg_cachedir): Create /temp subdirectories.
240 2010-12-02 Werner Koch <wk@g10code.com>
242 * miscellaneous.c (gnupg_cipher_algo_name): New. Replace all
243 users of gcry_cipher_algo_name by this one.
245 * logging.c (fun_cookie_s) [W32CE]: Add field USE_WRITEFILE.
246 (fun_writer) [W32CE]: Make use of it.
247 (set_file_fd) [W32CE]: Implement special filename "GPG2:".
249 2010-11-25 Werner Koch <wk@g10code.com>
251 * asshelp.c (start_new_gpg_agent): Change style of startup info.
252 (start_new_dirmngr): Ditto.
254 2010-11-23 Werner Koch <wk@g10code.com>
256 * asshelp.c (SECS_TO_WAIT_FOR_AGENT, SECS_TO_WAIT_FOR_DIRMNGR):
257 Use these constants. For W32CE increase them to 30 seconds.
258 (start_new_gpg_agent): Print time to startup agent.
259 (start_new_dirmngr): Ditto.
261 2010-11-04 Werner Koch <wk@g10code.com>
263 * logging.c (do_logv) [W32]: Don't set a default log stream if the
264 registry entry is empty.
266 2010-10-27 Werner Koch <wk@g10code.com>
268 * gettime.c (gnupg_get_isotime): Compare to (time_t)-1.
269 (epoch2isotime): Ditto.
270 (IS_INVALID_TIME_T): New.
271 (asctimestamp): Use new macro.
272 (strtimestamp, isotimestamp): Ditto. Use snprintf.
274 2010-10-25 Werner Koch <wk@g10code.com>
276 * logging.c (do_log): Rename to log_log and make global.
278 2010-10-20 Werner Koch <wk@g10code.com>
280 * i18n.c (i18n_init) [USE_SIMPLE_GETTEXT]: Call textdomain.
282 2010-10-14 Werner Koch <wk@g10code.com>
284 * asshelp.c (start_new_gpg_agent): Print a notice once the agent
286 (start_new_dirmngr): Likewise.
288 2010-10-13 Werner Koch <wk@g10code.com>
290 * miscellaneous.c (parse_version_number, parse_version_string)
291 (gnupg_compare_version): New.
293 2010-10-04 Werner Koch <wk@g10code.com>
295 * gettime.c (asctimestamp) [W32CE]: Do not print the timezone.
297 2010-09-30 Werner Koch <wk@g10code.com>
299 * util.h (GPG_ERR_FULLY_CANCELED): Add replacement.
301 2010-09-17 Werner Koch <wk@g10code.com>
303 * http.c (INADDR_NONE): Provide fallback.
304 * logging.c (INADDR_NONE): Ditto.
306 2010-09-16 Werner Koch <wk@g10code.com>
308 * util.h: Add GPG_ERR_MISSING_ISSUER_CERT.
309 * status.c (get_inv_recpsgnr_code): Ditto.
311 2010-09-13 Werner Koch <wk@g10code.com>
313 * homedir.c (gnupg_bindir) [W32CE]: Change to bin/.
314 (gnupg_libexecdir) [W32]: Call gnupg_bindir.
315 (gnupg_libdir, gnupg_datadir, gnupg_localedir) [W32]: Simplify by
317 (gnupg_module_name): Ditto.
318 (w32_rootdir): Strip a trailing "bin".
320 2010-09-02 Werner Koch <wk@g10code.com>
322 * util.h (GPG_ERR_NOT_INITIALIZED): Define if not defined.
324 2010-09-01 Marcus Brinkmann <marcus@g10code.de>
326 * estream.c (_es_set_std_fd): Disable debug output.
328 2010-08-26 Werner Koch <wk@g10code.com>
330 * estream.c (es_convert_mode): Rename to parse_mode.
331 (parse_mode): Add arg R_CMODE and parse key value pairs. Use Use
332 664 as the default mode. Change callers.
333 (ES_DEFAULT_OPEN_MODE): Remove.
334 (es_fopen, do_fpopen, do_w32open, es_freopen): Support a creation
336 (es_func_file_create): Rename to func_file_create and add arg CMODE.
337 (es_func_fd_create): Rename to func_fd_create.
338 (es_func_fp_create): Rename to func_fp_create.
339 (es_list_add): Rename to do_list_add.
340 (es_list_remove): Rename to do_list_remove.
341 (es_list_iterate): Rename to do_list_iterate.
342 (es_pth_read): Rename to do_pth_read.
343 (es_deinit): Rename to do_deinit.
344 (es_init_do): Rename to do_init.
345 (es_func_mem_create): Rename to func_mem_create.
347 2010-08-23 Werner Koch <wk@g10code.com>
349 * exechelp-w32ce.c: Rewrite all spawn stuff.
351 * exechelp-w32.c (close_all_fds) [W32]: Make it a dummy function.
353 * estream.c (es_onclose): New.
354 (notify_list_t, onclose): New.
355 (struct estream_internal): Add field ONCLOSE.
356 (es_initialize, es_deinitialize): Manage new field.
357 (do_close): Call onclose notify functions.
359 2010-08-20 Werner Koch <wk@g10code.com>
361 * exechelp-w32.c (create_inheritable_pipe): Change arg to HANDLE.
363 * estream.h (es_sysopen_t): New.
364 * estream.c (es_func_w32_create, es_func_w32_read)
365 (es_func_w32_write, es_func_w32_seek, es_func_w32_destroy)
366 (estream_functions_w32, estream_cookie_fd): New. Only for W32.
367 (es_sysopen, es_sysopen_nc): New.
368 (do_w32open, do_sysopen): New.
369 (es_syshd, es_syshd_unlocked): New.
370 (struct estream_internal): Replace filed FD by SYSHD.
371 (es_initialize): Clear SYSHD_VALID.
372 (map_w32_to_errno): New.
374 (es_fileno_unlocked): Re-implement using es_syshd.
375 (es_initialize, es_create): Replace arg FD by SYSHD.
376 (es_fopen, es_mopen, es_fopenmem, do_fdopen, do_fpopen)
377 (es_tmpfile): Use SYSHD instead of FD.
378 (es_destroy): Rename to do_close.
380 2010-08-19 Werner Koch <wk@g10code.com>
382 * exechelp-posix.c (create_pipe_and_estream): New.
383 (gnupg_spawn_process): Rework this function and its calling
384 convention; it is not used anyway.
385 * exechelp-w32.c (gnupg_spawn_process): Ditto.
387 2010-08-18 Werner Koch <wk@g10code.com>
389 * logging.c (writen): Add arg IS_SOCKET.
390 (fun_writer): Pass the is_socket flag.
391 (do_logv) [W32]: Allow for a default log stream
393 * estream.c (struct estream_internal): Remove obsolete fields
394 PRINT_FP, PRINT_ERRNO, PRINT_ERR and all remaining code cruft.
396 2010-08-16 Werner Koch <wk@g10code.com>
398 * estream.c (es_printf_unlocked, es_printf): New.
400 * asshelp.c (lock_agent_t): Rename to lock_spawn_t.
401 (lock_agent_spawning, unlock_agent_spawning): Factor code out to ...
402 (lock_spawning, unlock_spawning): .. new.
403 (start_new_gpg_agent): Make more use of ERRSOURCE.
404 (start_new_dirmngr): New.
406 2010-08-13 Werner Koch <wk@g10code.com>
408 * Makefile.am (audit-events.h, status-codes.h): Fix srcdir problem
409 amd depend on Makefile.am instead of Makefile.
411 2010-08-12 Werner Koch <wk@g10code.com>
413 * sysutils.c (gnupg_remove) [W32CE]: Fix returned error.
415 2010-08-09 Werner Koch <wk@g10code.com>
417 * logging.c (WITH_IPV6): New macro.
418 (parse_portno): New. From libassuan.
419 (fun_writer): Support TCP logging on all platforms.
422 2010-08-06 Werner Koch <wk@g10code.com>
424 * homedir.c (dirmngr_socket_name) [W32CE]: Base on default homedir.
425 (gnupg_cachedir) [W32CE]: Drop drive letter.
427 * http.c (http_open_document): Rename to _http_open_document and
428 add arg ERRSOURCE. Pass ERRSOURCE to all called funcs.
429 (http_wait_response, http_open, http_parse_uri): Likewise.
430 (do_parse_uri, parse_response, store_header): Change to return an
431 gpg_err_code_t. Change callers.
432 (send_request): Add arg ERRSOURCE. Change callers.
433 * http.h (http_open_document, http_wait_response, http_open)
434 (http_parse_uri): Define as macro.
436 2010-08-05 Werner Koch <wk@g10code.com>
438 * estream.h (es_asprintf, es_vasprintf): Add lost prototyps.
440 * http.c: Require estream and make HTTP_USE_ESTREAM obsolete. It
441 make the code unreadable and we require estream anyway for GnuPG.
442 (http_wait_response): Get use of cookies right.
443 (send_request): s/xtryasprintf/es_asprintf/ to allow standalone
445 (insert_escapes, connect_server): s/sprintf/snprintf/.
446 (parse_response): s/my_read_line/es_read_line/.
447 (my_read_line): Remove.
448 (write_server): Use pth_write.
450 2010-07-26 Werner Koch <wk@g10code.com>
452 * estream.c (es_func_fp_write) [W32]: Write smaller chunks.
454 2010-07-25 Werner Koch <wk@g10code.com>
456 * argparse.c (initialize): Use ARGPARSE_PRINT_WARNING constant.
458 2010-07-24 Werner Koch <wk@g10code.com>
460 * estream.c (es_set_binary): New.
462 2010-07-19 Werner Koch <wk@g10code.com>
464 * utf8conv.c (utf8_to_wchar): s/malloc/jnlib_malloc/.
466 2010-07-16 Werner Koch <wk@g10code.com>
468 * http.h (HTTP_FLAG_IGNORE_CL): Add flag .
469 * http.c (WITHOUT_GNU_PTH): Test macro for Pth support.
470 (http_parse_uri): s/xcalloc/xtrycalloc/.
471 (send_request): Replace of discrete allocation and sprintf by
473 (http_wait_response): Replace HTTP_FLAG_NO_SHUTDOWN by
474 HTTP_FLAG_SHUTDOWN to change the default to no shutdown.
475 (cookie_read) [HAVE_PTH]: Use pth_read.
476 (longcounter_t): New.
477 (struct cookie_s): Add support for content length. Turn flag
478 fields into bit types.
479 (parse_response): Parse content length header.
480 (cookie_read): Take care of the content length.
482 2010-07-08 Werner Koch <wk@g10code.com>
484 * estream.c (estream_functions_file): Remove and replace by
485 identical estream_functions_fd.
487 2010-07-06 Werner Koch <wk@g10code.com>
489 * util.h (b64state): Add field STREAM.
490 * b64enc.c (b64enc_start): Factor code out to ..
492 (b64enc_start_es, my_fputs): New.
493 (b64enc_write, b64enc_finish): Support estream.
495 2010-06-24 Werner Koch <wk@g10code.com>
497 * asshelp.c (lock_agent_spawning) [W32]: Use CreateMutexW.
498 (start_new_gpg_agent): Use HANG option for gnupg_wait_progress.
499 Fixes regression from 2010-06-09.
501 2010-06-21 Werner Koch <wk@g10code.com>
503 * util.h (xfree_fnc): New.
505 2010-06-18 Werner Koch <wk@g10code.com>
507 * util.h (GPG_ERR_MISSING_KEY) [!GPG_ERR_MISSING_KEY]: New.
509 * sexputil.c (make_canon_sexp_pad): Add arg SECURE.
511 2010-06-17 Werner Koch <wk@g10code.com>
513 * sexputil.c (make_canon_sexp_pad): New.
515 2010-06-14 Werner Koch <wk@g10code.com>
517 * membuf.c (put_membuf): Add shortcut for !LEN.
519 2010-06-11 Marcus Brinkmann <marcus@g10code.de>
521 * sysutils.c (translate_sys2libc_fd): Revert last change.
522 (translate_sys2libc_fd_int): Revert last change.
524 2010-06-10 Marcus Brinkmann <marcus@g10code.de>
526 * sysutils.c (translate_sys2libc_fd) [HAVE_W32CE_SYSTEM]:
528 (translate_sys2libc_fd_int) [HAVE_W32CE_SYSTEM]: Don't call
529 translate_sys2libc_fd.
531 * estream.c (_es_get_std_stream): Fix cut&paste bug.
533 2010-06-09 Werner Koch <wk@g10code.com>
535 * exechelp-posix.c, exechelp-w32.c
536 * exechelp-w32ce.c (gnupg_wait_process): Add new arg HANG. Change
538 (gnupg_release_process): New. Use it after all calls to
541 * util.h (GNUPG_MODULE_NAME_DIRMNGR_LDAP): New.
542 * homedir.c (gnupg_cachedir): New.
543 (w32_try_mkdir): New.
544 (dirmngr_socket_name): Change standard socket name.
545 (gnupg_module_name): Support GNUPG_MODULE_NAME_DIRMNGR_LDAP.
547 * logging.c (log_set_get_tid_callback): Replace by ...
548 (log_set_pid_suffix_cb): .. new.
549 (do_logv): Change accordingly.
551 2010-06-08 Marcus Brinkmann <marcus@g10code.de>
553 * Makefile.am (AM_CFLAGS): Add $(LIBASSUAN_CFLAGS).
554 (t_common_ldadd): Add $(LIBASSUAN_LIBS).
555 * sysutils.c: Include <assuan.h>.
556 (translate_sys2libc_fd_int): Cast to silence gcc warning.
557 * iobuf.c: Include <assuan.h>
558 (translate_file_handle): Fix syntax error.
560 2010-06-08 Werner Koch <wk@g10code.com>
562 * iobuf.c (translate_file_handle) [W32CE]: Handle rendezvous ids.
564 2010-06-07 Werner Koch <wk@g10code.com>
566 * sysutils.c [W32CE]: Finish pipe creation.
568 * estream.c (es_fname_get, es_fname_set): New.
569 (fname_set_internal): New.
570 (struct estream_internal): Add fields printable_fname and
571 printable_fname_inuse.
572 (_es_get_std_stream): Set stream name.
573 (es_fopen, es_freopen, es_deinitialize): Set fname.
575 * exechelp-posix.c (gnupg_spawn_process): Allow passing INFILE or
577 * exechelp-w32.c (gnupg_spawn_process): Ditto.
578 * exechelp-w32ce.c (gnupg_spawn_process): Return an error for
579 INFILE or OUTFILE passed as NULL.
581 2010-06-01 Werner Koch <wk@g10code.com>
583 * logging.c (log_get_stream): Make sture a log stream is available.
585 2010-05-30 Werner Koch <wk@g10code.com>
587 * init.c (writestring_via_estream): New.
588 (init_common_subsystems): Register with argparse.
590 * argparse.c (argparse_register_outfnc): New.
591 (writestrings, flushstrings): New. Use them instead of stdout or
592 stderr based functions.
594 2010-05-04 Werner Koch <wk@g10code.com>
596 * estream.c (_es_get_std_stream): Re-use registered standard fds.
597 (IS_INVALID_FD, ESTREAM_SYS_YIELD): New.
598 (es_func_fd_read, es_func_fd_write, es_func_fd_seek)
599 (es_func_fd_destroy): Implement a dummy stream.
601 * exechelp-w32ce.c (build_w32_commandline): Add args FD0_ISNULL
602 and FD1_ISNULL. Remove arg PGMNAME. Change callers.
603 (gnupg_spawn_process_detached): Implement.
604 (gnupg_spawn_process_fd): Implement one special case for now.
606 2010-05-03 Werner Koch <wk@g10code.com>
608 * asshelp.c (lock_agent_spawning, unlock_agent_spawning): New.
609 (start_new_gpg_agent): Test for configured standard socket and
610 try to fire up the agent in this case.
612 * exechelp-posix.c (gnupg_wait_process): Do not log a message if
614 (gnupg_spawn_process_detached): Do not reuse PID for the second fork.
616 2010-04-26 Werner Koch <wk@g10code.com>
618 * utf8conv.c (load_libiconv) [W32CE]: No libiconv warning
620 * init.c (init_common_subsystems) [W32CE]: Register the sleep
621 function before es_init.
623 2010-04-20 Werner Koch <wk@g10code.com>
625 * estream.c (es_deinit): New.
626 (es_init_do): Install atexit handler to flush all streams.
628 * Makefile.am (common_sources): Add gettime.h.
630 2010-04-20 Marcus Brinkmann <marcus@g10code.de>
632 * logging.c (do_log_ignore_arg): New helper function.
633 (log_string): Use it to remove ugly volatile hack that causes gcc
635 (log_flush): Likewise.
636 * sysutils.c (gnupg_unsetenv) [!HAVE_W32CE_SYSTEM]: Return something.
637 (gnupg_setenv) [!HAVE_W32CE_SYSTEM]: Likewise.
638 * pka.c (get_pka_info): Solve strict aliasing rule violation.
639 * t-exechelp.c (test_close_all_fds): Use dummy variables to
642 2010-04-15 Werner Koch <wk@g10code.com>
644 * util.h: Factor time related functions out to ...
646 (gnupg_copy_time): Move to ...
647 * gettime.c (gnupg_copy_time): New.
649 * sysutils.c (gnupg_setenv) [!W32CE]: Add missing return.
650 (gnupg_unsetenv) [!W32CE]: Add missing return.
652 2010-04-14 Werner Koch <wk@g10code.com>
654 * Makefile.am (noinst_LIBRARIES) [W32CE]: Exclude libsimple-pwquery.
656 * w32help.h (umask) [W32CE]: New.
658 * sysutils.c (_gnupg_isatty): New.
659 * util.h (gnupg_isatty): New.
661 * asshelp.c (setup_libassuan_logging): Read ASSUAN_DEBUG envvar.
662 (my_libassuan_log_handler): Use it.
663 * sysutils.c (_gnupg_getenv): Implement ASSUAN_DEBUG.
665 2010-04-08 Werner Koch <wk@g10code.com>
667 * w32help.h (_setmode, setmode) [W32CE]: Provide prototype and
670 2010-04-07 Werner Koch <wk@g10code.com>
672 * mischelp.c (timegm): Replace unsetenv/putenv by gnupg_unsetenv.
674 * sysutils.c: Include setenv.h.
675 (gnupg_setenv, gnupg_unsetenv): New.
678 2010-04-06 Werner Koch <wk@g10code.com>
680 * sysutils.c (gnupg_mkdir): New.
682 2010-03-29 Werner Koch <wk@g10code.com>
684 * init.c (sleep_on_exit): Change to 400ms.
686 2010-03-25 Werner Koch <wk@g10code.com>
688 * init.c (sleep_on_exit) [W32CE]: New.
689 (init_common_subsystems): Call it.
691 2010-03-24 Werner Koch <wk@g10code.com>
693 * stringhelp.c (change_slashes, compare_filenames): Replace
694 HAVE_DRIVE_LETTERS by HAVE_DOSISH_SYSTEM.
695 (make_basename, make_dirname): Detect backslashes and drive
698 * dotlock.c (make_dotlock, create_dotlock, release_dotlock): Use
699 LockFileEx and UnlockFileEx to support W32CE.
701 * ttyio.c (USE_W32_CONSOLE): Replace all _WIN32 by this.
702 (init_ttyfp) [W32CE]: Use stderr.
704 * iobuf.c (FD_FOR_STDIN, FD_FOR_STDOUT) [W32CE]: Use estream.
705 (translate_file_handle) [W32CE]: Remove handle translation.
707 2010-03-23 Werner Koch <wk@g10code.com>
709 * sysutils.c (gnupg_remove): New.
711 2010-03-22 Werner Koch <wk@g10code.com>
713 * exechelp-w32ce.c (build_w32_commandline): Replace by code from
715 (create_inheritable_pipe): Use _assuan_w32ce_prepare_pipe.
716 (build_w32_commandline_copy, do_create_pipe): Remove.
718 * exechelp-posix.c (gnupg_spawn_process): Change to use estream
719 also for INFILE and STATUSFILE.
720 * exechelp-w32.c (gnupg_spawn_process): Ditto.
722 2010-03-22 Werner Koch <wk@g10code.com>
724 * exechelp.c: Remove after factoring all code out to ...
725 * exechelp-posix.c, exechelp-w32.c, exechelp-w32ce.c: .. new.
727 * exechelp.c (create_inheritable_pipe_r)
728 (create_inheritable_pipe_w): Fold both into ...
729 (create_inheritable_pipe): .. New. Change callers to use this.
730 (gnupg_create_inbound_pipe, gnupg_create_outbound_pipe): Factor
732 (do_create_pipe): .. New.
734 * init.c (parse_std_file_handles): Change to use rendezvous ids.
736 2010-03-15 Werner Koch <wk@g10code.com>
738 * init.c (init_common_subsystems): Add args ARGCP and
739 ARGVP. Change all callers to provide them.
740 (parse_std_file_handles): New.
742 * t-sysutils.c (rewind) [W32CE]: Provide a replacement.
744 * Makefile.am (module_tests) [W32CE]: Don't build t-exechelp for now.
746 * sysutils.c (gnupg_allow_set_foregound_window) [W32CE]: Don't
747 call AllowSetForegroundWindow.
749 * logging.c (isatty) [W32CE]: New.
750 (fun_writer, set_file_fd): Use estream even for the internal error
752 (log_string, log_flush): Make DUMMY_ARG_PTR static.
754 2010-03-15 Werner Koch <wk@g10code.com>
756 * asshelp.c (send_pinentry_environment) [!HAVE_SETLOCALE]: Do not
758 * http.c (connect_server) [!USE_DNS_SRV]: Mark SRVTAG unused.
759 * dns-cert.c (get_dns_cert) [!USE_DNS_CERT]: Mark args unused.
760 * pka.c (get_pka_info): Ditto.
762 * signal.c (pause_on_sigusr): Remove. It was used in ancient gpg
763 version with shared memory IPC. Last caller removed on 2006-04-18.
764 (do_block) [W32]: Mark arg unused.
766 * exechelp.c (w32_open_null): Use CreateFileW.
768 * init.c (init_common_subsystems): Add args ARGCP and ARGVP.
769 Change all callers to pass them.
771 * logging.c (S_IRGRP, S_IROTH, S_IWGRP, S_IWOTH) [W32]: New.
772 (fun_writer, set_file_fd) [W32]: Disable socket code.
774 * localename.c: Include gpg-error.h.
776 * util.h (GPG_ERR_NOT_ENABLED): Remove this temporary definition.
778 2010-03-12 Werner Koch <wk@g10code.com>
780 * status.h (STATUS_ENTER): New.
782 * ttyio.c (tty_fprintf): Change to use estream.
784 * miscellaneous.c (print_utf8_string): Rename to print_utf8_buffer
785 and change FP arg to an estream. Change all callers.
786 (print_utf8_string2): Ditto; new name is to print_utf8_buffer2.
788 2010-03-11 Werner Koch <wk@g10code.com>
790 * miscellaneous.c (print_string): Remove.
792 * estream.c (es_setvbuf): Fix parameter check.
793 (es_set_buffering): Allow a SIZE of 0.
794 * asshelp.c (setup_libassuan_logging, my_libassuan_log_handler): New.
795 * logging.c (do_logv): Add arg IGNORE_ARG_PTR. Change all callers.
798 (set_file_fd): Simplify by using estreams es_stderr.
800 * estream.h (es_stdout, es_stderr, es_stdin): New.
802 2010-03-10 Werner Koch <wk@g10code.com>
804 * estream.c (es_func_fp_read, es_func_fp_write, es_func_fp_seek)
805 (es_func_fp_destroy): Allow a NULL FP to implement a dummy stream.
807 (es_vfprintf_unlocked): New.
808 (es_fprintf_unlocked): Make public.
809 (es_fputs_unlocked): New.
811 * logging.h: Replace FILE* by estream_t.
812 * logging.c: Remove USE_FUNWRITER cpp conditional because we now
814 (my_funopen_hook_ret_t, my_funopen_hook_size_t): Replace by
816 (log_get_stream): Change to return an estream_t.
817 (set_file_fd): Always close the log stream because it can't be
818 assigned to stderr or stdout directly. Use a dummy estream as
819 last resort log stream.
820 (log_test_fd, log_get_fd): Use es_fileno.
821 (log_get_stream): Assert that we have a log stream.
822 (do_logv): Use estream functions and lock the output.
824 2010-03-10 Werner Koch <wk@g10code.com>
826 * util.h: Replace jnlib path part by common.
827 (snprintf): Use the replacement macro on all platforms.
829 * Makefile.am (jnlib_sources): New.
830 (libcommon_a_SOURCES, libcommonpth_a_SOURCES): Add jnlib_sources.
832 (noinst_PROGRAMS, TESTS): Add jnlib_tests.
833 (t_common_ldadd): Remove libjnlib.a.
835 * README.jnlib, ChangeLog.jnlib, libjnlib-config.h, argparse.c
836 * argparse.h, dotlock.c, dotlock.h, dynload.h, logging.c
837 * logging.h, mischelp.c, mischelp.h, stringhelp.c, stringhelp.h
838 * strlist.c, strlist.h, types.h, utf8conv.c, utf8conv.h
839 * w32-afunix.c, w32-afunix.h, w32-reg.c, w32help.h, xmalloc.c
840 * xmalloc.h, t-stringhelp.c, t-support.c, t-support.h
841 * t-timestuff.c, t-w32-reg.c: Move from jnlib to here.
843 * init.c: Remove "estream.h".
844 * util.h: Include "estream.h".
846 * xasprintf.c, ttyio.c: Remove "estream-printf.h".
848 2010-03-08 Werner Koch <wk@g10code.com>
850 * exechelp.c [!HAVE_SIGNAL_H]: Do not include signal.h.
851 (DETACHED_PROCESS, CREATE_NEW_PROCESS_GROUP) [W32CE]: Provide stubs.
853 * iobuf.h (iobuf_ioctl_t): New. Use the new macros instead of the
855 * iobuf.c (iobuf_append): Remove.
856 (iobuf_fdopen): Factor code out to ...
857 (do_iobuf_fdopen): ... new.
858 (iobuf_fdopen_nc): New.
859 (iobuf_open_fd_or_name): Implement using iobuf_fdopen_nc.
861 * iobuf.c (INVALID_FD): Replace by GNUPG_INVALID_FD.
862 (fp_or_fd_t): Replace by gnupg_fd_t.
863 (my_fileno): Replace by the FD2INT macro.
864 (FILEP_OR_FD_FOR_STDIN, FILEP_OR_FD_FOR_STDOUT): Rename to
865 FD_FOR_STDIN, FD_FOR_STDOUT.
866 (file_filter): Make full use of FD_FOR_STDIN.
867 (USE_SETMODE): Remove. Not needed without stdio.
868 (my_fopen_ro, my_fopen): Replace unneeded macros.
870 * iobuf.c [FILE_FILTER_USES_STDIO]: Remove all code. It has not
871 been used for a long time.
873 * exechelp.h: Include "estream.h".
875 * exechelp.c (gnupg_spawn_process): Change OUTFILE to an estream_t.
877 2010-03-02 Werner Koch <wk@g10code.com>
879 * estream.c, estream.h, estream-printf.c, estream-printf.h: Update
882 2010-03-01 Werner Koch <wk@g10code.com>
884 * signal.c [!HAVE_SIGNAL_H]: Don't include signal.h.
886 * iobuf.c (direct_open) [W32CE]: Make filename to wchar_t.
887 (iobuf_cancel) [W32CE]: Use DeleteFile.
889 * gettime.c (dump_isotime): Use "%s" to print "none".
891 * homedir.c (standard_homedir) [W32CE]: Use wchar_t to create the
893 (w32_rootdir) [W32CE]: Likewise.
895 * sysutils.c (translate_sys2libc_fd) [W32CE]: Add support.
896 (gnupg_tmpfile) [W32CE]: Ditto.
897 (_gnupg_getenv) [W32CE]: New.
899 * util.h (getpid, getenv) [W32CE]: New.
901 * i18n.c (i18n_switchto_utf8)
902 (i18n_switchback) [USE_SIMPLE_GETTEXT]: Use new function from
903 libgpg-error which supports proper restoring.
905 * sysutils.c (get_session_marker): Simplified by using gcrypt.
907 2009-12-08 Marcus Brinkmann <marcus@g10code.de>
909 * Makefile.am (audit-events.h, status.h) [!MAINTAINER_MODE]: No
910 longer include these rules if not in maintainer mode.
912 2009-12-08 Werner Koch <wk@g10code.com>
914 * userids.h, userids.c: New.
915 (classify_user_id): Merged from similar fucntions in sm/ and g10/.
917 * dns-cert.c (get_dns_cert): Add support for ADNS.
919 2009-12-08 Marcus Brinkmann <marcus@g10code.de>
921 * asshelp.c (start_new_gpg_agent): Convert posix FD to assuan FD.
923 * asshelp.c (start_new_gpg_agent) [HAVE_W32_SYSTEM]: Add missing
924 argument in assuan_socket_connect invocation.
925 * iobuf.c (iobuf_open_fd_or_name): Fix type of FD in function
928 2009-12-07 Werner Koch <wk@g10code.com>
930 * pka.c (get_pka_info): Add support for ADNS.
931 * src.v (getsrv): Add support for ADNS.
933 * srv.c (getsrv): s/xrealloc/xtryrealloc/.
935 2009-12-04 Werner Koch <wk@g10code.com>
937 * Makefile.am (audit-events.h, status-codes.h): Create files in
938 the source dir. Fixes bug#1164.
940 2009-12-02 Werner Koch <wk@g10code.com>
942 * audit.c (proc_type_decrypt, proc_type_sign): Implemented.
943 (proc_type_verify): Print hash algo infos.
944 * audit.h (AUDIT_DATA_CIPHER_ALGO, AUDIT_BAD_DATA_CIPHER_ALSO)
945 (AUDIT_NEW_RECP, AUDIT_DECRYPTION_RESULT, AUDIT_RECP_RESULT)
946 (AUDIT_ATTR_HASH_ALGO, AUDIT_SIGNED_BY, AUDIT_SIGNING_DONE):
948 2009-11-05 Marcus Brinkmann <marcus@g10code.de>
950 * asshelp.c (start_new_gpg_agent): Update use of
951 assuan_socket_connect and assuan_pipe_connect.
953 2009-11-02 Marcus Brinkmann <marcus@g10code.de>
955 * get-passphrase.c (default_inq_cb, membuf_data_cb): Change return
958 2009-10-28 Werner Koch <wk@g10code.com>
960 * status.h (STATUS_MOUNTPOINT): New.
962 2009-10-16 Marcus Brinkmann <marcus@g10code.com>
964 * Makefile.am (libcommon_a_CFLAGS): Use LIBASSUAN_CFLAGS instead
965 of LIBASSUAN_PTH_CFLAGS.
967 2009-10-13 Werner Koch <wk@g10code.com>
969 * exechelp.c (gnupg_kill_process): New.
971 2009-09-29 Werner Koch <wk@g10code.com>
973 * exechelp.c (create_inheritable_pipe): Rename to
974 create_inheritable_pipe_w.
975 (create_inheritable_pipe_r): New.
976 (gnupg_create_outbound_pipe): New.
978 * iobuf.h: Include "sysutils.h"
980 * iobuf.c (iobuf_open_fd_or_name): New.
981 (iobuf_get_fname_nonnull): New.
983 2009-09-23 Marcus Brinkmann <marcus@g10code.de>
985 * asshelp.c (start_new_gpg_agent): Allocate assuan context before
988 2009-09-03 Werner Koch <wk@g10code.com>
990 Update from libestream:
991 * estream-printf.c: Include stdint.h only if HAVE_STDINT_H is
993 * estream-printf.c: Remove all test code. Use macro DEBUG instead
994 of TEST for debugging.
995 * estream-printf.c (pr_float): Make buffer larger for silly high
998 2009-08-11 David Shaw <dshaw@jabberwocky.com>
1000 * ttyio.h, ttyio.c (tty_enable_completion): Some ifdefs around
1001 HAVE_LIBREADLINE to allow building when readline isn't available.
1003 2009-08-06 Werner Koch <wk@g10code.com>
1005 * status.h (STATUS_INV_SGNR, STATUS_NO_SGNR): New.
1006 * status.c (get_inv_recpsgnr_code): New.
1008 2009-07-23 David Shaw <dshaw@jabberwocky.com>
1010 * srv.c (getsrv): Fix type-punning warning.
1012 2009-07-23 Werner Koch <wk@g10code.com>
1014 * util.h (GPG_ERR_NOT_ENABLED): New.
1015 * audit.h (enum): Add AUDIT_CRL_CHECK.
1016 * audit.c (proc_type_verify): Show CRL check result.
1018 2009-07-06 Werner Koch <wk@g10code.com>
1020 * get-passphrase.c (struct agentargs): Add SESSION_ENV and remove
1022 (gnupg_prepare_get_passphrase): Ditto.
1024 * session-env.c, session-env.h: New.
1025 * t-session-env.c: New.
1026 * Makefile.am (common_sources, module_tests): Add them.
1027 * asshelp.h: Include "session-env.h"
1028 * asshelp.c (send_one_option): Add arg PUTENV.
1029 (send_pinentry_environment): Replace most args by SESSION_ENV and
1031 (start_new_gpg_agent): Likewise.
1033 * t-exechelp.c (test_close_all_fds): Remove debug code.
1035 2009-07-01 Werner Koch <wk@g10code.com>
1037 * sexputil.c (get_pk_algo_from_canon_sexp): New.
1039 2009-06-29 Werner Koch <wk@g10code.com>
1041 * estream.c (BUFFER_ROUND_TO_BLOCK): Remove unused macro.
1042 (es_func_mem_write): Rewrite reallocation part.
1044 * estream.c (es_write_sanitized_utf8_buffer): Typo typo fix.
1046 2009-06-25 Werner Koch <wk@g10code.com>
1048 * estream.c (es_write_sanitized_utf8_buffer): Typo fix.
1050 2009-06-24 Werner Koch <wk@g10code.com>
1052 * estream.c (es_read_line): In the malloc error case, set
1053 MAX_LENGTH to 0 only if requested.
1054 * xreadline.c (read_line): Ditto.
1055 * estream.c (es_write_sanitized_utf8_buffer): Pass on error from
1057 * sexputil.c (get_rsa_pk_from_canon_sexp): Check for error after
1058 the loop. Reported by Fabian Keil.
1060 2009-06-22 Werner Koch <wk@g10code.com>
1062 * estream.c (es_pth_read, es_pth_write) [W32]: New.
1063 (ESTREAM_SYS_READ, ESTREAM_SYS_WRITE) [HAVE_PTH]: Use them.
1065 2009-06-03 Werner Koch <wk@g10code.com>
1067 * estream.c (es_convert_mode): Rewrite and support the "x" flag.
1069 2009-05-28 David Shaw <dshaw@jabberwocky.com>
1073 * http.h, http.c (send_request) Pass in a STRLIST for additional
1074 headers. Change all callers.
1076 2009-05-27 David Shaw <dshaw@jabberwocky.com>
1080 * http.h, http.c (send_request): Pass in srvtag and make its
1081 presence sufficient to turn the feature on.
1082 (http_open): From here.
1083 (http_document): And here.
1085 * srv.c (getsrv): Raise maximum packet size to 2048, as PACKETSZ
1086 is too small these days.
1088 2009-05-22 Werner Koch <wk@g10code.com>
1090 * ttyio.c (tty_cleanup_after_signal): New.
1092 2009-05-19 Werner Koch <wk@g10code.com>
1094 * simple-pwquery.c (agent_open): Use SUN_LEN
1095 (JNLIB_NEED_AFLOCAL): Define and include mischelp.h.
1097 2009-05-07 Werner Koch <wk@g10code.com>
1099 * sexputil.c (get_rsa_pk_from_canon_sexp): New.
1100 * t-sexputil.c (test_make_canon_sexp_from_rsa_pk): Extend the test.
1102 2009-04-28 Werner Koch <wk@g10code.com>
1104 * sexputil.c (make_canon_sexp_from_rsa_pk): New.
1105 * t-sexputil.c (test_make_canon_sexp_from_rsa_pk): New.
1107 2009-04-01 Werner Koch <wk@g10code.com>
1109 * iobuf.c: Port David's changes from 1.4:
1110 (fd_cache_invalidate): Pass return code from close back.
1111 (direct_open, iobuf_ioctl): Check that return value.
1112 (fd_cache_synchronize): New.
1113 (iobuf_ioctl): Add new sub command 4 (fsync).
1115 * iobuf.c (fd_cache_strcmp): New. Taken from 1.4.
1116 (fd_cache_invalidate, fd_cache_close, fd_cache_open): Use it.
1118 * exechelp.c (gnupg_spawn_process): Implement new flag bit 6.
1119 * sysutils.c (gnupg_allow_set_foregound_window): Allow the use of
1122 * membuf.c (put_membuf, get_membuf): Wipe memory on out of core.
1124 2009-03-31 Werner Koch <wk@g10code.com>
1126 * percent.c (percent_unescape, percent_plus_unescape): New.
1127 (percent_plus_unescape_inplace, percent_unescape_inplace): New.
1128 (do_plus_or_plain_unescape, count_unescape, do_unescape): New.
1129 (do_unescape_inplace): New.
1130 * t-percent.c (test_percent_plus_escape): Test percent_plus_unescape.
1132 * get-passphrase.c, get-passphrase.h: New.
1133 * Makefile.am (without_pth_sources): New.
1135 2009-03-18 Werner Koch <wk@g10code.com>
1137 * exechelp.c: Include sys/resource.h and sys/stat.h.
1138 (get_max_open_fds): New.
1140 (get_all_open_fds): New.
1141 (close_all_fds): New.
1142 (do_exec): Use close_all_fds.
1143 * t-exechelp.c: New.
1145 2009-03-13 David Shaw <dshaw@jabberwocky.com>
1147 * http.c (do_parse_uri): Properly handle IPv6 literal addresses as
1148 per RFC-2732. Adapted from patch by Phil Pennock.
1150 2009-03-12 Werner Koch <wk@g10code.com>
1152 * gettime.c: Include i18n.h.
1153 (dump_isotime): New.
1155 2009-03-06 Werner Koch <wk@g10code.com>
1157 * sexputil.c (make_canon_sexp): New.
1159 2009-03-03 Werner Koch <wk@g10code.com>
1161 * exechelp.c (do_exec): Make sure that /dev/null connected FDs are
1164 2009-01-19 Werner Koch <wk@g10code.com>
1166 * audit.c (writeout_li): Translate a few more result strings.
1169 * convert.c (hex2str): Fix optimization to append a nul character.
1171 2008-12-05 Werner Koch <wk@g10code.com>
1173 * percent.c, t-percent.c: New.
1175 * exechelp.c (gnupg_spawn_process, gnupg_spawn_process_fd)
1176 (gnupg_spawn_process_detached) [W32]: Remove debug output.
1178 2008-11-20 Werner Koch <wk@g10code.com>
1180 * audit.c (writeout_li): Translate OKTEXT.
1182 2008-11-04 Werner Koch <wk@g10code.com>
1184 * i18n.c (i18n_init) [USE_SIMPLE_GETTEXT]: Adjust for changed
1186 * homedir.c (gnupg_localedir): New.
1188 2008-10-20 Werner Koch <wk@g10code.com>
1190 * http.c (http_register_tls_callback) [!HTTP_USE_GNUTLS]: Mark
1192 * localename.c (do_nl_locale_name): Ditto.
1193 * audit.c (event2str): Silent gcc warning.
1194 * sysutils.c (translate_sys2libc_fd): Mark unused arg.
1195 (translate_sys2libc_fd_int): Ditto.
1196 * iobuf.c (translate_file_handle): Ditto.
1197 * asshelp.c (send_one_option): Ditto.
1198 * exechelp.c (gnupg_spawn_process): Ditto.
1199 * signal.c (got_usr_signal): Ditto
1200 * estream.c (es_func_fd_create) [!W32]: Ditto.
1201 (es_func_fp_create) [!W32]: Ditto.
1202 (es_write_hexstring): Ditto.
1203 (dummy_mutex_call_void, dummy_mutex_call_int) [HAVE_PTH]: New.
1204 (ESTREAM_MUTEX_LOCK, ESTREAM_MUTEX_UNLOCK, ESTREAM_MUTEX_TRYLOCK)
1205 (ESTREAM_MUTEX_INITIALIZE) [HAVE_PTH]: Use dummy calls so to mark
1208 2008-10-19 Werner Koch <wk@g10code.com>
1210 * estream-printf.c (estream_vsnprintf): Fix return value.
1211 (check_snprintf): Add a new test.
1212 (one_test) [W32]: Disable test.
1214 2008-10-17 Werner Koch <wk@g10code.com>
1216 * util.h (snprintf) [W32]: Redefine to estream_snprintf.
1218 2008-09-03 Werner Koch <wk@g10code.com>
1220 * convert.c (hex2str): New.
1221 (hex2str_alloc): New.
1222 * t-convert.c (test_hex2str): New.
1224 2008-08-19 Werner Koch <wk@g10code.com>
1226 * iobuf.c: Avoid passing a NULL (iobuf_t)->desc to the log
1227 function. Should in general never be NULL, but well. Reported by
1230 2008-06-26 Werner Koch <wk@g10code.com>
1232 * estream.c (es_write_sanitized): Loose check for control
1233 characters to better cope with utf-8. The range 0x80..0x9f is
1234 nowadays not anymore accidently used for control charaters.
1236 2008-06-25 Marcus Brinkmann <marcus@g10code.de>
1238 Revert last three changes related to handle translation.
1240 (FD_TRANSLATE_MAX, fd_translate, fd_translate_len)
1241 (translate_table_init, translate_table_lookup): Removed.
1242 * iobuf.c (check_special_filename): Do not use
1243 translate_table_lookup.
1244 * sysutils.h (translate_table_init, translate_table_lookup):
1247 2008-06-19 Werner Koch <wk@g10code.com>
1249 * sysutils.c: Remove <ctype.h>.
1250 (fd_translate_max): Use macro for the size.
1251 (translate_table_init): Protect read against EINTR and replace
1254 2008-06-18 Marcus Brinkmann <marcus@g10code.de>
1256 * sysutils.c (TRANS_MAX): Bump up to 350 to be on the safe side.
1258 * sysutils.h (translate_table_init, translate_table_lookup): New
1260 * sysutils.c: Include <ctype.h>.
1261 (FD_TRANSLATE_MAX): New macro.
1262 (fd_translate, fd_translate_len): New static variables.
1263 (translate_table_init, translate_table_lookup): New functions.
1264 (translate_sys2libc_fd_int): Translate file descriptor.
1265 * iobuf.c (check_special_filename): Translate handle values from
1268 2008-06-16 Werner Koch <wk@g10code.com>
1270 * homedir.c (w32_commondir): New.
1271 (gnupg_sysconfdir): Use it.
1273 2008-06-09 Werner Koch <wk@g10code.com>
1277 2008-06-05 Werner Koch <wk@g10code.com>
1279 * util.h (gnupg_copy_time): Replace strcpy by memcpy.
1281 2008-05-26 Werner Koch <wk@g10code.com>
1283 * asshelp.c (send_one_option, send_pinentry_environment): use
1284 xfree and xtrystrdup.
1286 * i18n.c (i18n_switchto_utf8) [USE_SIMPLE_GETTEXT]: Return NULL.
1288 * homedir.c (gnupg_module_name): Add
1289 GNUPG_MODULE_NAME_CONNECT_AGENT and GNUPG_MODULE_NAME_GPGCONF.
1291 2008-04-21 Werner Koch <wk@g10code.com>
1293 * http.c (http_wait_response) [W32]: Use DuplicateHandle because
1295 (cookie_read) [W32]: Use recv in place of read.
1297 2008-04-08 Werner Koch <wk@g10code.com>
1299 * i18n.c (i18n_switchto_utf8, i18n_switchback)
1300 [USE_SIMPLE_GETTEXT]: Implement.
1302 2008-04-07 Werner Koch <wk@g10code.com>
1304 * b64enc.c (b64enc_start): Detect PGP mode.
1305 (b64enc_finish): Write PGP CRC.
1306 * util.h (struct b64state): Add field CRC.
1309 * pka.c (get_pka_info): Use xtrymalloc and check result.
1311 2008-03-25 Werner Koch <wk@g10code.com>
1313 * localename.c: Strip all W32 code. Include w32help.h.
1314 (gnupg_messages_locale_name) [W32]: Use the gettext_localename.
1316 2008-03-17 Werner Koch <wk@g10code.com>
1318 * iobuf.c (IOBUF_BUFFER_SIZE): Actually use this macro.
1320 * simple-pwquery.c (agent_send_all_options): Fix last change.
1322 2008-03-06 Werner Koch <wk@g10code.com>
1324 * simple-pwquery.c (agent_send_all_options): Add support for
1325 XAUTHORITY and PINENTRY_USER_DATA.
1327 2008-02-15 Marcus Brinkmann <marcus@g10code.de>
1329 * exechelp.c (gnupg_spawn_process_fd): Add flag DETACHED_PROCESS
1330 unconditionally (required for all callers at the moment).
1332 2008-02-14 Werner Koch <wk@g10code.com>
1334 * sysutils.c (gnupg_allow_set_foregound_window): New.
1335 (WINVER) [W32]: Define.
1337 2008-01-31 Werner Koch <wk@g10code.com>
1339 * audit.c (audit_print_result): Make sure that the output is
1342 2008-01-27 Werner Koch <wk@g10code.com>
1344 * exechelp.c (gnupg_spawn_process): Add arg FLAGS and changed all
1345 callers to pass 0 for it.
1347 2007-12-13 Werner Koch <wk@g10code.com>
1349 * sexputil.c (hash_algo_from_sigval): New.
1350 * t-sexputil.c: New.
1351 * Makefile.am (module_tests): Add it.
1353 2007-12-11 Werner Koch <wk@g10code.com>
1355 * asshelp.c (send_pinentry_environment): Allow using of old
1356 gpg-agents not capabale of the xauthority and pinentry_user_data
1359 2007-12-04 Werner Koch <wk@g10code.com>
1361 * Makefile.am (t_helpfile_LDADD, module_maint_tests): New.
1362 * t-helpfile.c: New.
1364 * membuf.h (is_membuf_ready, MEMBUF_ZERO): New.
1365 * localename.c: New. Taken from gettext with modifications as done
1366 for GpgOL. Export one new function.
1367 * util.h (gnupg_messages_locale_name, gnupg_get_help_string): Added.
1369 * sysutils.c (gnupg_reopen_std): New. Taken from ../g10/gpg.c.
1371 2007-11-27 Werner Koch <wk@g10code.com>
1373 * Makefile.am (CLEANFILES): New.
1375 * homedir.c (dirmngr_socket_name): Use CSIDL_WINDOWS.
1377 2007-11-15 Werner Koch <wk@g10code.com>
1379 * asshelp.c (send_pinentry_environment): Add args XAUTHORITY and
1381 (start_new_gpg_agent): Ditto.
1383 2007-11-07 Werner Koch <wk@g10code.com>
1388 2007-11-05 Werner Koch <wk@g10code.com>
1390 * audit.c, audit.h: New.
1391 * Makefile.am: Add rules to build audit-events.h.
1393 * mkstrtable.awk: New. Taken from libgpg-error.
1395 2007-10-19 Werner Koch <wk@g10code.com>
1397 * i18n.c (i18n_switchto_utf8, i18n_switchback): New.
1399 2007-10-01 Werner Koch <wk@g10code.com>
1401 * sysutils.h (FD2INT, INT2FD): New.
1403 2007-09-21 Werner Koch <wk@g10code.com>
1405 * homedir.c (default_homedir): Make registry work. Reported by
1408 2007-08-29 Werner Koch <wk@g10code.com>
1410 * exechelp.c (gnupg_wait_process): Add arg EXITCODE. Changed all
1412 (gnupg_create_inbound_pipe): New.
1413 * util.h (GNUPG_MODULE_NAME_GPGSM, GNUPG_MODULE_NAME_GPG): New.
1414 * homedir.c (gnupg_module_name): Add them
1416 2007-08-28 Werner Koch <wk@g10code.com>
1418 * gettime.c (check_isotime, add_isotime): New. Originally written
1420 (add_days_to_isotime): New.
1421 (date2jd, jd2date, days_per_month, days_per_year): New. Taken from
1422 my ancient (1988) code used in Wedit (time2.c).
1424 2007-08-27 Werner Koch <wk@g10code.com>
1426 * util.h (GNUPG_MODULE_NAME_CHECK_PATTERN): New.
1427 * homedir.c (gnupg_module_name): Add it.
1428 * exechelp.c (w32_fd_or_null) [W32]: New.
1429 (gnupg_spawn_process_fd): New.
1430 (gnupg_wait_process) [W32]: Close the handle after if the process has
1433 2007-08-22 Werner Koch <wk@g10code.com>
1435 Updated estream from libestream.
1437 * estream.c (mem_malloc, mem_realloc, mem_free): New. Use them
1438 instead of the ES_MEM_foo.
1439 * estream.c (estream_cookie_mem): Remove members DONT_FREE,
1440 APPEND_ZERO, PTR and SIZE. Add MEMORY_LIMIT. Put GROW into a new
1442 (es_func_mem_create): Remove APPEND_ZERO, DONT_FREE, PTR and
1443 SIZE. Add MEMORY_LIMIT.
1444 (es_func_mem_write, es_func_mem_seek, es_func_mem_destroy): Revamp.
1445 (es_open_memstream): Change API to just take a memory limit and a
1446 mode argument. Rename to ..
1447 (es_fopenmem): .. this.
1448 (HAVE_W32_SYSTEM) [_WIN32]: Define if not defined.
1449 (tmpfd) [W32]: Implement directly using the W32 API.
1450 (es_fgets): Rewrite without using doreadline.
1452 2007-08-21 Werner Koch <wk@g10code.com>
1454 * sysutils.c (gnupg_tmpfile): New.
1455 * t-sysutils.c: New.
1456 * Makefile.am (module_tests): Add t-sysutils.
1458 2007-08-20 Werner Koch <wk@g10code.com>
1460 * exechelp.c [W32]: Redefine X_OK to F_OK.
1462 2007-08-16 Werner Koch <wk@g10code.com>
1464 * Makefile.am (t_convert_DEPENDENCIES): Remove
1465 ($(PROGRAMS)): Remove.
1466 (t_common_ldadd): Use libcommon.a and not the macro.
1468 2007-08-14 Werner Koch <wk@g10code.com>
1470 * homedir.c (dirmngr_socket_name): New.
1472 2007-08-07 Werner Koch <wk@g10code.com>
1474 * tlv.c, tlv.h: Move from ../scd/.
1475 * tlv.c (parse_sexp, parse_ber_header): Add ERRSOURCE arg and prefix
1477 * tlv.h: Use macro to convey ERRSOURCE.
1479 2007-08-02 Werner Koch <wk@g10code.com>
1481 * gc-opt-flags.h: New.
1483 2007-08-01 Werner Koch <wk@g10code.com>
1485 * estream-printf.c (read_dummy_value): Removed as it is useless now.
1486 (read_values): Remove check on !vaargs which is not anymore needed
1487 and anyway not portable. Reported by Peter O'Gorman.
1489 2007-07-16 Werner Koch <wk@g10code.com>
1491 * estream.c (es_func_file_create): Clear NO_CLOSE flag.
1493 2007-07-12 Werner Koch <wk@g10code.com>
1495 * sysutils.h (gnupg_fd_t): New.
1496 * sysutils.c (translate_sys2libc_fd): Use that type instead of int.
1497 (translate_sys2libc_fd_int): New.
1499 2007-07-09 Werner Koch <wk@g10code.com>
1501 * t-gettime.c (test_isotime2epoch): Use time_t and not u32.
1503 2007-07-05 Werner Koch <wk@g10code.com>
1506 * gettime.c (isotime2epoch, epoch2isotime): New.
1508 2007-07-04 Werner Koch <wk@g10code.com>
1510 * estream.c (es_init_do): Do not throw an error if pth has already
1513 2007-06-26 Werner Koch <wk@g10code.com>
1515 * Makefile.am ($(PROGRAMS)): New.
1517 * util.h (init_common_subsystems): Moved to ..
1519 * util.h: Include init.h.
1521 * homedir.c (standard_homedir): New.
1522 (default_homedir) [W32]: Reimplemented in terms of
1523 standard_homedir. Fixed memory leak.
1525 2007-06-25 Werner Koch <wk@g10code.com>
1527 * iobuf.c: Add more documentation and slighly restructured macro
1528 defintion for better readability.
1529 (FILEP_OR_FD): Rename to fp_or_fd_t.
1530 (CLOSE_CACHE): Rename to close_cache_t.
1532 * sysutils.c (translate_sys2libc_fd): New using the code from iobuf.c.
1533 * iobuf.c: Include sysutils.h.
1534 (iobuf_translate_file_handle): Remove.
1535 (translate_file_handle): Use new function.
1537 * estream-printf.c [TEST]: Header including fixes.
1538 (do_format): Do not append a trailing Nul. This avoids spurious
1539 Nuls in the es_printf output.
1540 (estream_vsnprintf, estream_vasprintf): Take this in account.
1542 * estream.h (struct es__stream): Change FLAGS to a bit structure.
1543 (ES__FLAG_WRITING): Replace by a bit from FLAGS. * estream.c
1544 (struct estream_internal): Rename FLAGS to MODEFLAGS so that they
1545 are not confused with the estream flags.
1546 (es_initialize, es_create): Add arg MODEFLAGS so that we can setup
1547 the intial writemode. Changed all callers to pass them.
1548 (es_convert_mode): Set O_BINARY.
1549 (es_func_fd_create, es_func_fp_create, es_func_file_create) [W32]:
1550 Call setmode if requested.
1552 2007-06-24 Werner Koch <wk@g10code.com>
1554 * estream.c (do_fpopen, es_fpopen, es_fpopen_nc): New.
1555 (es_func_fp_create, es_func_fp_read, es_func_fp_write)
1556 (es_func_fp_seek, es_func_fp_destroy): New.
1558 2007-06-22 Werner Koch <wk@g10code.com>
1560 * estream.c (es_fdopen): Factored code out to..
1561 (do_fdopen): .. new.
1562 (es_fdopen_nc): New.
1563 (estream_cookie_fd): Add field NO_CLOSE.
1564 (es_func_fd_create): Add arg NO_CLOSE and changed all callers.
1565 (es_func_fd_destroy): Handle the new flag.
1567 * homedir.c (gnupg_libexecdir) [W32]: Factor code out to ..
1568 (w32_rootdir): .. new.
1569 (gnupg_sysconfdir, gnupg_libdir, gnupg_datadir) [W32]: Return
1570 name based on w32_rootdir().
1572 2007-06-21 Werner Koch <wk@g10code.com>
1574 * membuf.h (get_membuf_len): New.
1576 * membuf.c (init_membuf_secure): Really allocate in secure memory.
1577 (put_membuf_str): New.
1579 * ttyio.c (tty_getf): New.
1581 * util.h (ctrl_t): Declare it here.
1583 * asshelp.c (start_new_gpg_agent): New. Based on code from
1586 2007-06-20 Werner Koch <wk@g10code.com>
1588 * sysutils.c (gnupg_sleep): New.
1589 * sysutils.h [W32]: Remove _sleep wrapper. Changed all callers to
1592 * exechelp.c (build_w32_commandline_copy): New.
1593 (build_w32_commandline): Factored some code out to new function
1594 and correctly process a PGMNAME with spaces.
1595 (gnupg_spawn_process_detached) [W32]: Implement.
1597 2007-06-14 Werner Koch <wk@g10code.com>
1599 * simple-pwquery.h (MAP_SPWQ_ERROR_IMPL): New.
1600 (SPWQ_NO_PIN_ENTRY): New.
1601 * simple-pwquery.c (simple_pw_set_socket): New.
1602 (agent_open): Use it if GPG_AGENT_INFO is not set.
1603 (simple_pwquery): Extended to allow returning of other error codes.
1605 * util.h (GNUPG_MODULE_NAME_AGENT, GNUPG_MODULE_NAME_PINENTRY)
1606 (GNUPG_MODULE_NAME_SCDAEMON, GNUPG_MODULE_NAME_DIRMNGR)
1607 (GNUPG_MODULE_NAME_PROTECT_TOOL): New.
1608 * homedir.c (gnupg_module_name): New.
1609 (gnupg_bindir): New.
1611 2007-06-12 Werner Koch <wk@g10code.com>
1613 * homedir.c (gnupg_sysconfdir): New.
1614 (gnupg_libexecdir): New. Taken from g10/misc.c:get_libexecdir.
1615 (gnupg_datadir): New.
1616 (gnupg_libdir): New.
1618 * http.c (connect_server) [W32]: Do not call init_sockets if
1619 HTTP_NO_WSASTARTUP is defined.
1623 * estream.c (es_init_do): Init stream lock here because we can't
1624 use a static initialization with W32pth.
1626 2007-06-11 Werner Koch <wk@g10code.com>
1628 * Makefile.am (t_common_ldadd): Use libcommonstd macro.
1630 2007-06-06 Werner Koch <wk@g10code.com>
1632 * Makefile.am: Include am/cmacros.am.
1634 * sysutils.h [W32]: Remove prototypes for the registry access.
1635 * w32reg.c: Move to ../jnlib/w32-reg.c.
1637 * i18n.c (i18n_init): New.
1639 * simple-gettext.c: Remove.
1641 * iobuf.c (iobuf_get_filelength): Rename SIZE to EXSIZE to silent
1644 2007-06-04 Werner Koch <wk@g10code.com>
1646 * http.c [W32]: Include unistd.h also in this case.
1647 (write_server) [W32]: Fixed error code.
1648 (init_sockets): Fixed syntax error.
1649 (cookie_close): Replace close by sock_close macro.
1651 * estream.c [w32]: Do not init Mutex.
1653 * Makefile.am (common_sources) [USE_SNS_SRV]: Build srv.c only
1656 * ttyio.c (init_ttyfp) [W32]: Do not use TTYFP.
1658 * util.h: Include ../jnlib/dynload.h.
1660 * dynload.h: Move to ../jnlib.
1662 2007-05-30 Werner Koch <wk@g10code.com>
1664 * estream.c (MEM_FREE, MEM_ALLOC, MEM_REALLOC): Prefix with ES_ as
1665 windows.h also has such definitions,
1667 2007-05-15 Werner Koch <wk@g10code.com>
1669 * util.h: Do not include gnulib's vasprintf. Redefine asprintf
1672 * xasprintf.c (xasprintf, xtryasprintf): Use estream_vasprintf.
1674 * estream-printf.h, estream-printf.c: New. Taken from current
1676 * Makefile.am (common_sources): Add them.
1678 2007-05-14 Werner Koch <wk@g10code.com>
1680 * sexp-parse.h (smklen): New.
1681 * sexputil.c: Include sexp-parse.h.
1682 (make_simple_sexp_from_hexstr): Replace sprintf by smklen.
1684 2007-05-07 Werner Koch <wk@g10code.com>
1686 * signal.c (got_fatal_signal): Protect SIG from being clobbered by
1687 a faulty signal implementaion. Suggested by James Juran.
1689 2007-04-25 Werner Koch <wk@g10code.com>
1691 * i18n.h (ngettext): New.
1692 * simple-gettext.c (ngettext): New.
1694 2007-04-20 Werner Koch <wk@g10code.com>
1696 * miscellaneous.c (my_gcry_logger, my_gcry_outofcore_handler):
1697 Moved from gpg-agent to here.
1698 (my_gcry_fatalerror_handler): new.
1699 (setup_libgcrypt_logging): New.
1701 2007-03-19 Werner Koch <wk@g10code.com>
1703 * miscellaneous.c (print_hexstring): New.
1704 * estream.c (es_fprintf_unlocked): New.
1705 (es_write_sanitized): New.
1706 (es_write_hexstring): New.
1707 (es_write_sanitized_utf8_buffer) [GNUPG_MAJOR_VERSION]: New.
1709 2007-03-09 David Shaw <dshaw@jabberwocky.com>
1711 From STABLE-BRANCH-1-4
1713 * http.c (do_parse_uri): Remove the hkp port 11371 detection. We
1714 implement hkp in the keyserver handler, and the support here makes
1715 it appear like a bad hkp request actually succeeded.
1717 2007-01-31 Werner Koch <wk@g10code.com>
1719 * Makefile.am (t_common_ldadd): Add LIBINCONV and LIBINTL.
1721 2007-01-25 Werner Koch <wk@g10code.com>
1723 * simple-pwquery.c (simple_pwquery): New arg OPT_CHECK.
1725 2006-12-13 David Shaw <dshaw@jabberwocky.com>
1727 * Makefile.am (AM_CPPFLAGS): Include intl/ so we can reference the
1730 2006-11-23 Werner Koch <wk@g10code.com>
1732 * http.c: Include i18n.h
1734 2006-11-21 Werner Koch <wk@g10code.com>
1736 * estream.c: Remove explicit Pth soft mapping diabling becuase it
1737 is now done in config.h.
1739 2006-11-15 Werner Koch <wk@g10code.com>
1741 * estream.c: Disabled Pth soft mapping.
1742 (my_funopen_hook_ret_t): New.
1743 (print_fun_writer): Use it here.
1745 * iobuf.c (fd_cache_close): Use %d instead of %p for debug output.
1747 2006-11-03 Werner Koch <wk@g10code.com>
1749 * Makefile.am (t_convert_DEPENDENCIES): Add libcommon. From
1752 2006-10-24 Marcus Brinkmann <marcus@g10code.de>
1754 * Makefile.am (libcommon_a_CFLAGS): Add $(LIBASSUAN_CFLAGS).
1755 (libsimple_pwquery_a_CFLAGS): New variable.
1757 2006-10-20 Werner Koch <wk@g10code.com>
1759 * convert.c (hex2bin): New.
1761 2006-10-17 Werner Koch <wk@g10code.com>
1763 * estream.c (struct estream_internal, es_initialize)
1764 (es_deinitialize, print_fun_writer, es_print): New and modified
1765 functions to avoid tempfiles for printf style printing.
1767 * Makefile.am (libcommonpth_a_SOURCES): New. We now build a secon
1768 version of the library with explicit Pth support.
1769 * exechelp.c, estream.c: Make use of WITHOUT_GNU_PTH.
1771 2006-10-08 Werner Koch <wk@g10code.com>
1773 * gpgrlhelp.c: Trun all functions into dummies if readline is not
1776 2006-10-06 Werner Koch <wk@g10code.com>
1778 * Makefile.am (AM_CFLAGS): Use PTH version of libassuan.
1780 * util.h (GNUPG_GCC_A_SENTINEL): Defined for gcc >= 4.
1782 2006-10-04 David Shaw <dshaw@jabberwocky.com>
1784 * gpgrlhelp.c: readline requires stdio.h.
1786 2006-10-04 Werner Koch <wk@g10code.com>
1788 * membuf.c (init_membuf_secure): New.
1789 (put_membuf): Make sure that ERRNO is set even if the underlying
1790 malloc code does not work properly.
1791 (get_membuf): Set ERRNO on error.
1792 (get_membuf): Allow to pass LEN as NULL.
1794 2006-10-02 Werner Koch <wk@g10code.com>
1796 * iobuf.c (iobuf_unread): Removed. This code is not required.
1797 Also removed the entire unget buffer stuff.
1799 2006-09-27 Werner Koch <wk@g10code.com>
1801 * util.h: Do not include strsep.h and strpbrk.h.
1802 (isascii): Removed as it is now in jnlib.
1804 * iobuf.c (pop_filter, underflow, iobuf_close): Free the unget
1807 2006-09-27 Florian Weimer <fweimer@bfk.de> (wk)
1809 * iobuf.c (iobuf_unread): New.
1811 2006-09-22 Werner Koch <wk@g10code.com>
1813 * i18n.h: Changed license to an all permissive one.
1815 * ttyio.c (tty_get): We need to use readline too. Added two more
1818 2006-09-21 Werner Koch <wk@g10code.com>
1820 * ttyio.c (tty_private_set_rl_hooks): New.
1821 (tty_enable_completion, tty_disable_completion): Use a hook to
1822 enable readline support. Now always available.
1823 (tty_cleanup_rl_after_signal): New.
1825 * ttyio.h: Removed readline specific stuff. Included util.h.
1826 * common-defs.h: New.
1828 2006-09-15 Werner Koch <wk@g10code.com>
1831 (hexcolon2bin): New.
1832 (bin2hex, bin2hexcolon, do_binhex): New.
1835 2006-09-14 Werner Koch <wk@g10code.com>
1837 * util.h (out_of_core): Use new gpg_error_from_syserror function.
1839 * http.c (init_sockets): Changed it to require 2.2 unless it is
1840 build within gnupg 1 where we require 1.1 (and not anymore allow
1843 2006-09-07 Werner Koch <wk@g10code.com>
1845 * exechelp.c (gnupg_spawn_process): Factor out post fork code to ..
1846 (do_exec): .. new function. Allow passing of -1 for the fds.
1847 (gnupg_spawn_process): Terminate gcrypt's secure memory in the child.
1848 (gnupg_spawn_process_detached): New.
1850 2006-09-06 Werner Koch <wk@g10code.com>
1852 * maperror.c: Removed.
1854 * util.h (out_of_core): New.
1856 2006-09-04 Werner Koch <wk@g10code.com>
1858 * http.c (http_get_header): New.
1859 (capitalize_header_name, store_header): New.
1860 (parse_response): Store headers away.
1861 (send_request): Return GPG_ERR_NOT_FOUND if connect_server failed.
1862 * http.h: New flag HTTP_FLAG_NEED_HEADER.
1864 2006-08-21 Werner Koch <wk@g10code.com>
1866 * Makefile.am (libcommon_a_SOURCES): Added keyserver.h
1868 * openpgpdefs.h: New. Stripped from ..g10/packet.h.
1870 2006-08-16 Werner Koch <wk@g10code.com>
1872 * keyserver.h: Moved from ../include to here.
1874 * http.c: Include srv.h.
1876 * srv.c, srv.h: New. Taken from GnuPG 1.4
1878 2006-08-14 Werner Koch <wk@g10code.com>
1880 * http.h (struct http_context_s): Moved to implementation.
1881 * http.c (http_open): Changed call to return a context.
1882 (http_open_document): Ditto.
1883 (http_get_read_ptr, http_get_read_ptr, http_get_status_code): New.
1884 (do_parse_uri): Replaced strlwr by straight code to ease
1885 standalone use of this file.
1886 (http_wait_response): Removed arg STATUS_CODE as it is available
1887 through an accessor function. Adjusted caller.
1888 (http_escape_string): New.
1890 * estream.c (es_read_line): Renamed to ..
1891 (doreadline): .. this. Changed all callers.
1892 (es_read_line): New. This is theusual limited getline variabnt as
1893 used at several places. Here taken and adjusted from xreadline.c
1896 2006-08-11 Werner Koch <wk@g10code.com>
1898 * http.c: Major internal changes to optionallly support GNUTLS and
1900 (http_open): Move initialization of the stream ...
1901 (send_request): .. here.
1902 (http_register_tls_callback): New.
1904 * estream.c (es_writen): Try to seek only is a seek function has
1907 2006-08-09 Werner Koch <wk@g10code.com>
1909 * http.c, http.h: New. Taken from gnupg 1.4.5, merged with
1910 changes done for the Dirmngr project (by g10 Code) and cleaned up
1912 (make_header_line): New. Change all caller to make user of the new
1913 * Makefile.am (libcommon_a_SOURCES): Added http.c and http.h.
1915 2006-05-23 Werner Koch <wk@g10code.com>
1917 * gettime.c (isotimestamp): New.
1919 * ttyio.c (tty_get_ttyname): Posixly correct usage of ctermid.
1921 * dns-cert.c: New. Taken from 1.4.3's util/cert.c.
1924 2006-05-22 Werner Koch <wk@g10code.com>
1926 * pka.c: New. Taked from 1.4.3.
1928 * Makefile.am: Added pka.
1930 2006-05-19 Werner Koch <wk@g10code.com>
1932 * yesno.c (answer_is_yes_no_default, answer_is_yes_no_quit):
1934 (answer_is_okay_cancel): new. From 1.4.3.
1936 * miscellaneous.c (match_multistr): New. Taken from 1.4.3.
1938 * ttyio.c (tty_enable_completion, tty_disable_completion): New
1940 * ttyio.h: Add prototypes and stubs.
1942 2006-04-19 Werner Koch <wk@g10code.com>
1944 * iobuf.c (iobuf_get_fd): New. Taken from 1.4.3.
1945 (iobuf_is_pipe_filename): New.
1946 (pop_filter): Made static.
1947 (iobuf_skip_rest): New. Orginal patch by Florian
1948 Weimer. Added new argument PARTIAL.
1949 (block_filter): Remove the old gpg indeterminate length mode.
1950 (block_filter): Properly handle a partial body stream
1951 that ends with a 5-byte length that happens to be zero.
1952 (iobuf_set_block_mode, iobuf_in_block_mode): Removed as
1954 (iobuf_get_filelength): New arg OVERFLOW.
1955 (iobuf_get_filelength) [W32]: Use GetFileSizeEx if available
1956 * miscellaneous.c (is_file_compressed): Take care of OVERFLOW.
1958 2006-04-18 Werner Koch <wk@g10code.com>
1960 * homedir.c (w32_shgetfolderpath): New. Taken from gpg 1.4.3.
1961 (default_homedir): Use it.
1963 2005-10-08 Marcus Brinkmann <marcus@g10code.de>
1965 * signal.c (get_signal_name): Check value of HAVE_DECL_SYS_SIGLIST
1966 instead of just if it is defined.
1968 2005-09-28 Marcus Brinkmann <marcus@g10code.de>
1970 * Makefile.am (AM_CFLAGS): Add $(LIBASSUAN_CFLAGS).
1972 2005-07-04 Marcus Brinkmann <marcus@g10code.de>
1974 * simple-pwquery.h (simple_pwclear): New prototype.
1975 * simple-pwquery.c (simple_pwclear): New function.
1977 2005-06-15 Werner Koch <wk@g10code.com>
1979 * miscellaneous.c (make_printable_string): Made P a void*.
1981 * sexputil.c (keygrip_from_canon_sexp, cmp_simple_canon_sexp):
1982 Fixed signed/unsigned pointer mismatch.
1983 (make_simple_sexp_from_hexstr): Ditto. This is all too ugly; I
1984 wonder why gcc-4's default is to warn about them and forcing us to
1985 use cast the warning away.
1986 * iobuf.c (block_filter): Ditto.
1987 (iobuf_flush): Ditto.
1988 (iobuf_read_line): Ditto.
1989 (iobuf_read): Make BUFFER a void *.
1990 (iobuf_write): Make BUFFER a const void *.
1991 * ttyio.c (tty_print_utf8_string2): Ditto.
1992 * estream.c (estream_cookie_mem): Make MEMORY unsigned char*.
1993 (es_write): Make BUFFER a void *.
1995 (es_func_fd_read, es_func_fd_write, es_func_mem_read)
1996 (es_func_mem_write): Ditto.
1997 (es_read, es_readn): Ditto.
1998 (es_func_mem_write): Made MEMORY_NEW an unsigned char *.
1999 * estream.h (es_cookie_read_function_t)
2000 (es_cookie_write_function_t): Changed buffer arg to void*.
2002 2005-06-03 Werner Koch <wk@g10code.com>
2004 * estream.c: Use HAVE_CONFIG_H and not USE_CONFIG_H!
2005 (es_func_fd_read, es_func_fd_write): Protect against EINTR.
2007 2005-06-01 Werner Koch <wk@g10code.com>
2009 * Makefile.am (AM_CPPFLAGS): Added.
2011 * util.h: Add some includes for gnulib.
2012 (ttyname, isascii): Define them inline.
2013 * fseeko.c, ftello.c: Removed.
2014 * strsep.c, mkdtemp.c: Removed.
2015 * ttyname.c, isascii.c: Removed.
2017 2005-05-31 Werner Koch <wk@g10code.com>
2019 * dynload.h: s/__inline__/inline/.
2021 2005-05-13 Werner Koch <wk@g10code.com>
2023 * signal.c (got_fatal_signal): Print the signal number if we can't
2025 (get_signal_name): Return NULL if no name is available. Fixed
2026 conditional for sys_siglist to the correct one.
2028 2005-04-17 Werner Koch <wk@g10code.com>
2030 * sexputil.c (cmp_simple_canon_sexp): New.
2031 (make_simple_sexp_from_hexstr): New.
2033 2005-04-07 Werner Koch <wk@g10code.com>
2037 2005-04-11 Marcus Brinkmann <marcus@g10code.de>
2039 * simple-pwquery.c (simple_pwquery): Use spwq_secure_free.
2041 2005-03-03 Werner Koch <wk@g10code.com>
2043 * Makefile.am (AM_CFLAGS): Added PTH_CFLAGS. Noted by Kazu Yamamoto.
2045 2005-02-25 Werner Koch <wk@g10code.com>
2047 * xasprintf.c (xtryasprintf): New.
2049 2005-01-26 Moritz Schulte <moritz@g10code.com>
2051 * Makefile.am (libcommon_a_SOURCES): New source files: estream.c,
2053 * estream.c, estream.h: New files.
2055 2005-01-03 Werner Koch <wk@g10code.com>
2057 * asshelp.c (send_pinentry_environment): Fixed changed from
2058 2004-12-18; cut+paste error for lc-messages.
2060 2004-12-21 Werner Koch <wk@g10code.com>
2062 * simple-pwquery.c (agent_open) [W32]: Implement for W32.
2063 (readline) [W32]: Use recv instead of read.
2064 (writen) [W32]: Use send instead of write.
2065 (my_stpcpy): Define a stpcpy replacement so that this file
2066 continues to be self-contained.
2067 (agent_send_all_options) [W32]: Don't call ttyname.
2069 2004-12-21 Marcus Brinkmann <marcus@g10code.de>
2071 * simple-pwquery.h (simple_query): Add prototype.
2072 * simple-pwquery.c (simple_query): New function.
2074 2004-12-21 Werner Koch <wk@g10code.com>
2076 * signal.c (got_fatal_signal, got_usr_signal)
2077 (got_fatal_signal) [DOSISH]: Don't build.
2078 * simple-gettext.c: Include sysutils.h
2080 * homedir.c: New. Use CSIDL_APPDATA for W32 as the default home
2082 * Makefile.am (libcommon_a_SOURCES): Add it.
2083 (EXTRA_DIST): Removed mkerror and mkerrtok.
2085 2004-12-20 Werner Koch <wk@g10code.com>
2087 * sysutils.h [W32]: Define sleep.
2088 * util.h: Add prototype for mkdtemp.
2090 * membuf.c (put_membuf): Wipe out buffer after a failed realloc.
2092 2004-12-19 Werner Koch <wk@g10code.com>
2094 * maperror.c (map_assuan_err_with_source): Oops, args were swapped.
2096 2004-12-18 Werner Koch <wk@g10code.com>
2098 * maperror.c (map_assuan_err): Renamed to ..
2099 (map_assuan_err_with_source): .. this and add arg SOURCE.c
2100 * asshelp.c (send_pinentry_environment, send_one_option): Add arg
2103 2004-12-15 Werner Koch <wk@g10code.com>
2105 * sysutils.h [W32]: Prototypes for registry functions.
2106 * w32reg.c: Include sysutils.h
2108 * simple-pwquery.c [W32]: Dummy code to allow a build.
2110 * exechelp.c [W32]: Implemented for W32 .
2114 * asshelp.c (send_one_option): New.
2115 (send_pinentry_environment): Cleaned up and made sure that empty
2116 values are not send.
2118 2004-12-07 Werner Koch <wk@g10code.com>
2120 * asshelp.c (send_pinentry_environment) [W32]: Do not use ttyname.
2122 2004-12-06 Werner Koch <wk@g10code.com>
2124 * exechelp.h, exechelp.c: New. Based on code from ../sm/import.c.
2126 2004-12-03 Werner Koch <wk@g10code.com>
2128 * strsep.c: Fixed copyright comments.
2130 2004-11-26 Werner Koch <wk@g10code.com>
2132 * simple-gettext.c: New taken from gnupg 1.3.x
2134 * simple-pwquery.c [_WIN32]: Include winsock2.h.
2135 (agent_open): Disable it until we have our AF_UNIX implementation
2137 * fseeko.c, ftello.c: Include sys/types for the sake of W32.
2139 2004-11-23 Werner Koch <wk@g10code.com>
2141 * b64enc.c: Include stdio.h and string.h
2143 2004-08-18 Werner Koch <wk@g10code.de>
2145 * simple-pwquery.c (simple_pwquery): Handle gpg-error style return
2148 2004-07-20 Werner Koch <wk@g10code.de>
2150 * maperror.c: Removed header ksba.h. Not required anymore.
2152 2004-06-14 Werner Koch <wk@gnupg.org>
2154 * xreadline.c: New. Based on the iobuf_read_line function.
2156 2004-05-12 Werner Koch <wk@gnupg.org>
2158 * util.h (xtrycalloc_secure,xtrymalloc_secure): New.
2160 2004-05-11 Werner Koch <wk@gnupg.org>
2162 * sysutils.c (disable_core_dumps): Only set the current limit.
2163 (enable_core_dumps): New.
2165 2004-04-13 Werner Koch <wk@gnupg.org>
2167 * simple-pwquery.c (copy_and_escape): Relaxed quoting.
2169 2004-04-05 Werner Koch <wk@gnupg.org>
2171 * errors.h (STATUS_NEWSIG): New.
2173 2004-03-11 Werner Koch <wk@gnupg.org>
2175 * dynload.h [__MINGW32__]: Define RTLD_LAZY.
2177 2004-03-09 Werner Koch <wk@gnupg.org>
2179 * maperror.c (map_assuan_err): Map the Locale_Problem item.
2181 2004-03-03 Werner Koch <wk@gnupg.org>
2183 * asshelp.c, asshelp.h: New.
2184 (send_pinentry_environment): New. Code taken from ../sm/call-agent.c.
2186 2004-02-19 Werner Koch <wk@gnupg.org>
2188 * simple-pwquery.c (agent_open): Don't mangle INFOSTR.
2190 2004-02-17 Werner Koch <wk@gnupg.org>
2192 * simple-pwquery.c (agent_open): Ignore an empty GPG_AGENT_INFO.
2194 * errors.h: Added STATUS_IMPORT_OK.
2196 2004-02-10 Werner Koch <wk@gnupg.org>
2198 * b64enc.c: New. Based on code from ../sm/base64.c.
2200 2004-01-30 Marcus Brinkmann <marcus@g10code.de>
2202 * Makefile.am (libcommon_a_SOURCES): Add xasprintf.c.
2203 * miscellaneous.c (xasprintf): Moved to ...
2204 * xasprintf (xasprintf): ... here. New file.
2205 This allows to use xasprintf without sucking in gpg-error.
2207 2004-01-27 Werner Koch <wk@gnupg.org>
2209 * sexp-parse.h: New; moved from../agent.
2211 * util.h (xtoi_4): New.
2213 2003-12-23 Werner Koch <wk@gnupg.org>
2215 * maperror.c (map_assuan_err): Prepared for a new error code.
2217 2003-12-17 Werner Koch <wk@gnupg.org>
2219 * gettime.c (asctimestamp): Add a note on a non-avoidable gcc warning.
2221 * util.h [!HAVE_VASPRINTF]: Add printf format attribute to the
2222 replacement function.
2224 * miscellaneous.c (xasprintf): New.
2226 2003-11-14 Werner Koch <wk@gnupg.org>
2228 * mkdtemp.c (mkdtemp): Use gcry_create_nonce.
2230 * cryptmiss.c: Removed.
2232 2003-11-13 Werner Koch <wk@gnupg.org>
2234 * util.h (vasprintf): Also fixed the prototype.
2236 * vasprintf.c (vasprintf): ARGS should not be a pointer. Fixed
2237 segv on Solaris. Reported by Andrew J. Schorr.
2239 2003-11-12 Werner Koch <wk@gnupg.org>
2241 * maperror.c (map_ksba_err, map_gcry_err, map_kbx_err): Removed.
2243 2003-10-31 Werner Koch <wk@gnupg.org>
2245 * util.h (gnupg_isotime_t): New.
2246 (gnupg_copy_time): New.
2248 * gettime.c (gnupg_get_isotime): New.
2250 2003-09-23 Werner Koch <wk@gnupg.org>
2252 * iobuf.c (check_special_filename): Replaced is isdigit by digitp
2253 to avoid passing negative values and potential locale problems.
2254 Problem noted by Christian Biere.
2256 * util.h (ascii_isspace): New.
2258 2003-09-18 Werner Koch <wk@gnupg.org>
2260 * ttyio.c (tty_fprintf): New.
2261 (tty_print_string, tty_print_utf8_string2)
2262 (tty_print_utf8_string): Made P argument const byte*.
2264 2003-08-20 Marcus Brinkmann <marcus@g10code.de>
2266 * maperror.c (map_ksba_err): Map -1. Use gpg_err_make to set
2269 2003-08-14 Timo Schulz <twoaday@freakmail.de>
2271 * dynload.h. New. W32 wrapper around the dynload mechanism.
2273 2003-07-15 Werner Koch <wk@gnupg.org>
2275 * simple-pwquery.c, simple-pwquery.h: New; moved from ../agent.
2276 * Makefile.am (libsimple_pwquery_a_LIBADD): New.
2278 2003-06-25 Werner Koch <wk@gnupg.org>
2280 * maperror.c (map_to_assuan_status): Directly map 0 to 0.
2282 2003-06-17 Werner Koch <wk@gnupg.org>
2284 * gettime.c (scan_isodatestr,add_days_to_timestamp,strtimevalue)
2285 (strtimestamp,asctimestamp): New. Code taken from gnupg 1.3.2
2288 * yesno.c: New. Code taken from gnupg 1.3.2 mischelp.c
2290 * miscellaneous.c: New.
2292 * util.h: Include utf8conf.h
2294 2003-06-16 Werner Koch <wk@gnupg.org>
2296 * gettime.c (make_timestamp): New.
2298 * ttyio.c: New. Taken from gnupg 1.2.
2299 * ttyio.h: Move from ../include.
2301 2003-06-13 Werner Koch <wk@gnupg.org>
2303 * util.h (seterr): Removed macro.
2304 (xmalloc_secure,xcalloc_secure): New.
2306 2003-06-11 Werner Koch <wk@gnupg.org>
2308 * iobuf.c (iobuf_writebyte,iobuf_write): Return error code from
2310 (iobuf_writestr): Ditto.
2312 2003-06-10 Werner Koch <wk@gnupg.org>
2314 * iobuf.c, iobuf.h: New. Taken from current gnupg 1.3 CVS. Run
2315 indent on it and adjusted error handling to libgpg-error style.
2316 Replaced IOBUF by iobuf_t. Renamed malloc functions.
2318 2003-06-04 Werner Koch <wk@gnupg.org>
2320 * errors.h: Removed all error codes. We keep the status codes for
2322 * Makefile.am: Do not create errors.c anymore; remove it from the
2325 * maperror.c: Don't include error.h. Change all error codes to
2327 (map_assuan_err): Changed to new Assuan error code convention.
2328 (map_to_assuan_status): Likewise.
2329 (map_gcry_err,map_kbx_err): Not needed. For now dummy functions.
2331 * membuf.c, membuf.h: New. Code taken from ../sm/call-agent.h.
2332 * Makefile.am: Added above.
2334 2003-04-29 Werner Koch <wk@gnupg.org>
2336 * util.h (fopencokokie): Removed prototype and struct.
2338 * fopencookie.c: Removed.
2340 * maperror.c: Use system assuan.h
2342 2002-10-31 Neal H. Walfield <neal@g10code.de>
2344 * isascii.c: New file.
2345 * putc_unlocked.c: Likewise.
2347 2002-10-28 Neal H. Walfield <neal@g10code.de>
2349 * signal.c (caught_fatal_sig): Remove superfluous zero
2351 (caught_sigusr1): Likewise.
2353 2002-09-04 Neal H. Walfield <neal@g10code.de>
2355 * vasprintf.c (vasprintf) [va_copy]: Use va_copy.
2356 [!va_copy && __va_copy]: Use __va_copy.
2357 [!va_copy && !__va_copy]: Only now fall back to using memcpy.
2359 2002-08-21 Werner Koch <wk@gnupg.org>
2361 * errors.h: Added STATUS_IMPORT_PROBLEM.
2363 2002-08-20 Werner Koch <wk@gnupg.org>
2365 * vasprintf.c: Hack to handle NULL for %s.
2367 2002-08-09 Werner Koch <wk@gnupg.org>
2369 * signal.c: New. Taken from GnuPG 1.1.91.
2371 2002-07-23 Werner Koch <wk@gnupg.org>
2373 * util.h (_IO_cookie_io_functions_t): Fixed typo. Noted by
2376 2002-07-22 Werner Koch <wk@gnupg.org>
2378 * fseeko.c, ftello.c: New.
2380 2002-06-28 Werner Koch <wk@gnupg.org>
2382 * maperror.c (map_to_assuan_status): Map more errorcodes to Bad
2385 2002-06-26 Werner Koch <wk@gnupg.org>
2387 * maperror.c (map_to_assuan_status): Map EOF to No_Data_Available.
2389 2002-06-10 Werner Koch <wk@gnupg.org>
2391 * errors.h (gnupg_error_token): Add new prototype.
2392 (STATUS_ERROR): New.
2395 * Makefile.am: Use it to create the new error token function.
2397 2002-06-04 Werner Koch <wk@gnupg.org>
2399 * maperror.c (map_to_assuan_status): Map Bad_CA_Certificate.
2401 2002-05-23 Werner Koch <wk@gnupg.org>
2403 * no-pth.c, Makefile.am: Removed.
2405 2002-05-22 Werner Koch <wk@gnupg.org>
2407 * mkdtemp.c: Replaced byte by unsigned char because it is no longer
2408 defined in gcrypt.h.
2410 2002-05-21 Werner Koch <wk@gnupg.org>
2412 * maperror.c (map_gcry_err): Add libgcrypt's new S-expression errors.
2413 (map_ksba_err): Add a few mappings.
2415 2002-05-14 Werner Koch <wk@gnupg.org>
2419 2002-05-03 Werner Koch <wk@gnupg.org>
2421 * errors.h: Added STARUS_EXPSIG and STATUS_EXPKEYSIG.
2423 2002-04-15 Werner Koch <wk@gnupg.org>
2427 2002-02-14 Werner Koch <wk@gnupg.org>
2429 * maperror.c: Add more assuan<->gnupg mappings.
2431 2002-02-12 Werner Koch <wk@gnupg.org>
2433 * fopencookie.c: Dummy function.
2435 * vasprintf.c: New. Taken from binutils-2.9.1 and dropped all non
2436 ANSI-C stuff. Merged with asprintf version.
2440 2002-01-23 Werner Koch <wk@gnupg.org>
2442 * mkdtemp.c: Copied from gnupg-1.0.6c and changed to use libgcrypt.
2444 2002-01-19 Werner Koch <wk@gnupg.org>
2446 * sysutils.c: New. This is the misc.c file from gnupg 1.0.6 with
2447 the OpenPGP stuff removed.
2450 2002-01-15 Werner Koch <wk@gnupg.org>
2452 * maperror.c: Add mapping for Not_Trusted.
2454 2002-01-11 Werner Koch <wk@gnupg.org>
2456 * maperror.c (map_assuan_err): Codes for CRL
2458 2002-01-08 Werner Koch <wk@gnupg.org>
2460 * util.h (spacep): New.
2462 2002-01-02 Werner Koch <wk@gnupg.org>
2464 * maperror.c (map_to_assuan_status): New. Merged from ../agent
2467 2001-12-20 Werner Koch <wk@gnupg.org>
2469 * maperror.c (map_gcry_err): Add some mappings.
2471 2001-12-18 Werner Koch <wk@gnupg.org>
2473 * Makefile.am (AM_CPPFLAGS): Include flags for gcrypt and ksba
2475 2001-12-14 Werner Koch <wk@gnupg.org>
2477 * util.h (digitp, hexdigitp): New ctype like macros.
2478 (atoi_1,atoi_2,atoi_4,xtoi_1,xtoi_2): New.
2481 Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
2482 2009, 2010, 2011 Free Software Foundation, Inc.
2484 This file is free software; as a special exception the author gives
2485 unlimited permission to copy and/or distribute it, with or without
2486 modifications, as long as this notice is preserved.
2488 This file is distributed in the hope that it will be useful, but
2489 WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
2490 implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.