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