1 2007-07-12 Werner Koch <wk@g10code.com>
3 * assuan-io.c (_assuan_simple_write, _assuan_simple_read): Map
4 ERROR_BROKEN_PIPE to EPIPE.
6 2007-07-08 Marcus Brinkmann <marcus@g10code.de>
8 * assuan-defs.h (struct assuan_context_s): Have partial peercred
9 structure even if HAVE_W32_SYSTEM, and have full peercred
10 structure only if HAVE_SO_PEERCRED.
11 * assuan-connect.c (assuan_get_peercred) [!HAVE_SO_PEERCRED]: Do
12 not try to set PID, UID and GID.
14 2007-07-04 Marcus Brinkmann <marcus@g10code.de>
16 Change _WIN32 to HAVE_W32_SYSTEM for consistency.
18 * assuan-defs.h (struct assuan_context_s): Have full peercred
19 structure even if not HAVE_SO_PEERCRED, but not if
22 2007-06-18 Werner Koch <wk@g10code.com>
24 * assuan-logging.c (load_libgpg_error, _assuan_gpg_strerror_r)
25 (_assuan_gpg_strsource): New.
26 * assuan-handler.c (process_request) [W32]: Use these new
27 functions for human understable error codes.
29 2007-06-12 Werner Koch <wk@g10code.com>
31 * assuan-io.c (_assuan_simple_read): Hack to allow reading from a
33 (_assuan_simple_write): Likewise.
35 2007-06-11 Werner Koch <wk@g10code.com>
37 * assuan-io-pth.c (_assuan_simple_read, _assuan_simple_write): Use
38 pth versions also for W32.
40 2007-05-29 Werner Koch <wk@g10code.com>
42 * assuan-io-pth.c: Include sys/socket.h only if available. Remove
43 double inclusion of sys/wait.h
45 * assuan-pipe-connect.c (build_w32_commandline): Make ARGV const.
47 * assuan-pipe-server.c (is_valid_socket) [W32]: Do not define.
49 * assuan-socket-server.c [W32]: Include ws2tcpip.h to define
51 * assuan-defs.h (struct assuan_context_s): Define most peercred
52 members only if we can really set them.
53 (_assuan_simple_sendmsg, _assuan_simple_recvmsg) [W32]: Use a
55 * assuan.h (assuan_get_peercred) [W32]: Do not define.
56 * assuan-io.c (_assuan_simple_sendmsg, _assuan_simple_recvmsg)
57 [w32]: Use another prototype.
59 2007-05-09 Werner Koch <wk@g10code.com>
61 * libassuan.m4: Print found version on success.
63 2007-05-01 Werner Koch <wk@g10code.com>
65 * assuan-uds.c (uds_reader): Cast void ptr for arithmetics.
66 Reported by Peter O'Gorman.
68 2006-12-03 Marcus Brinkmann <marcus@g10code.de>
70 * assuan-handler.c (assuan_command_parse_fd): Also allow white
73 2006-12-02 Marcus Brinkmann <marcus@g10code.de>
75 * assuan-uds.c (uds_reader): Return 0 if recvmsg returns 0.
77 2006-12-01 Marcus Brinkmann <marcus@g10code.de>
79 * assuan-client.c (assuan_transact): Also translate some of the
82 2006-11-22 Werner Koch <wk@g10code.com>
84 * assuan-handler.c (fun1_cookie_write, fun2_cookie_write): New.
85 (assuan_get_data_fp) [HAVE_FUNOPEN]: Use it.
87 2006-11-21 Werner Koch <wk@g10code.com>
89 * Makefile.am (libassuan_pth_a_CFLAGS): New.
91 * assuan-pipe-server.c (_assuan_release_context): Free CMDTBL.
93 2006-11-14 Werner Koch <wk@g10code.com>
95 * libassuan.m4 (AM_CHECK_LIBASSUAN): New.
97 * assuan-handler.c (assuan_register_post_cmd_notify)
98 (assuan_register_post_cmd_notify): New.
99 * assuan-util.c (assuan_set_io_monitor): New.
100 * assuan-buffer.c (_assuan_read_line): Use it.
101 (_assuan_write_line): Ditto.
102 (_assuan_cookie_write_data): Ditto.
103 (_assuan_cookie_write_flush): Ditto.
105 2006-10-18 Werner Koch <wk@g10code.com>
107 * libassuan.m4: Pass "pthread" to the common macro. Reported by
110 2006-10-16 Werner Koch <wk@g10code.com>
112 * mkerrors: Map ASSUAN_Not_Confirmed.
114 2006-10-10 Werner Koch <wk@g10code.com>
116 * libassuan.m4 (AM_PATH_LIBASSUAN_PTH)
117 (AM_PATH_LIBASSUAN_PTHREAD): Fixed.
119 * assuan-buffer.c (assuan_sendfd): Implement a runtime detection
120 of implemented descripotr passing.
122 * assuan-uds.c: Take care of USE_DESCRIPTOR_PASSING.
124 * assuan-defs.h: Add missing semicolon.
126 2006-10-09 Werner Koch <wk@g10code.com>
128 * assuan-handler.c (process_request): Use weak pragma for the sake
129 of old gcc's. Reported by Alain Guibert.
131 * assuan-io.c: Removed Pth support.
132 * assuan-io-pth.c: New. Based on assuan-io.c
134 2006-10-06 Werner Koch <wk@g10code.com>
136 * libassuan-config.in: New options --api-version and --thread.
138 2006-10-04 Werner Koch <wk@g10code.com>
140 * assuan-client.c (assuan_transact): Need to map old assuan status
141 codes so that for example CANCELED is correctly mapped.
143 2006-09-28 Marcus Brinkmann <marcus@g10code.de>
145 * assuan-client.c (assuan_transact): Do not convert error on
146 status line, it is already a gpg-error. Do convert
149 2006-09-19 Marcus Brinkmann <marcus@g10code.de>
151 * assuan.h (assuan_init_socket_server_ext)
152 [_ASSUAN_EXT_SYM_PREFIX]: Fix typo in macro.
154 2006-09-19 Werner Koch <wk@g10code.com>
156 * assuan-defs.h (putc_unlocked): Add prototype.
158 * assuan-socket-server.c (accept_connection): Made LEN a socklen_t.
160 * assuan.h: Replaced assuan error code enum by simple defines and
161 made assuan_error_t an int.
162 * mkerrors: Changed parser accordingly.
164 2006-09-19 Marcus Brinkmann <marcus@g10code.de>
166 * assuan-pipe-connect.c: Add hacks for Slowaris.
167 * assuan-socket.c: Likewise here.
169 * assuan.h (enum): Avoid trailing comma in enumerator list. Ugh.
171 * mkerrors (_assuan_error): Change return type to assuan_error_t.
172 * assuan-buffer.c (_assuan_read_line): Change return type to
173 assuan_error_t. Map returned value of -1.
174 (_assuan_write_line): Change type of RC to assuan_error_t.
175 * assuan-defs.h (_assuan_read_line, _assuan_error): Likewise for
178 * assuan-defs.h (unsetenv): Define correctly.
180 2006-09-14 Werner Koch <wk@g10code.com>
182 * assuan-io.c (_assuan_waitpid): New. Changed all waitpid calls
185 * assuan.h (_ASSUAN_DEPRECATED): New internal macro.
186 (assuan_pipe_connect2): Declare deprecated.
187 (assuan_init_connected_socket_server): Declare deprecated.
189 * assuan-connect.c (assuan_get_peercred): New.
190 * assuan-socket-server.c (accept_connection_bottom): Save uid and gid.
192 2006-09-13 Werner Koch <wk@g10code.com>
194 * assuan-client.c (assuan_transact): Need to map the error code.
195 * mkerrors: Need to map ASSUAN_No_Secret_Key.
197 * assuan-pipe-server.c (is_valid_socket): New.
198 (assuan_init_pipe_server): Use UDS with the environmet variable is
199 set and a valid descriptor is given. Ignore FILEDES in this case.
201 * assuan-socket-server.c (assuan_init_socket_server_ext): New.
202 Changed other init fucntions to make use of it.
204 * assuan-handler.c (assuan_command_parse_fd): Allow for lowercase
206 (std_handler_reset): Close pending fds.
207 * assuan-uds.c (uds_receivefd): Fixed.
208 (_assuan_uds_close_fds): New.
210 * assuan-socket-connect.c (assuan_socket_connect_ext): New. Takes
211 all code of assuan_socket_connect plus an option to use sendmsg.
212 * assuan-pipe-connect.c (assuan_pipe_connect_ext): New arg FLAGS.
214 2006-09-12 Werner Koch <wk@g10code.com>
216 * assuan-buffer.c (_assuan_write_line): Also log the prefix.
218 * assuan-defs.h (DIM, DIMof): New.
220 * assuan-domain-server.c: Removed.
221 * assuan-domain-connect.c: Renamed to ..
222 * assuan-uds.c: this.
223 (domain_reader, domain_writer, domain_sendfd, domain_receivefd)
224 (assuan_domain_connect, _assuan_domain_init): Removed.
225 (uds_reader, uds_writer, uds_sendfd, uds_receivefd)
226 (_assuan_init_uds_io): New.
227 (_assuan_uds_deinit): New.
229 * assuan-io.c (_assuan_simple_sendmsg, _assuan_simple_recvmsg): New.
230 (my_pth_fdmode, my_pth_select): New.
232 2006-09-11 Werner Koch <wk@g10code.com>
234 * assuan-pipe-server.c (assuan_init_pipe_server): Allow for
235 FILEDES to be NULL and try to start as a socketpair server in this
238 * assuan-pipe-connect.c (assuan_pipe_connect2): Split up into two
239 functions (unix and w32) for clarity.
240 (pipe_connect_unix): This is the new fucntion. Add USE_CMSG flag.
241 (pipe_connect_w32): Ditto.
242 (initial_handshake): Factored out code.
243 (socketpair_connect): New.
244 (assuan_pipe_connect_ext): New.
245 (do_finish): Handle case if outbound and inbound fd are the same.
246 This is to support socketpairs.
248 2006-09-10 Werner Koch <wk@g10code.com>
250 * assuan-util.c (_assuan_log_print_buffer)
251 (_assuan_log_sanitized_string,assuan_set_log_stream): Moved to ..
252 * assuan-logging.c: .. here.
253 (_assuan_log_print_buffer): Only print the leading bytes in hex
254 log mode unless the new env variable ASSUAN_FULL_LOGGING has been
256 (_assuan_set_default_log_stream): Test this env variable.
258 2006-09-06 Werner Koch <wk@g10code.com>
260 * assuan.h (_ASSUAN_ONLY_GPG_ERRORS): New.
262 * assuan-handler.c (dispatch_command): Use Syntax_Error instead of
265 * assuan-domain-connect.c: Changed alloc malloc/free/realloc to
267 (read_int, write_int): Make args void pointers.
268 (domain_receivefd): Take care of realloc shrinking failure.
270 * assuan-buffer.c (_assuan_read_line, _assuan_write_line)
271 (assuan_write_line, _assuan_cookie_write_data)
272 (_assuan_cookie_write_flush): Print the inbound fd instead of the
273 address of the context when logging I/0. This makes it more
276 2006-09-05 Werner Koch <wk@g10code.com>
278 * assuan-defs.h (err_code, err_is_eof): New.
280 * mkerrors (_assuan_error): New. Wrapped all error code
281 assignments in a call to this.
282 (assuan_strerror): Map gpg-style error codes back. Also print a
283 string for the old EOF code.
284 (assuan_set_assuan_err_source): New.
286 * assuan-logging.c (_assuan_log_printf): Do not change ERRNO and
289 * assuan-domain-connect.c (domain_reader): Replaced plain printf
290 by assuan_log function.
292 2005-10-24 Werner Koch <wk@g10code.com>
294 * putc_unlocked.c, memrchr.c, isascii.c, funopen.c: Changed
295 distribution terms to LGPL. This are small and trivial files so
296 there are no obstacles of doing so.
297 * assuan-socket.c: Likewise, the stated GPL was not intended.
299 2005-10-08 Marcus Brinkmann <marcus@g10code.de>
301 * assuan-defs.h (setenv, unsetenv, clearenv) [!HAVE_SETENV]:
303 * setenv.c: Include "assuan-defs.h".
304 (__add_to_environ): Make static.
306 2005-10-07 Marcus Brinkmann <marcus@g10code.de>
308 * assuan-defs.h (memrchr) [!HAVE_MEMRCHR]: New prototype.
309 (stpcpy) [!HAVE_STPCPY]: Likewise.
310 * stpcpy.c: New LGPL'ed file from the GNU C Library.
311 * setenv.c: New file.
312 * assuan-domain-connect.c (read_int): New function.
313 (write_int): New function.
314 (domain_reader): Use read_int.
315 (domain_sendfd): Use write_int.
317 2005-10-01 Marcus Brinkmann <marcus@g10code.de>
319 * assuan.h (assuan_pipe_connect, assuan_pipe_connect2): Make type
320 of ARGV parameter const in prototype.
321 * assuan-pipe-connect.c (assuan_pipe_connect,
322 assuan_pipe_connect2): Likewise in declaration.
323 (assuan_pipe_connect2): Add braindead cast to make execv happy.
325 * assuan-client.c (assuan_transact): Change LINE, S and D from
326 unsigned char * to char * to silence gcc warning.
327 * assuan-util.c (_assuan_log_sanitized_string): Add explicit cast
328 to silence gcc warning.
329 * assuan-inquire.c (assuan_inquire): Likewise.
331 2005-08-19 Werner Koch <wk@g10code.com>
333 * funopen.c, assuan-socket.c: Copied from libassuan CVS.
334 * assuan-pipe-connect.c (assuan_pipe_connect2): Add missing
337 2005-08-09 Werner Koch <wk@g10code.com>
339 * README.1st: Adjusted to cope with changes done in upstream Assuan.
341 Merged changes for W32 support from libassuan.
343 * assuan.h [_ASSUAN_EXT_SYM_PREFIX]: New.
344 * assuan-io.c [_ASSUAN_NO_PTH]: New.
345 * assuan-pipe-connect.c (fix_signals) [_ASSUAN_NO_FIXED_SIGNALS]: New.
346 (assuan_pipe_connect2) [_ASSUAN_USE_DOUBLE_FORK]: Use double fork.
347 (fix_signals) [_ASSUAN_USE_DOUBLE_FORK]: Do not wait..
348 * assuan-logging.c, assuan-io.c: Include config.h
349 Replaced all usages of _WIN32 by the new HAVE_W32_SYSTEM because
350 there is nothing winning in this API.
351 * assuan-pipe-connect.c (assuan_pipe_connect2) [_WIN32]: Return
352 error Not Imlemented.
353 * assuan-logging.c (_assuan_w32_strerror): New.
354 * assuan-defs.h (w32_strerror): new.
355 * assuan-pipe-connect.c (assuan_pipe_connect2, fix_signals):
356 Factored signal code out to new function.
357 (build_w32_commandline, create_inheritable_pipe): New. Taken
359 (assuan_pipe_connect2) [W32]: Implemented for W32.
360 * assuan-pipe-server.c (assuan_init_pipe_server) [W32]: Map file
361 descriptors using _get_osfhandle.
362 * assuan-socket-connect.c (assuan_socket_connect) [W32]: Allow for
363 a drive letter in the path.
364 * assuan-client.c (assuan_transact): Handle empty and comment
366 * assuan-util.c (_assuan_calloc): Avoid integer overflow.
367 * assuan-util.c (assuan_set_flag, assuan_get_flag): New.
368 * assuan-defs.h (struct assuan_context_s): New field flags.
369 * assuan.h (assuan_flag_t): New with one flag value
370 ASSUAN_NO_WAITPID for now.
371 * assuan-pipe-connect.c (do_finish): Take care of the no_waitpid
373 * mkerrors: Include config.h into assuan-errors.c. This is
374 required so that assuan.h knows about the W32 macro.
376 2005-08-09 Timo Schulz <twoaday@g10code.com> (ported from libassuan by wk)
378 * assuan-io.c (_assuan_simple_read, _assuan_simple_write): W32
380 * assuan-socket.c (_assuan_close): New.
381 (_assuan_sock_new): New.
382 (_assuan_sock_bind): New.
384 2005-03-22 Werner Koch <wk@g10code.com>
386 * assuan-defs.h (struct assuan_io): Renamed elements READ and
387 WRITE to READFNC and WRITEFNC to avoid problems with read defined
388 as macro. Changed callers. Noted by Ville Skyttä.
390 2004-12-16 Marcus Brinkmann <marcus@g10code.de>
392 * assuan-pipe-connect.c (do_finish): Do not wait for child to finish.
393 (assuan_pipe_connect): Use double-fork approach.
394 * assuan-connect.c (assuan_disconnect): Do not write BYE to the
397 2004-12-07 Marcus Brinkmann <marcus@g10code.de>
399 * README.1st: Add copyright notice.
401 2004-06-23 Marcus Brinkmann <marcus@g10code.de>
403 * assuan-domain-connect.c [HAVE_SYS_UIO_H]: Include <sys/uio.h>.
405 * assuan-handler.c: Include <errno.h>.
407 2004-06-08 Marcus Brinkmann <marcus@g10code.de>
409 * assuan-buffer.c (assuan_write_line): If the line is longer than
410 the maximum line length, bail out early.
412 2004-04-21 Werner Koch <wk@gnupg.org>
414 * assuan-socket-server.c (accept_connection_bottom): Save the pid
415 of the peer if it is available.
416 * assuan-socket-connect.c (assuan_socket_connect): Do not save the
417 dummy SERVED_PID arg.
418 * assuan-pipe-connect.c (do_finish): Don't wait if the pid is 0.
419 (assuan_pipe_connect2): Store the parents pid in the environment
421 * assuan-pipe-server.c (assuan_init_pipe_server): Initialize the
422 peer's pid from the environment.
423 * assuan-connect.c (assuan_get_pid): Do not return 0 as a PID.
425 2004-04-19 Werner Koch <wk@gnupg.org>
427 * assuan-socket-server.c, assuan-socket-connect.c: Includes
428 sys/types.h. Reported by Michael Nottebrock.
429 * assuan-domain-connect.c: Ditto.
431 2004-04-13 Werner Koch <wk@gnupg.org>
433 * assuan-util.c (_assuan_log_print_buffer): Relaxed quoting.
434 (_assuan_log_sanitized_string): Ditto.
436 2004-03-14 Werner Koch <wk@gnupg.org>
438 * assuan-handler.c: Include <errno.h>. Reported by Bernd Kuhls.
440 2004-02-18 Werner Koch <wk@gnupg.org>
442 * libassuan-config.in: Ignore setting of --prefix.
444 * assuan-handler.c (assuan_get_data_fp): Fail with ENOSYS if we
445 can't implement this.
447 2004-02-15 Werner Koch <wk@gnupg.org>
449 * memrchr.c (memrchr): Fixed implementation. Taken from gpgme.
451 2004-02-13 Werner Koch <wk@gnupg.org>
453 * assuan-domain-connect.c: Removed the unneeded alloca.h.
455 2004-01-24 Werner Koch <wk@gnupg.org>
457 * assuan-pipe-connect.c (assuan_pipe_connect2): New as an
458 extension of assuan_pipe_connect. Made the latter call this one.
460 2004-01-14 Werner Koch <wk@gnupg.org>
462 * assuan-buffer.c (_assuan_cookie_write_data): Return the
463 requested size to indicate successful operation. Fixes a spurious
464 bug we previously fixed using fflush().
466 2003-12-22 Werner Koch <wk@gnupg.org>
468 * assuan.h (ASSUAN_Locale_Problem): Added.
469 * assuan-errors.c (assuan_strerror): Ditto.
471 2003-12-18 Werner Koch <wk@gnupg.org>
473 * assuan.h (AssuanCommand): Clarified that these are now
474 deprecated and actually useless.
475 (assuan_error_t): Clarified and added ASSUAN_USER_ERROR_FIRST,
476 ASSUAN_USER_ERROR_LAST.
478 2003-12-16 Werner Koch <wk@gnupg.org>
480 * assuan-buffer.c: Changed formatting of the debug output prefix.
481 * assuan-util.c (assuan_set_log_stream): Set global log stream if
482 it has not been done yet.
483 * assuan-logging.c (_assuan_set_default_log_stream): New.
484 (assuan_set_assuan_log_prefix): New.
486 2003-12-11 Werner Koch <wk@gnupg.org>
488 * funopen.c (_assuan_funopen): Renamed from funopen, to keep the
489 name space clean and avoid duplicate definitions if another
490 library uses the same replacement.
491 * assuan-defs.h (funopen): Renamed prototype and add a macro.
493 2003-12-08 Werner Koch <wk@gnupg.org>
497 2003-11-12 Werner Koch <wk@gnupg.org>
499 * assuan-handler.c (process_request): Kludge to print better error
500 messages for gpg-error enabled programs.
502 2003-11-06 Werner Koch <wk@gnupg.org>
504 * assuan.h (assuan_context_t): New. Should be used in favor of
506 (assuan_error_t): New. To be used instead of AssuanError.
508 2003-11-11 Moritz Schulte <mo@g10code.com>
510 * assuan-socket-connect.c (assuan_socket_connect): Fix computation
511 of socket address length.
513 2003-08-13 Werner Koch <wk@gnupg.org>
515 * assuan-inquire.c (assuan_inquire): Increase length of cmdbuf to
518 2003-06-24 Werner Koch <wk@gnupg.org>
520 * mkerrors: Kludge to print libgpg-error values in an easier
523 2003-04-29 Werner Koch <wk@gnupg.org>
525 * libassuan.m4: New. Based on libgrypt.m4.
526 * Makefile.am (m4data_DATA): New.
528 * assuan.h (AssuanCommand): Removed.
530 * assuan-handler.c: Remove the cmd_id element,
531 (assuan_register_command): Likewise. Note that semantics changed.
532 (_assuan_register_std_commands): Adjusted.
534 2003-02-22 Neal H. Walfield <neal@g10code.de>
536 * Makefile.am (bin_SCRIPTS): Renamed from bin_PROGRAMS.
538 2003-02-18 Neal H. Walfield <neal@g10code.de>
540 * Makefile.am (libassuan_a_LIBADD): New variable.
541 * funopen.c: Move from ../common.
542 * isascii.c: Likewise.
543 * memrchr.c: Likewise.
544 * putc_unlocked.c: Likewise.
546 2003-02-18 Neal H. Walfield <neal@g10code.de>
548 * assuan-handler.c (_IO_cookie_io_functions_t): Remove.
549 (cookie_io_functions_t): Remove.
550 (fopencookie): Remove prototype.
551 (assuan_get_data_fp): Use funopen, not fopencookie.
553 2003-02-18 Neal H. Walfield <neal@g10code.de>
555 * libassuan-config.in: New file.
556 * Makefile.am (bin_PROGRAMS): New variable.
558 2003-02-17 Neal H. Walfield <neal@g10code.de>
560 * .cvsignore: New file.
562 2003-02-17 Neal H. Walfield <neal@g10code.de>
564 * Makefile.am (lib_LIBRARIES): Use this instead of . . .
565 (noinst_LIBRARIES): . . . this.
566 (include_HEADERS): New variable.
567 (libassuan_a_SOURCES): Remove assuan.h, add assuan-logging.c.
569 * assuan.h (assuan_set_assuan_log_stream): New prototype.
570 (assuan_get_assuan_log_stream): Likewise.
571 (assuan_get_assuan_log_prefix): Likewise.
572 * assuan-logging.c: New file.
574 * assuan-buffer.c [HAVE_JNLIB_LOGGIN]: Do not include
575 "../jnlib/logging.h".
576 (my_log_prefix): Remove function.
577 (_assuan_read_line): Use assuan_get_assuan_log_prefix in lieu of
579 (assuan_write_line): Likewise.
580 (_assuan_cookie_write_data): Likewise.
581 (_assuan_cookie_write_flush): Likewise.
582 * assuan-domain-connect.c (LOGERROR, LOGERROR1, LOGERROR2,
585 (domain_reader): Use it.
586 (domain_writer): Likewise.
587 (domain_sendfd): Likewise.
588 (domain_receivefd): Likewise.
589 (_assuan_domain_init): Likewise.
590 (assuan_domain_connect): Likewise.
591 * assuan-pipe-connect.c [HAVE_JNLIB_LOGGIN]: Do not include
592 "../jnlib/logging.h".
593 (LOGERROR, LOGERROR1, LOGERROR2, LOGERRORX): Remove.
595 (assuan_pipe_connect): Use it.
596 * assuan-socket-connect.c [HAVE_JNLIB_LOGGIN]: Do not include
597 "../jnlib/logging.h".
598 (LOGERROR, LOGERROR1, LOGERROR2, LOGERRORX): Remove.
600 (assuan_socket_connect): Use it.
601 (socket_reader): Remove dead code.
602 (socket_writer): Likewise.
603 * assuan-util.c [HAVE_JNLIB_LOGGIN]: Do not include
604 "../jnlib/logging.h".
605 (_assuan_log_sanitized_string): Use assuan_get_assuan_log_stream,
608 2002-11-24 Neal H. Walfield <neal@g10code.de>
610 * assuan.h (assuan_command_parse_fd): New prototype.
611 * assuan-handler.c (assuan_command_parse_fd): Rename from
612 parse_cmd_input_output. Export.
613 (std_handler_input): Update to use assuan_command_parse_fd.
614 (std_handler_output): Likewise.
616 2002-11-24 Neal H. Walfield <neal@g10code.de>
618 * assuan.h (assuan_sendfd): New prototype.
619 (assuan_receivefd): New prototype.
620 * assuan-buffer.c (assuan_sendfd): New function.
621 (assuan_receivefd): New function.
622 * assuan-handler.c (parse_cmd_input_output): Recognize incoming
623 file descriptors and act appropriately.
624 * assuan-defs.h (struct assuan_io): Add fields sendfd and
626 (struct assuan_context_s): Add fields pendingfds and
628 * assuan-pipe-server.c (_assuan_new_context): Update IO to reflect
630 * assuan-domain-connect.c (do_deinit): Cleanup any unreceived file
632 (domain_reader): Receive file descriptors.
633 (domain_sendfd): New function.
634 (domain_receivefd): New function.
635 (_assuan_domain_init): Update initialization code to reflect new
638 2002-11-24 Neal H. Walfield <neal@g10code.de>
640 * assuan-domain-connect.c (do_finish): Remove.
641 (_assuan_domain_init): Use default handlers where possible.
642 Add an assert and update comments.
643 * assuan-domain-server.c (accept_connection): Remove.
644 (assuan_init_domain_server): Use default handlers where possible.
645 Put the server in pipe mode: it can only be used by a single
648 2002-11-24 Neal H. Walfield <neal@g10code.de>
650 * assuan.h: Add prototype for assuan_domain_connect and
651 assuan_init_domain_server.
652 * assuan-defs.h: Include <unistd.h>.
653 Add prototype for _assuan_domain_init.
654 * assuan-domain-connect.c: New file.
655 * assuan-domain-server.c: New file.
656 * Makefile.am (libassuan_a_SOURCES): Add assuan-domain-connect.c
657 and assuan-domain-server.c
659 2002-11-23 Neal H. Walfield <neal@g10code.de>
661 * Makefile.am (libassuan_a_SOURCES): Add assuan-io.c.
662 * assuan-io.c: Restore.
663 (_assuan_simple_read): Rename from _assuan_read.
664 (_assuan_simple_write): Rename from _assuan_write.
665 * assuan-defs.h (_assuan_simple_read): New prototype.
666 (_assuan_simple_write): Likewise.
667 * assuan-pipe-server.c (pipe_reader): Remove.
668 (pipe_writer): Remove.
669 (_assuan_new_context): Initialize IO is with _assuan_simple_read
670 and _assuan_simple_write.
671 * assuan-socket-connect.c (socket_reader): Remove.
672 (socket_writer): Remove.
673 (assuan_socket_connect): Initialize IO is with _assuan_simple_read
674 and _assuan_simple_write.
675 * assuan-socket-server.c (io): New local variable.
676 (assuan_init_socket_server): Initialize CTX->io.
677 (assuan_init_connected_socket_server): Likewise.
679 2002-11-23 Neal H. Walfield <neal@g10code.de>
681 * assuan-buffer.c (readline): Use memrchr.
682 (_assuan_read_line): Rewritten to use the string functions.
684 2002-11-20 Neal H. Walfield <neal@g10code.de>
686 * assuan-socket-connect.c (assuan_socket_connect): Pass PF_LOCAL
687 to socket(), not AF_UNIX: it expects a PF_* macro and the former
689 (assuan_socket_connect): Use AF_LOCAL, not AF_UNIX which is more
692 2002-11-20 Neal H. Walfield <neal@g10code.de>
694 * assuan-defs.h (struct assuan_io): New structure.
695 (struct assuan_context_s): New field, io.
696 (_assuan_read): Depreciated.
697 (_assuan_write): Likewise.
698 * assuan-pipe-server.c: Include <unistd.h>.
699 (pipe_reader): New function.
700 (pipe_writer): Likewise.
701 (_assuan_new_context.IO): New local static. Set to pipe_reader
702 and pipe_writer. Use it to initialize new context.
703 * assuan-socket-connect.c (socket_reader): New function.
704 (socket_writer): New function.
705 (assuan_socket_connect.IO): New local static. Set to socket_reader
706 and socket_writer. Use it to initialize new context.
707 * assuan-buffer.c (writen): Take an ASSUAN_CONTEXT rather than a
708 file descriptor. Do not use _assuan_write but the write method
709 in the supplied context.
710 (readline): Likewise for _assuan_read.
711 (assuan_write_line): When calling writen, pass CTX; not the file
713 (_assuan_cookie_write_data): Likewise.
714 (_assuan_cookie_write_flush): Likewise.
715 (_assuan_read_line): Likewise for readline.
716 * Makefile.am (libassuan_a_SOURCES): Remove assuan-io.c.
717 * assuan-io.c: Removed.
719 2002-11-10 Werner Koch <wk@gnupg.org>
721 * assuan-pipe-connect.c (assuan_pipe_connect): Changed the order
722 of the dups to handle cases where we have already used fd 2 for
725 2002-10-31 Neal H. Walfield <neal@g10code.de>
727 * assuan-util.c: Include <ctype.h>.
728 (_assuan_log_print_buffer): Elide the magic numbers preferring the
729 standard isfoo functions. Use putc_unlocked where possible.
730 (_assuan_log_sanitized_string): Rewrite to use putc_unlocked and
733 2002-09-05 Neal H. Walfield <neal@g10code.de>
735 * assuan-defs.h (_assuan_read_wrapper): Depreciated.
736 * assuan-util.c (_assuan_read_wrapper): Removed.
737 * assuan-defs.h (_assuan_write_wrapper): Depreciated.
738 * assuan-util.c (_assuan_write_wrapper): Removed.
739 * assuan.h (assuan_set_io_fun): Depreciated.
740 * assuan-util.c (assuan_set_io_fun): Removed.
742 * assuan-defs.h (_assuan_read): New function.
743 (_assuan_write): Likewise.
744 * assuan-io.c: New file.
746 * assuan-buffer.c (writen): Use _assuan_write rather than doing
748 (readline): Likewise for _assuan_read.
750 * Makefile.am (libassuan_a_SOURCES): Add assuan-io.c.
752 2002-08-16 Werner Koch <wk@gnupg.org>
754 * assuan.h: Renamed Bad_Certificate_Path to Bad_Certificate_Chain.
756 2002-07-30 Werner Koch <wk@gnupg.org>
758 Changed the license from GPL to LGPL.
760 2002-07-23 Werner Koch <wk@gnupg.org>
762 * assuan-handler.c (_IO_cookie_io_functions_t): Define it here if
765 2002-06-27 Werner Koch <wk@gnupg.org>
767 * assuan-pipe-connect.c (assuan_pipe_connect): No special handling
768 for the log_fd and stderr. Connect stderr to /dev/null if it
769 should not be retained.
771 2002-06-26 Werner Koch <wk@gnupg.org>
773 * assuan-buffer.c (assuan_write_line): Make sure we never
774 accidently print an extra LF.
776 2002-05-23 Werner Koch <wk@gnupg.org>
778 * assuan-util.c (assuan_set_io_func): New.
779 * assuan-buffer.c (writen, readline): Use the new functions
781 * assuan-socket-server.c (accept_connection): Don't use the
782 pth_accept - using the assuan included accept code would be a bad
783 idea within Pth so we don't need a replacement function.
785 2002-05-22 Werner Koch <wk@gnupg.org>
787 * assuan-socket-server.c (assuan_init_connected_socket_server): New.
788 (accept_connection): Factored most code out to..
789 (accept_connection_bottom): .. new function.
791 2002-04-04 Werner Koch <wk@gnupg.org>
793 * assuan-buffer.c (my_log_prefix): New. Use it for all i/o debug
796 2002-03-06 Werner Koch <wk@gnupg.org>
798 * assuan-client.c (_assuan_read_from_server): Detect END.
799 (assuan_transact): Pass it to the data callback.
801 2002-02-27 Werner Koch <wk@gnupg.org>
803 * assuan-client.c (assuan_transact): Add 2 more arguments to
804 support status lines. Passing NULL yields the old behaviour.
806 * assuan-handler.c (process_request): Flush data lines send
807 without using the data fp.
809 2002-02-14 Werner Koch <wk@gnupg.org>
811 * assuan-inquire.c (assuan_inquire): Check for a cancel command
812 and return ASSUAN_Canceled. Allow for non-data inquiry.
814 * assuan.h: Add a few token specific error codes.
816 2002-02-13 Werner Koch <wk@gnupg.org>
818 * assuan-defs.h (assuan_context_s): New var CLIENT_PID.
819 * assuan-pipe-server.c (_assuan_new_context): set default value.
820 * assuan-socket-server.c (accept_connection): get the actual pid.
822 2002-02-12 Werner Koch <wk@gnupg.org>
824 * assuan-buffer.c (writen,readline) [USE_GNU_PT]: Use pth_read/write.
825 * assuan-socket-server.c (accept_connection) [USE_GNU_PTH]: Ditto.
827 2002-02-01 Marcus Brinkmann <marcus@g10code.de>
829 * Makefile.am (MOSTLYCLEANFILES): New variable.
831 2002-01-23 Werner Koch <wk@gnupg.org>
833 * assuan-socket-connect.c (LOGERRORX): and removed typo.
835 2002-01-22 Marcus Brinkmann <marcus@g10code.de>
837 * assuan-socket-connect.c (LOGERRORX): Reverse arguments to fputs.
839 2002-01-21 Werner Koch <wk@gnupg.org>
841 * assuan-connect.c: Move all except assuan_get_pid to...
842 * assuan-pipe-connect.c: this.
843 (assuan_pipe_disconnect): Removed.
844 (do_finish, do_deinit): New
845 (assuan_pipe_connect): and set them into the context.
846 * assuan-socket-connect.c: New.
848 * assuan-util.c (_assuan_log_sanitized_string): New.
850 * assuan-pipe-server.c (assuan_init_pipe_server): Factored most
852 (_assuan_new_context): new func.
853 (_assuan_release_context): New
854 * assuan-connect.c (assuan_pipe_connect): Use the new functions.
856 2002-01-20 Werner Koch <wk@gnupg.org>
858 * assuan.h: Added Invalid Option error code.
860 * assuan-handler.c (std_handler_option): New.
861 (std_cmd_tbl): Add OPTION as standard command.
862 (assuan_register_option_handler): New.
863 (dispatch_command): Use case insensitive matching as a fallback.
864 (my_strcasecmp): New.
866 2002-01-19 Werner Koch <wk@gnupg.org>
868 * assuan-buffer.c (_assuan_read_line): Add output logging.
869 (assuan_write_line): Ditto.
870 (_assuan_cookie_write_data): Ditto.
871 (_assuan_cookie_write_flush): Ditto.
872 * assuan-util.c (_assuan_log_print_buffer): New.
873 (assuan_set_log_stream): New.
874 (assuan_begin_confidential): New.
875 (assuan_end_confidential): New.
877 * assuan-defs.h: Add a few handler variables.
878 * assuan-pipe-server.c (assuan_deinit_pipe_server): Removed.
879 (deinit_pipe_server): New.
880 (assuan_deinit_server): New. Changed all callers to use this.
881 * assuan-listen.c (assuan_accept): Use the accept handler.
882 * assuan-handler.c (process_request): Use the close Handler.
883 * assuan-socket-server.c: New.
885 2002-01-14 Werner Koch <wk@gnupg.org>
887 * assuan-client.c (_assuan_read_from_server): Skip spaces after
890 2002-01-03 Werner Koch <wk@gnupg.org>
892 * assuan-handler.c (assuan_set_okay_line): New.
893 (process_request): And use it here.
895 2002-01-02 Werner Koch <wk@gnupg.org>
897 * assuan-inquire.c (init_membuf,put_membuf,get_membuf): Apply a
898 hidden 0 behind the buffer so that the buffer can be used as a
899 string in certain contexts.
901 2001-12-14 Marcus Brinkmann <marcus@g10code.de>
903 * assuan-connect.c (assuan_pipe_connect): New argument
904 FD_CHILD_LIST. Don't close those fds.
905 * assuan.h: Likewise for prototype.
907 2001-12-14 Werner Koch <wk@gnupg.org>
909 * assuan-listen.c (assuan_close_input_fd): New.
910 (assuan_close_output_fd): New.
911 * assuan-handler.c (std_handler_reset): Always close them after a
913 (std_handler_bye): Likewise.
915 2001-12-14 Marcus Brinkmann <marcus@g10code.de>
917 * assuan-buffer.c (_assuan_read_line): New variable ATTICLEN, use
918 it to save the length of the attic line.
919 Rediddle the code a bit to make it more clear what happens.
921 2001-12-14 Marcus Brinkmann <marcus@g10code.de>
923 * assuan-defs.h (LINELENGTH): Define as ASSUAN_LINELENGTH.
924 assuan.h: Define ASSUAN_LINELENGTH.
926 2001-12-13 Marcus Brinkmann <marcus@g10code.de>
928 * assuan-buffer.c (assuan_read_line): Fix order of execution to
929 get correct return values.
931 2001-12-13 Werner Koch <wk@gnupg.org>
933 * assuan-handler.c (assuan_get_active_fds): Fixed silly bug,
934 pretty obvious that nobody ever tested this function.
936 2001-12-12 Werner Koch <wk@gnupg.org>
938 * assuan-connect.c (assuan_pipe_connect): Implemented the inital
940 * assuan-client.c (read_from_server): Renamed to
941 (_assuan_read_from_server): this and made external.
943 * assuan-listen.c (assuan_set_hello_line): New.
944 (assuan_accept): Use a custom hello line is available.
946 * assuan-buffer.c (assuan_read_line): New.
947 (assuan_pending_line): New.
948 (_assuan_write_line): Renamed to ..
949 (assuan_write_line): this, made public and changed all callers.
951 2001-12-04 Werner Koch <wk@gnupg.org>
953 * assuan-connect.c (assuan_pipe_connect): Add more error reporting.
954 * assuan-client.c: New.
956 * assuan-inquire.c: New.
957 * assuan-handler.c (process_request): Check for nested invocations.
959 2001-11-27 Werner Koch <wk@gnupg.org>
961 * assuan-handler.c (assuan_register_input_notify): New.
962 (assuan_register_output_notify): New.
964 2001-11-26 Werner Koch <wk@gnupg.org>
966 * assuan.h: Added more status codes.
968 2001-11-25 Werner Koch <wk@gnupg.org>
970 * assuan-handler.c (assuan_register_bye_notify)
971 (assuan_register_reset_notify)
972 (assuan_register_cancel_notify): New and call them from the
974 (assuan_process): Moved bulk of function to ..
975 (process_request): .. new.
976 (assuan_process_next): One shot version of above.
977 (assuan_get_active_fds): New.
979 2001-11-24 Werner Koch <wk@gnupg.org>
981 * assuan-connect.c (assuan_get_pid): New.
983 * assuan-buffer.c (_assuan_read_line): Deal with reads of more
985 * assuan-defs.h: Add space in the context for this.
988 Copyright 2001, 2002, 2006 Free Software Foundation, Inc.
990 This file is free software; as a special exception the author gives
991 unlimited permission to copy and/or distribute it, with or without
992 modifications, as long as this notice is preserved.
994 This file is distributed in the hope that it will be useful, but
995 WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
996 implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.