1 2008-02-14 Werner Koch <wk@g10code.com>
3 * assuan-pipe-connect.c (_gpgme_io_spawn): Adjust prototype.
4 (pipe_connect_gpgme, pipe_connect_gpgme): Adjust call.
6 2008-01-04 Marcus Brinkmann <marcus@g10code.de>
8 * assuan-pipe-connect.c (_gpgme_io_pipe)
9 (_gpgme_io_spawn) [_ASSUAN_IN_GPGME_BUILD_ASSUAN]: Add prototypes
10 to silence compiler warning. Reported by Alon Bar-Lev.
12 2007-09-25 Werner Koch <wk@g10code.com>
14 * assuan.h (_assuan_gpg_strerror_r, _assuan_gpg_strsource): Add
17 2007-09-03 Marcus Brinkmann <marcus@g10code.de>
19 * assuan.h [_ASSUAN_EXT_SYM_PREFIX]: Add missing symbol renames
22 2007-08-02 Werner Koch <wk@g10code.com>
24 * assuan-pipe-connect.c (pipe_connect_w32): A bit more debug output.
25 (pipe_connect_w32): Use DETACHED_PROCESS flag.
26 * assuan-logging.c (log_level): New. Use this to disable logging.
27 (assuan_set_assuan_log_level): New.
28 * assuan.h: Add prototype.
30 2007-07-12 Werner Koch <wk@g10code.com>
32 * assuan-handler.c (assuan_get_active_fds): Use get_osfhandle for
34 * assuan-socket.c (_assuan_close) [W32]: Use CloseHandle and not close.
36 * assuan-io.c (_assuan_simple_write, _assuan_simple_read): Map
37 ERROR_BROKEN_PIPE to EPIPE.
39 2007-07-08 Marcus Brinkmann <marcus@g10code.de>
41 * assuan-defs.h (struct assuan_context_s): Have partial peercred
42 structure even if HAVE_W32_SYSTEM, and have full peercred
43 structure only if HAVE_SO_PEERCRED.
44 * assuan-connect.c (assuan_get_peercred) [!HAVE_SO_PEERCRED]: Do
45 not try to set PID, UID and GID.
47 2007-07-04 Marcus Brinkmann <marcus@g10code.de>
49 Change _WIN32 to HAVE_W32_SYSTEM for consistency.
51 * assuan-defs.h (struct assuan_context_s): Have full peercred
52 structure even if not HAVE_SO_PEERCRED, but not if
55 2007-06-18 Werner Koch <wk@g10code.com>
57 * assuan-logging.c (load_libgpg_error, _assuan_gpg_strerror_r)
58 (_assuan_gpg_strsource): New.
59 * assuan-handler.c (process_request) [W32]: Use these new
60 functions for human understable error codes.
62 2007-06-12 Werner Koch <wk@g10code.com>
64 * assuan-io.c (_assuan_simple_read): Hack to allow reading from a
66 (_assuan_simple_write): Likewise.
68 2007-06-11 Werner Koch <wk@g10code.com>
70 * assuan-io-pth.c (_assuan_simple_read, _assuan_simple_write): Use
71 pth versions also for W32.
73 2007-05-29 Werner Koch <wk@g10code.com>
75 * assuan-io-pth.c: Include sys/socket.h only if available. Remove
76 double inclusion of sys/wait.h
78 * assuan-pipe-connect.c (build_w32_commandline): Make ARGV const.
80 * assuan-pipe-server.c (is_valid_socket) [W32]: Do not define.
82 * assuan-socket-server.c [W32]: Include ws2tcpip.h to define
84 * assuan-defs.h (struct assuan_context_s): Define most peercred
85 members only if we can really set them.
86 (_assuan_simple_sendmsg, _assuan_simple_recvmsg) [W32]: Use a
88 * assuan.h (assuan_get_peercred) [W32]: Do not define.
89 * assuan-io.c (_assuan_simple_sendmsg, _assuan_simple_recvmsg)
90 [w32]: Use another prototype.
92 2007-05-09 Werner Koch <wk@g10code.com>
94 * libassuan.m4: Print found version on success.
96 2007-05-01 Werner Koch <wk@g10code.com>
98 * assuan-uds.c (uds_reader): Cast void ptr for arithmetics.
99 Reported by Peter O'Gorman.
101 2006-12-03 Marcus Brinkmann <marcus@g10code.de>
103 * assuan-handler.c (assuan_command_parse_fd): Also allow white
106 2006-12-02 Marcus Brinkmann <marcus@g10code.de>
108 * assuan-uds.c (uds_reader): Return 0 if recvmsg returns 0.
110 2006-12-01 Marcus Brinkmann <marcus@g10code.de>
112 * assuan-client.c (assuan_transact): Also translate some of the
115 2006-11-22 Werner Koch <wk@g10code.com>
117 * assuan-handler.c (fun1_cookie_write, fun2_cookie_write): New.
118 (assuan_get_data_fp) [HAVE_FUNOPEN]: Use it.
120 2006-11-21 Werner Koch <wk@g10code.com>
122 * Makefile.am (libassuan_pth_a_CFLAGS): New.
124 * assuan-pipe-server.c (_assuan_release_context): Free CMDTBL.
126 2006-11-14 Werner Koch <wk@g10code.com>
128 * libassuan.m4 (AM_CHECK_LIBASSUAN): New.
130 * assuan-handler.c (assuan_register_post_cmd_notify)
131 (assuan_register_post_cmd_notify): New.
132 * assuan-util.c (assuan_set_io_monitor): New.
133 * assuan-buffer.c (_assuan_read_line): Use it.
134 (_assuan_write_line): Ditto.
135 (_assuan_cookie_write_data): Ditto.
136 (_assuan_cookie_write_flush): Ditto.
138 2006-10-18 Werner Koch <wk@g10code.com>
140 * libassuan.m4: Pass "pthread" to the common macro. Reported by
143 2006-10-16 Werner Koch <wk@g10code.com>
145 * mkerrors: Map ASSUAN_Not_Confirmed.
147 2006-10-10 Werner Koch <wk@g10code.com>
149 * libassuan.m4 (AM_PATH_LIBASSUAN_PTH)
150 (AM_PATH_LIBASSUAN_PTHREAD): Fixed.
152 * assuan-buffer.c (assuan_sendfd): Implement a runtime detection
153 of implemented descripotr passing.
155 * assuan-uds.c: Take care of USE_DESCRIPTOR_PASSING.
157 * assuan-defs.h: Add missing semicolon.
159 2006-10-09 Werner Koch <wk@g10code.com>
161 * assuan-handler.c (process_request): Use weak pragma for the sake
162 of old gcc's. Reported by Alain Guibert.
164 * assuan-io.c: Removed Pth support.
165 * assuan-io-pth.c: New. Based on assuan-io.c
167 2006-10-06 Werner Koch <wk@g10code.com>
169 * libassuan-config.in: New options --api-version and --thread.
171 2006-10-04 Werner Koch <wk@g10code.com>
173 * assuan-client.c (assuan_transact): Need to map old assuan status
174 codes so that for example CANCELED is correctly mapped.
176 2006-09-28 Marcus Brinkmann <marcus@g10code.de>
178 * assuan-client.c (assuan_transact): Do not convert error on
179 status line, it is already a gpg-error. Do convert
182 2006-09-19 Marcus Brinkmann <marcus@g10code.de>
184 * assuan.h (assuan_init_socket_server_ext)
185 [_ASSUAN_EXT_SYM_PREFIX]: Fix typo in macro.
187 2006-09-19 Werner Koch <wk@g10code.com>
189 * assuan-defs.h (putc_unlocked): Add prototype.
191 * assuan-socket-server.c (accept_connection): Made LEN a socklen_t.
193 * assuan.h: Replaced assuan error code enum by simple defines and
194 made assuan_error_t an int.
195 * mkerrors: Changed parser accordingly.
197 2006-09-19 Marcus Brinkmann <marcus@g10code.de>
199 * assuan-pipe-connect.c: Add hacks for Slowaris.
200 * assuan-socket.c: Likewise here.
202 * assuan.h (enum): Avoid trailing comma in enumerator list. Ugh.
204 * mkerrors (_assuan_error): Change return type to assuan_error_t.
205 * assuan-buffer.c (_assuan_read_line): Change return type to
206 assuan_error_t. Map returned value of -1.
207 (_assuan_write_line): Change type of RC to assuan_error_t.
208 * assuan-defs.h (_assuan_read_line, _assuan_error): Likewise for
211 * assuan-defs.h (unsetenv): Define correctly.
213 2006-09-14 Werner Koch <wk@g10code.com>
215 * assuan-io.c (_assuan_waitpid): New. Changed all waitpid calls
218 * assuan.h (_ASSUAN_DEPRECATED): New internal macro.
219 (assuan_pipe_connect2): Declare deprecated.
220 (assuan_init_connected_socket_server): Declare deprecated.
222 * assuan-connect.c (assuan_get_peercred): New.
223 * assuan-socket-server.c (accept_connection_bottom): Save uid and gid.
225 2006-09-13 Werner Koch <wk@g10code.com>
227 * assuan-client.c (assuan_transact): Need to map the error code.
228 * mkerrors: Need to map ASSUAN_No_Secret_Key.
230 * assuan-pipe-server.c (is_valid_socket): New.
231 (assuan_init_pipe_server): Use UDS with the environmet variable is
232 set and a valid descriptor is given. Ignore FILEDES in this case.
234 * assuan-socket-server.c (assuan_init_socket_server_ext): New.
235 Changed other init fucntions to make use of it.
237 * assuan-handler.c (assuan_command_parse_fd): Allow for lowercase
239 (std_handler_reset): Close pending fds.
240 * assuan-uds.c (uds_receivefd): Fixed.
241 (_assuan_uds_close_fds): New.
243 * assuan-socket-connect.c (assuan_socket_connect_ext): New. Takes
244 all code of assuan_socket_connect plus an option to use sendmsg.
245 * assuan-pipe-connect.c (assuan_pipe_connect_ext): New arg FLAGS.
247 2006-09-12 Werner Koch <wk@g10code.com>
249 * assuan-buffer.c (_assuan_write_line): Also log the prefix.
251 * assuan-defs.h (DIM, DIMof): New.
253 * assuan-domain-server.c: Removed.
254 * assuan-domain-connect.c: Renamed to ..
255 * assuan-uds.c: this.
256 (domain_reader, domain_writer, domain_sendfd, domain_receivefd)
257 (assuan_domain_connect, _assuan_domain_init): Removed.
258 (uds_reader, uds_writer, uds_sendfd, uds_receivefd)
259 (_assuan_init_uds_io): New.
260 (_assuan_uds_deinit): New.
262 * assuan-io.c (_assuan_simple_sendmsg, _assuan_simple_recvmsg): New.
263 (my_pth_fdmode, my_pth_select): New.
265 2006-09-11 Werner Koch <wk@g10code.com>
267 * assuan-pipe-server.c (assuan_init_pipe_server): Allow for
268 FILEDES to be NULL and try to start as a socketpair server in this
271 * assuan-pipe-connect.c (assuan_pipe_connect2): Split up into two
272 functions (unix and w32) for clarity.
273 (pipe_connect_unix): This is the new fucntion. Add USE_CMSG flag.
274 (pipe_connect_w32): Ditto.
275 (initial_handshake): Factored out code.
276 (socketpair_connect): New.
277 (assuan_pipe_connect_ext): New.
278 (do_finish): Handle case if outbound and inbound fd are the same.
279 This is to support socketpairs.
281 2006-09-10 Werner Koch <wk@g10code.com>
283 * assuan-util.c (_assuan_log_print_buffer)
284 (_assuan_log_sanitized_string,assuan_set_log_stream): Moved to ..
285 * assuan-logging.c: .. here.
286 (_assuan_log_print_buffer): Only print the leading bytes in hex
287 log mode unless the new env variable ASSUAN_FULL_LOGGING has been
289 (_assuan_set_default_log_stream): Test this env variable.
291 2006-09-06 Werner Koch <wk@g10code.com>
293 * assuan.h (_ASSUAN_ONLY_GPG_ERRORS): New.
295 * assuan-handler.c (dispatch_command): Use Syntax_Error instead of
298 * assuan-domain-connect.c: Changed alloc malloc/free/realloc to
300 (read_int, write_int): Make args void pointers.
301 (domain_receivefd): Take care of realloc shrinking failure.
303 * assuan-buffer.c (_assuan_read_line, _assuan_write_line)
304 (assuan_write_line, _assuan_cookie_write_data)
305 (_assuan_cookie_write_flush): Print the inbound fd instead of the
306 address of the context when logging I/0. This makes it more
309 2006-09-05 Werner Koch <wk@g10code.com>
311 * assuan-defs.h (err_code, err_is_eof): New.
313 * mkerrors (_assuan_error): New. Wrapped all error code
314 assignments in a call to this.
315 (assuan_strerror): Map gpg-style error codes back. Also print a
316 string for the old EOF code.
317 (assuan_set_assuan_err_source): New.
319 * assuan-logging.c (_assuan_log_printf): Do not change ERRNO and
322 * assuan-domain-connect.c (domain_reader): Replaced plain printf
323 by assuan_log function.
325 2005-10-24 Werner Koch <wk@g10code.com>
327 * putc_unlocked.c, memrchr.c, isascii.c, funopen.c: Changed
328 distribution terms to LGPL. This are small and trivial files so
329 there are no obstacles of doing so.
330 * assuan-socket.c: Likewise, the stated GPL was not intended.
332 2005-10-08 Marcus Brinkmann <marcus@g10code.de>
334 * assuan-defs.h (setenv, unsetenv, clearenv) [!HAVE_SETENV]:
336 * setenv.c: Include "assuan-defs.h".
337 (__add_to_environ): Make static.
339 2005-10-07 Marcus Brinkmann <marcus@g10code.de>
341 * assuan-defs.h (memrchr) [!HAVE_MEMRCHR]: New prototype.
342 (stpcpy) [!HAVE_STPCPY]: Likewise.
343 * stpcpy.c: New LGPL'ed file from the GNU C Library.
344 * setenv.c: New file.
345 * assuan-domain-connect.c (read_int): New function.
346 (write_int): New function.
347 (domain_reader): Use read_int.
348 (domain_sendfd): Use write_int.
350 2005-10-01 Marcus Brinkmann <marcus@g10code.de>
352 * assuan.h (assuan_pipe_connect, assuan_pipe_connect2): Make type
353 of ARGV parameter const in prototype.
354 * assuan-pipe-connect.c (assuan_pipe_connect,
355 assuan_pipe_connect2): Likewise in declaration.
356 (assuan_pipe_connect2): Add braindead cast to make execv happy.
358 * assuan-client.c (assuan_transact): Change LINE, S and D from
359 unsigned char * to char * to silence gcc warning.
360 * assuan-util.c (_assuan_log_sanitized_string): Add explicit cast
361 to silence gcc warning.
362 * assuan-inquire.c (assuan_inquire): Likewise.
364 2005-08-19 Werner Koch <wk@g10code.com>
366 * funopen.c, assuan-socket.c: Copied from libassuan CVS.
367 * assuan-pipe-connect.c (assuan_pipe_connect2): Add missing
370 2005-08-09 Werner Koch <wk@g10code.com>
372 * README.1st: Adjusted to cope with changes done in upstream Assuan.
374 Merged changes for W32 support from libassuan.
376 * assuan.h [_ASSUAN_EXT_SYM_PREFIX]: New.
377 * assuan-io.c [_ASSUAN_NO_PTH]: New.
378 * assuan-pipe-connect.c (fix_signals) [_ASSUAN_NO_FIXED_SIGNALS]: New.
379 (assuan_pipe_connect2) [_ASSUAN_USE_DOUBLE_FORK]: Use double fork.
380 (fix_signals) [_ASSUAN_USE_DOUBLE_FORK]: Do not wait..
381 * assuan-logging.c, assuan-io.c: Include config.h
382 Replaced all usages of _WIN32 by the new HAVE_W32_SYSTEM because
383 there is nothing winning in this API.
384 * assuan-pipe-connect.c (assuan_pipe_connect2) [_WIN32]: Return
385 error Not Imlemented.
386 * assuan-logging.c (_assuan_w32_strerror): New.
387 * assuan-defs.h (w32_strerror): new.
388 * assuan-pipe-connect.c (assuan_pipe_connect2, fix_signals):
389 Factored signal code out to new function.
390 (build_w32_commandline, create_inheritable_pipe): New. Taken
392 (assuan_pipe_connect2) [W32]: Implemented for W32.
393 * assuan-pipe-server.c (assuan_init_pipe_server) [W32]: Map file
394 descriptors using _get_osfhandle.
395 * assuan-socket-connect.c (assuan_socket_connect) [W32]: Allow for
396 a drive letter in the path.
397 * assuan-client.c (assuan_transact): Handle empty and comment
399 * assuan-util.c (_assuan_calloc): Avoid integer overflow.
400 * assuan-util.c (assuan_set_flag, assuan_get_flag): New.
401 * assuan-defs.h (struct assuan_context_s): New field flags.
402 * assuan.h (assuan_flag_t): New with one flag value
403 ASSUAN_NO_WAITPID for now.
404 * assuan-pipe-connect.c (do_finish): Take care of the no_waitpid
406 * mkerrors: Include config.h into assuan-errors.c. This is
407 required so that assuan.h knows about the W32 macro.
409 2005-08-09 Timo Schulz <twoaday@g10code.com> (ported from libassuan by wk)
411 * assuan-io.c (_assuan_simple_read, _assuan_simple_write): W32
413 * assuan-socket.c (_assuan_close): New.
414 (_assuan_sock_new): New.
415 (_assuan_sock_bind): New.
417 2005-03-22 Werner Koch <wk@g10code.com>
419 * assuan-defs.h (struct assuan_io): Renamed elements READ and
420 WRITE to READFNC and WRITEFNC to avoid problems with read defined
421 as macro. Changed callers. Noted by Ville Skyttä.
423 2004-12-16 Marcus Brinkmann <marcus@g10code.de>
425 * assuan-pipe-connect.c (do_finish): Do not wait for child to finish.
426 (assuan_pipe_connect): Use double-fork approach.
427 * assuan-connect.c (assuan_disconnect): Do not write BYE to the
430 2004-12-07 Marcus Brinkmann <marcus@g10code.de>
432 * README.1st: Add copyright notice.
434 2004-06-23 Marcus Brinkmann <marcus@g10code.de>
436 * assuan-domain-connect.c [HAVE_SYS_UIO_H]: Include <sys/uio.h>.
438 * assuan-handler.c: Include <errno.h>.
440 2004-06-08 Marcus Brinkmann <marcus@g10code.de>
442 * assuan-buffer.c (assuan_write_line): If the line is longer than
443 the maximum line length, bail out early.
445 2004-04-21 Werner Koch <wk@gnupg.org>
447 * assuan-socket-server.c (accept_connection_bottom): Save the pid
448 of the peer if it is available.
449 * assuan-socket-connect.c (assuan_socket_connect): Do not save the
450 dummy SERVED_PID arg.
451 * assuan-pipe-connect.c (do_finish): Don't wait if the pid is 0.
452 (assuan_pipe_connect2): Store the parents pid in the environment
454 * assuan-pipe-server.c (assuan_init_pipe_server): Initialize the
455 peer's pid from the environment.
456 * assuan-connect.c (assuan_get_pid): Do not return 0 as a PID.
458 2004-04-19 Werner Koch <wk@gnupg.org>
460 * assuan-socket-server.c, assuan-socket-connect.c: Includes
461 sys/types.h. Reported by Michael Nottebrock.
462 * assuan-domain-connect.c: Ditto.
464 2004-04-13 Werner Koch <wk@gnupg.org>
466 * assuan-util.c (_assuan_log_print_buffer): Relaxed quoting.
467 (_assuan_log_sanitized_string): Ditto.
469 2004-03-14 Werner Koch <wk@gnupg.org>
471 * assuan-handler.c: Include <errno.h>. Reported by Bernd Kuhls.
473 2004-02-18 Werner Koch <wk@gnupg.org>
475 * libassuan-config.in: Ignore setting of --prefix.
477 * assuan-handler.c (assuan_get_data_fp): Fail with ENOSYS if we
478 can't implement this.
480 2004-02-15 Werner Koch <wk@gnupg.org>
482 * memrchr.c (memrchr): Fixed implementation. Taken from gpgme.
484 2004-02-13 Werner Koch <wk@gnupg.org>
486 * assuan-domain-connect.c: Removed the unneeded alloca.h.
488 2004-01-24 Werner Koch <wk@gnupg.org>
490 * assuan-pipe-connect.c (assuan_pipe_connect2): New as an
491 extension of assuan_pipe_connect. Made the latter call this one.
493 2004-01-14 Werner Koch <wk@gnupg.org>
495 * assuan-buffer.c (_assuan_cookie_write_data): Return the
496 requested size to indicate successful operation. Fixes a spurious
497 bug we previously fixed using fflush().
499 2003-12-22 Werner Koch <wk@gnupg.org>
501 * assuan.h (ASSUAN_Locale_Problem): Added.
502 * assuan-errors.c (assuan_strerror): Ditto.
504 2003-12-18 Werner Koch <wk@gnupg.org>
506 * assuan.h (AssuanCommand): Clarified that these are now
507 deprecated and actually useless.
508 (assuan_error_t): Clarified and added ASSUAN_USER_ERROR_FIRST,
509 ASSUAN_USER_ERROR_LAST.
511 2003-12-16 Werner Koch <wk@gnupg.org>
513 * assuan-buffer.c: Changed formatting of the debug output prefix.
514 * assuan-util.c (assuan_set_log_stream): Set global log stream if
515 it has not been done yet.
516 * assuan-logging.c (_assuan_set_default_log_stream): New.
517 (assuan_set_assuan_log_prefix): New.
519 2003-12-11 Werner Koch <wk@gnupg.org>
521 * funopen.c (_assuan_funopen): Renamed from funopen, to keep the
522 name space clean and avoid duplicate definitions if another
523 library uses the same replacement.
524 * assuan-defs.h (funopen): Renamed prototype and add a macro.
526 2003-12-08 Werner Koch <wk@gnupg.org>
530 2003-11-12 Werner Koch <wk@gnupg.org>
532 * assuan-handler.c (process_request): Kludge to print better error
533 messages for gpg-error enabled programs.
535 2003-11-06 Werner Koch <wk@gnupg.org>
537 * assuan.h (assuan_context_t): New. Should be used in favor of
539 (assuan_error_t): New. To be used instead of AssuanError.
541 2003-11-11 Moritz Schulte <mo@g10code.com>
543 * assuan-socket-connect.c (assuan_socket_connect): Fix computation
544 of socket address length.
546 2003-08-13 Werner Koch <wk@gnupg.org>
548 * assuan-inquire.c (assuan_inquire): Increase length of cmdbuf to
551 2003-06-24 Werner Koch <wk@gnupg.org>
553 * mkerrors: Kludge to print libgpg-error values in an easier
556 2003-04-29 Werner Koch <wk@gnupg.org>
558 * libassuan.m4: New. Based on libgrypt.m4.
559 * Makefile.am (m4data_DATA): New.
561 * assuan.h (AssuanCommand): Removed.
563 * assuan-handler.c: Remove the cmd_id element,
564 (assuan_register_command): Likewise. Note that semantics changed.
565 (_assuan_register_std_commands): Adjusted.
567 2003-02-22 Neal H. Walfield <neal@g10code.de>
569 * Makefile.am (bin_SCRIPTS): Renamed from bin_PROGRAMS.
571 2003-02-18 Neal H. Walfield <neal@g10code.de>
573 * Makefile.am (libassuan_a_LIBADD): New variable.
574 * funopen.c: Move from ../common.
575 * isascii.c: Likewise.
576 * memrchr.c: Likewise.
577 * putc_unlocked.c: Likewise.
579 2003-02-18 Neal H. Walfield <neal@g10code.de>
581 * assuan-handler.c (_IO_cookie_io_functions_t): Remove.
582 (cookie_io_functions_t): Remove.
583 (fopencookie): Remove prototype.
584 (assuan_get_data_fp): Use funopen, not fopencookie.
586 2003-02-18 Neal H. Walfield <neal@g10code.de>
588 * libassuan-config.in: New file.
589 * Makefile.am (bin_PROGRAMS): New variable.
591 2003-02-17 Neal H. Walfield <neal@g10code.de>
593 * .cvsignore: New file.
595 2003-02-17 Neal H. Walfield <neal@g10code.de>
597 * Makefile.am (lib_LIBRARIES): Use this instead of . . .
598 (noinst_LIBRARIES): . . . this.
599 (include_HEADERS): New variable.
600 (libassuan_a_SOURCES): Remove assuan.h, add assuan-logging.c.
602 * assuan.h (assuan_set_assuan_log_stream): New prototype.
603 (assuan_get_assuan_log_stream): Likewise.
604 (assuan_get_assuan_log_prefix): Likewise.
605 * assuan-logging.c: New file.
607 * assuan-buffer.c [HAVE_JNLIB_LOGGIN]: Do not include
608 "../jnlib/logging.h".
609 (my_log_prefix): Remove function.
610 (_assuan_read_line): Use assuan_get_assuan_log_prefix in lieu of
612 (assuan_write_line): Likewise.
613 (_assuan_cookie_write_data): Likewise.
614 (_assuan_cookie_write_flush): Likewise.
615 * assuan-domain-connect.c (LOGERROR, LOGERROR1, LOGERROR2,
618 (domain_reader): Use it.
619 (domain_writer): Likewise.
620 (domain_sendfd): Likewise.
621 (domain_receivefd): Likewise.
622 (_assuan_domain_init): Likewise.
623 (assuan_domain_connect): Likewise.
624 * assuan-pipe-connect.c [HAVE_JNLIB_LOGGIN]: Do not include
625 "../jnlib/logging.h".
626 (LOGERROR, LOGERROR1, LOGERROR2, LOGERRORX): Remove.
628 (assuan_pipe_connect): Use it.
629 * assuan-socket-connect.c [HAVE_JNLIB_LOGGIN]: Do not include
630 "../jnlib/logging.h".
631 (LOGERROR, LOGERROR1, LOGERROR2, LOGERRORX): Remove.
633 (assuan_socket_connect): Use it.
634 (socket_reader): Remove dead code.
635 (socket_writer): Likewise.
636 * assuan-util.c [HAVE_JNLIB_LOGGIN]: Do not include
637 "../jnlib/logging.h".
638 (_assuan_log_sanitized_string): Use assuan_get_assuan_log_stream,
641 2002-11-24 Neal H. Walfield <neal@g10code.de>
643 * assuan.h (assuan_command_parse_fd): New prototype.
644 * assuan-handler.c (assuan_command_parse_fd): Rename from
645 parse_cmd_input_output. Export.
646 (std_handler_input): Update to use assuan_command_parse_fd.
647 (std_handler_output): Likewise.
649 2002-11-24 Neal H. Walfield <neal@g10code.de>
651 * assuan.h (assuan_sendfd): New prototype.
652 (assuan_receivefd): New prototype.
653 * assuan-buffer.c (assuan_sendfd): New function.
654 (assuan_receivefd): New function.
655 * assuan-handler.c (parse_cmd_input_output): Recognize incoming
656 file descriptors and act appropriately.
657 * assuan-defs.h (struct assuan_io): Add fields sendfd and
659 (struct assuan_context_s): Add fields pendingfds and
661 * assuan-pipe-server.c (_assuan_new_context): Update IO to reflect
663 * assuan-domain-connect.c (do_deinit): Cleanup any unreceived file
665 (domain_reader): Receive file descriptors.
666 (domain_sendfd): New function.
667 (domain_receivefd): New function.
668 (_assuan_domain_init): Update initialization code to reflect new
671 2002-11-24 Neal H. Walfield <neal@g10code.de>
673 * assuan-domain-connect.c (do_finish): Remove.
674 (_assuan_domain_init): Use default handlers where possible.
675 Add an assert and update comments.
676 * assuan-domain-server.c (accept_connection): Remove.
677 (assuan_init_domain_server): Use default handlers where possible.
678 Put the server in pipe mode: it can only be used by a single
681 2002-11-24 Neal H. Walfield <neal@g10code.de>
683 * assuan.h: Add prototype for assuan_domain_connect and
684 assuan_init_domain_server.
685 * assuan-defs.h: Include <unistd.h>.
686 Add prototype for _assuan_domain_init.
687 * assuan-domain-connect.c: New file.
688 * assuan-domain-server.c: New file.
689 * Makefile.am (libassuan_a_SOURCES): Add assuan-domain-connect.c
690 and assuan-domain-server.c
692 2002-11-23 Neal H. Walfield <neal@g10code.de>
694 * Makefile.am (libassuan_a_SOURCES): Add assuan-io.c.
695 * assuan-io.c: Restore.
696 (_assuan_simple_read): Rename from _assuan_read.
697 (_assuan_simple_write): Rename from _assuan_write.
698 * assuan-defs.h (_assuan_simple_read): New prototype.
699 (_assuan_simple_write): Likewise.
700 * assuan-pipe-server.c (pipe_reader): Remove.
701 (pipe_writer): Remove.
702 (_assuan_new_context): Initialize IO is with _assuan_simple_read
703 and _assuan_simple_write.
704 * assuan-socket-connect.c (socket_reader): Remove.
705 (socket_writer): Remove.
706 (assuan_socket_connect): Initialize IO is with _assuan_simple_read
707 and _assuan_simple_write.
708 * assuan-socket-server.c (io): New local variable.
709 (assuan_init_socket_server): Initialize CTX->io.
710 (assuan_init_connected_socket_server): Likewise.
712 2002-11-23 Neal H. Walfield <neal@g10code.de>
714 * assuan-buffer.c (readline): Use memrchr.
715 (_assuan_read_line): Rewritten to use the string functions.
717 2002-11-20 Neal H. Walfield <neal@g10code.de>
719 * assuan-socket-connect.c (assuan_socket_connect): Pass PF_LOCAL
720 to socket(), not AF_UNIX: it expects a PF_* macro and the former
722 (assuan_socket_connect): Use AF_LOCAL, not AF_UNIX which is more
725 2002-11-20 Neal H. Walfield <neal@g10code.de>
727 * assuan-defs.h (struct assuan_io): New structure.
728 (struct assuan_context_s): New field, io.
729 (_assuan_read): Depreciated.
730 (_assuan_write): Likewise.
731 * assuan-pipe-server.c: Include <unistd.h>.
732 (pipe_reader): New function.
733 (pipe_writer): Likewise.
734 (_assuan_new_context.IO): New local static. Set to pipe_reader
735 and pipe_writer. Use it to initialize new context.
736 * assuan-socket-connect.c (socket_reader): New function.
737 (socket_writer): New function.
738 (assuan_socket_connect.IO): New local static. Set to socket_reader
739 and socket_writer. Use it to initialize new context.
740 * assuan-buffer.c (writen): Take an ASSUAN_CONTEXT rather than a
741 file descriptor. Do not use _assuan_write but the write method
742 in the supplied context.
743 (readline): Likewise for _assuan_read.
744 (assuan_write_line): When calling writen, pass CTX; not the file
746 (_assuan_cookie_write_data): Likewise.
747 (_assuan_cookie_write_flush): Likewise.
748 (_assuan_read_line): Likewise for readline.
749 * Makefile.am (libassuan_a_SOURCES): Remove assuan-io.c.
750 * assuan-io.c: Removed.
752 2002-11-10 Werner Koch <wk@gnupg.org>
754 * assuan-pipe-connect.c (assuan_pipe_connect): Changed the order
755 of the dups to handle cases where we have already used fd 2 for
758 2002-10-31 Neal H. Walfield <neal@g10code.de>
760 * assuan-util.c: Include <ctype.h>.
761 (_assuan_log_print_buffer): Elide the magic numbers preferring the
762 standard isfoo functions. Use putc_unlocked where possible.
763 (_assuan_log_sanitized_string): Rewrite to use putc_unlocked and
766 2002-09-05 Neal H. Walfield <neal@g10code.de>
768 * assuan-defs.h (_assuan_read_wrapper): Depreciated.
769 * assuan-util.c (_assuan_read_wrapper): Removed.
770 * assuan-defs.h (_assuan_write_wrapper): Depreciated.
771 * assuan-util.c (_assuan_write_wrapper): Removed.
772 * assuan.h (assuan_set_io_fun): Depreciated.
773 * assuan-util.c (assuan_set_io_fun): Removed.
775 * assuan-defs.h (_assuan_read): New function.
776 (_assuan_write): Likewise.
777 * assuan-io.c: New file.
779 * assuan-buffer.c (writen): Use _assuan_write rather than doing
781 (readline): Likewise for _assuan_read.
783 * Makefile.am (libassuan_a_SOURCES): Add assuan-io.c.
785 2002-08-16 Werner Koch <wk@gnupg.org>
787 * assuan.h: Renamed Bad_Certificate_Path to Bad_Certificate_Chain.
789 2002-07-30 Werner Koch <wk@gnupg.org>
791 Changed the license from GPL to LGPL.
793 2002-07-23 Werner Koch <wk@gnupg.org>
795 * assuan-handler.c (_IO_cookie_io_functions_t): Define it here if
798 2002-06-27 Werner Koch <wk@gnupg.org>
800 * assuan-pipe-connect.c (assuan_pipe_connect): No special handling
801 for the log_fd and stderr. Connect stderr to /dev/null if it
802 should not be retained.
804 2002-06-26 Werner Koch <wk@gnupg.org>
806 * assuan-buffer.c (assuan_write_line): Make sure we never
807 accidently print an extra LF.
809 2002-05-23 Werner Koch <wk@gnupg.org>
811 * assuan-util.c (assuan_set_io_func): New.
812 * assuan-buffer.c (writen, readline): Use the new functions
814 * assuan-socket-server.c (accept_connection): Don't use the
815 pth_accept - using the assuan included accept code would be a bad
816 idea within Pth so we don't need a replacement function.
818 2002-05-22 Werner Koch <wk@gnupg.org>
820 * assuan-socket-server.c (assuan_init_connected_socket_server): New.
821 (accept_connection): Factored most code out to..
822 (accept_connection_bottom): .. new function.
824 2002-04-04 Werner Koch <wk@gnupg.org>
826 * assuan-buffer.c (my_log_prefix): New. Use it for all i/o debug
829 2002-03-06 Werner Koch <wk@gnupg.org>
831 * assuan-client.c (_assuan_read_from_server): Detect END.
832 (assuan_transact): Pass it to the data callback.
834 2002-02-27 Werner Koch <wk@gnupg.org>
836 * assuan-client.c (assuan_transact): Add 2 more arguments to
837 support status lines. Passing NULL yields the old behaviour.
839 * assuan-handler.c (process_request): Flush data lines send
840 without using the data fp.
842 2002-02-14 Werner Koch <wk@gnupg.org>
844 * assuan-inquire.c (assuan_inquire): Check for a cancel command
845 and return ASSUAN_Canceled. Allow for non-data inquiry.
847 * assuan.h: Add a few token specific error codes.
849 2002-02-13 Werner Koch <wk@gnupg.org>
851 * assuan-defs.h (assuan_context_s): New var CLIENT_PID.
852 * assuan-pipe-server.c (_assuan_new_context): set default value.
853 * assuan-socket-server.c (accept_connection): get the actual pid.
855 2002-02-12 Werner Koch <wk@gnupg.org>
857 * assuan-buffer.c (writen,readline) [USE_GNU_PT]: Use pth_read/write.
858 * assuan-socket-server.c (accept_connection) [USE_GNU_PTH]: Ditto.
860 2002-02-01 Marcus Brinkmann <marcus@g10code.de>
862 * Makefile.am (MOSTLYCLEANFILES): New variable.
864 2002-01-23 Werner Koch <wk@gnupg.org>
866 * assuan-socket-connect.c (LOGERRORX): and removed typo.
868 2002-01-22 Marcus Brinkmann <marcus@g10code.de>
870 * assuan-socket-connect.c (LOGERRORX): Reverse arguments to fputs.
872 2002-01-21 Werner Koch <wk@gnupg.org>
874 * assuan-connect.c: Move all except assuan_get_pid to...
875 * assuan-pipe-connect.c: this.
876 (assuan_pipe_disconnect): Removed.
877 (do_finish, do_deinit): New
878 (assuan_pipe_connect): and set them into the context.
879 * assuan-socket-connect.c: New.
881 * assuan-util.c (_assuan_log_sanitized_string): New.
883 * assuan-pipe-server.c (assuan_init_pipe_server): Factored most
885 (_assuan_new_context): new func.
886 (_assuan_release_context): New
887 * assuan-connect.c (assuan_pipe_connect): Use the new functions.
889 2002-01-20 Werner Koch <wk@gnupg.org>
891 * assuan.h: Added Invalid Option error code.
893 * assuan-handler.c (std_handler_option): New.
894 (std_cmd_tbl): Add OPTION as standard command.
895 (assuan_register_option_handler): New.
896 (dispatch_command): Use case insensitive matching as a fallback.
897 (my_strcasecmp): New.
899 2002-01-19 Werner Koch <wk@gnupg.org>
901 * assuan-buffer.c (_assuan_read_line): Add output logging.
902 (assuan_write_line): Ditto.
903 (_assuan_cookie_write_data): Ditto.
904 (_assuan_cookie_write_flush): Ditto.
905 * assuan-util.c (_assuan_log_print_buffer): New.
906 (assuan_set_log_stream): New.
907 (assuan_begin_confidential): New.
908 (assuan_end_confidential): New.
910 * assuan-defs.h: Add a few handler variables.
911 * assuan-pipe-server.c (assuan_deinit_pipe_server): Removed.
912 (deinit_pipe_server): New.
913 (assuan_deinit_server): New. Changed all callers to use this.
914 * assuan-listen.c (assuan_accept): Use the accept handler.
915 * assuan-handler.c (process_request): Use the close Handler.
916 * assuan-socket-server.c: New.
918 2002-01-14 Werner Koch <wk@gnupg.org>
920 * assuan-client.c (_assuan_read_from_server): Skip spaces after
923 2002-01-03 Werner Koch <wk@gnupg.org>
925 * assuan-handler.c (assuan_set_okay_line): New.
926 (process_request): And use it here.
928 2002-01-02 Werner Koch <wk@gnupg.org>
930 * assuan-inquire.c (init_membuf,put_membuf,get_membuf): Apply a
931 hidden 0 behind the buffer so that the buffer can be used as a
932 string in certain contexts.
934 2001-12-14 Marcus Brinkmann <marcus@g10code.de>
936 * assuan-connect.c (assuan_pipe_connect): New argument
937 FD_CHILD_LIST. Don't close those fds.
938 * assuan.h: Likewise for prototype.
940 2001-12-14 Werner Koch <wk@gnupg.org>
942 * assuan-listen.c (assuan_close_input_fd): New.
943 (assuan_close_output_fd): New.
944 * assuan-handler.c (std_handler_reset): Always close them after a
946 (std_handler_bye): Likewise.
948 2001-12-14 Marcus Brinkmann <marcus@g10code.de>
950 * assuan-buffer.c (_assuan_read_line): New variable ATTICLEN, use
951 it to save the length of the attic line.
952 Rediddle the code a bit to make it more clear what happens.
954 2001-12-14 Marcus Brinkmann <marcus@g10code.de>
956 * assuan-defs.h (LINELENGTH): Define as ASSUAN_LINELENGTH.
957 assuan.h: Define ASSUAN_LINELENGTH.
959 2001-12-13 Marcus Brinkmann <marcus@g10code.de>
961 * assuan-buffer.c (assuan_read_line): Fix order of execution to
962 get correct return values.
964 2001-12-13 Werner Koch <wk@gnupg.org>
966 * assuan-handler.c (assuan_get_active_fds): Fixed silly bug,
967 pretty obvious that nobody ever tested this function.
969 2001-12-12 Werner Koch <wk@gnupg.org>
971 * assuan-connect.c (assuan_pipe_connect): Implemented the inital
973 * assuan-client.c (read_from_server): Renamed to
974 (_assuan_read_from_server): this and made external.
976 * assuan-listen.c (assuan_set_hello_line): New.
977 (assuan_accept): Use a custom hello line is available.
979 * assuan-buffer.c (assuan_read_line): New.
980 (assuan_pending_line): New.
981 (_assuan_write_line): Renamed to ..
982 (assuan_write_line): this, made public and changed all callers.
984 2001-12-04 Werner Koch <wk@gnupg.org>
986 * assuan-connect.c (assuan_pipe_connect): Add more error reporting.
987 * assuan-client.c: New.
989 * assuan-inquire.c: New.
990 * assuan-handler.c (process_request): Check for nested invocations.
992 2001-11-27 Werner Koch <wk@gnupg.org>
994 * assuan-handler.c (assuan_register_input_notify): New.
995 (assuan_register_output_notify): New.
997 2001-11-26 Werner Koch <wk@gnupg.org>
999 * assuan.h: Added more status codes.
1001 2001-11-25 Werner Koch <wk@gnupg.org>
1003 * assuan-handler.c (assuan_register_bye_notify)
1004 (assuan_register_reset_notify)
1005 (assuan_register_cancel_notify): New and call them from the
1007 (assuan_process): Moved bulk of function to ..
1008 (process_request): .. new.
1009 (assuan_process_next): One shot version of above.
1010 (assuan_get_active_fds): New.
1012 2001-11-24 Werner Koch <wk@gnupg.org>
1014 * assuan-connect.c (assuan_get_pid): New.
1016 * assuan-buffer.c (_assuan_read_line): Deal with reads of more
1018 * assuan-defs.h: Add space in the context for this.
1021 Copyright 2001, 2002, 2006 Free Software Foundation, Inc.
1023 This file is free software; as a special exception the author gives
1024 unlimited permission to copy and/or distribute it, with or without
1025 modifications, as long as this notice is preserved.
1027 This file is distributed in the hope that it will be useful, but
1028 WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
1029 implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.