Chnages to supporta pinnetry notification
[gpgme.git] / assuan / ChangeLog
1 2008-02-14  Werner Koch  <wk@g10code.com>
2
3         * assuan-pipe-connect.c (_gpgme_io_spawn): Adjust prototype.
4         (pipe_connect_gpgme, pipe_connect_gpgme): Adjust call.
5
6 2008-01-04  Marcus Brinkmann  <marcus@g10code.de>
7
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.
11
12 2007-09-25  Werner Koch  <wk@g10code.com>
13
14         * assuan.h (_assuan_gpg_strerror_r, _assuan_gpg_strsource): Add
15         new wrappers.
16
17 2007-09-03  Marcus Brinkmann  <marcus@g10code.de>
18
19         * assuan.h [_ASSUAN_EXT_SYM_PREFIX]: Add missing symbol renames
20         with _ASSUAN_PREFIX.
21
22 2007-08-02  Werner Koch  <wk@g10code.com>
23
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.
29
30 2007-07-12  Werner Koch  <wk@g10code.com>
31
32         * assuan-handler.c (assuan_get_active_fds): Use get_osfhandle for
33         the data fp.
34         * assuan-socket.c (_assuan_close) [W32]: Use CloseHandle and not close.
35
36         * assuan-io.c (_assuan_simple_write, _assuan_simple_read): Map
37         ERROR_BROKEN_PIPE to EPIPE.
38
39 2007-07-08  Marcus Brinkmann  <marcus@g10code.de>
40
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.
46
47 2007-07-04  Marcus Brinkmann  <marcus@g10code.de>
48
49         Change _WIN32 to HAVE_W32_SYSTEM for consistency.
50
51         * assuan-defs.h (struct assuan_context_s): Have full peercred
52         structure even if not HAVE_SO_PEERCRED, but not if
53         HAVE_W32_SYSTEM.
54
55 2007-06-18  Werner Koch  <wk@g10code.com>
56
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.
61
62 2007-06-12  Werner Koch  <wk@g10code.com>
63
64         * assuan-io.c (_assuan_simple_read): Hack to allow reading from a
65         socket.
66         (_assuan_simple_write): Likewise.
67
68 2007-06-11  Werner Koch  <wk@g10code.com>
69
70         * assuan-io-pth.c (_assuan_simple_read, _assuan_simple_write): Use
71         pth versions also for W32.
72
73 2007-05-29  Werner Koch  <wk@g10code.com>
74
75         * assuan-io-pth.c: Include sys/socket.h only if available.  Remove
76         double inclusion of sys/wait.h
77         
78         * assuan-pipe-connect.c (build_w32_commandline): Make ARGV const.
79
80         * assuan-pipe-server.c (is_valid_socket) [W32]: Do not define.
81
82         * assuan-socket-server.c [W32]: Include ws2tcpip.h to define
83         socklen_t.
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
87         different prototype.
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.
91
92 2007-05-09  Werner Koch  <wk@g10code.com>
93
94         * libassuan.m4: Print found version on success.
95
96 2007-05-01  Werner Koch  <wk@g10code.com>
97
98         * assuan-uds.c (uds_reader): Cast void ptr for arithmetics.
99         Reported by Peter O'Gorman.
100
101 2006-12-03  Marcus Brinkmann  <marcus@g10code.de>
102
103         * assuan-handler.c (assuan_command_parse_fd): Also allow white
104         space after FD.
105
106 2006-12-02  Marcus Brinkmann  <marcus@g10code.de>
107
108         * assuan-uds.c (uds_reader): Return 0 if recvmsg returns 0.
109
110 2006-12-01  Marcus Brinkmann  <marcus@g10code.de>
111
112         * assuan-client.c (assuan_transact): Also translate some of the
113         legacy error codes.
114
115 2006-11-22  Werner Koch  <wk@g10code.com>
116
117         * assuan-handler.c (fun1_cookie_write, fun2_cookie_write): New.
118         (assuan_get_data_fp) [HAVE_FUNOPEN]: Use it.
119
120 2006-11-21  Werner Koch  <wk@g10code.com>
121
122         * Makefile.am (libassuan_pth_a_CFLAGS): New.
123
124         * assuan-pipe-server.c (_assuan_release_context): Free CMDTBL.
125
126 2006-11-14  Werner Koch  <wk@g10code.com>
127
128         * libassuan.m4 (AM_CHECK_LIBASSUAN): New.
129
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.
137
138 2006-10-18  Werner Koch  <wk@g10code.com>
139
140         * libassuan.m4: Pass "pthread" to the common macro.  Reported by
141         Rex Dieter.
142
143 2006-10-16  Werner Koch  <wk@g10code.com>
144
145         * mkerrors: Map ASSUAN_Not_Confirmed.
146
147 2006-10-10  Werner Koch  <wk@g10code.com>
148
149         * libassuan.m4 (AM_PATH_LIBASSUAN_PTH)
150         (AM_PATH_LIBASSUAN_PTHREAD): Fixed.
151
152         * assuan-buffer.c (assuan_sendfd): Implement a runtime detection
153         of implemented descripotr passing.
154
155         * assuan-uds.c: Take care of USE_DESCRIPTOR_PASSING.
156
157         * assuan-defs.h: Add missing semicolon.
158
159 2006-10-09  Werner Koch  <wk@g10code.com>
160
161         * assuan-handler.c (process_request): Use weak pragma for the sake
162         of old gcc's.  Reported by Alain Guibert.
163
164         * assuan-io.c: Removed Pth support.
165         * assuan-io-pth.c: New. Based on assuan-io.c
166
167 2006-10-06  Werner Koch  <wk@g10code.com>
168
169         * libassuan-config.in: New options --api-version and --thread.
170
171 2006-10-04  Werner Koch  <wk@g10code.com>
172
173         * assuan-client.c (assuan_transact): Need to map old assuan status
174         codes so that for example CANCELED is correctly mapped.
175
176 2006-09-28  Marcus Brinkmann  <marcus@g10code.de>
177
178         * assuan-client.c (assuan_transact): Do not convert error on
179         status line, it is already a gpg-error.  Do convert
180         ASSUAN_Server_Fault.
181
182 2006-09-19  Marcus Brinkmann  <marcus@g10code.de>
183
184         * assuan.h (assuan_init_socket_server_ext)
185         [_ASSUAN_EXT_SYM_PREFIX]: Fix typo in macro.
186
187 2006-09-19  Werner Koch  <wk@g10code.com>
188
189         * assuan-defs.h (putc_unlocked): Add prototype.
190
191         * assuan-socket-server.c (accept_connection): Made LEN a socklen_t.
192
193         * assuan.h: Replaced assuan error code enum by simple defines and
194         made assuan_error_t an int.
195         * mkerrors: Changed parser accordingly.
196
197 2006-09-19  Marcus Brinkmann  <marcus@g10code.de>
198
199         * assuan-pipe-connect.c: Add hacks for Slowaris.
200         * assuan-socket.c: Likewise here.
201
202         * assuan.h (enum): Avoid trailing comma in enumerator list.  Ugh.
203
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
209         prototypes.
210
211         * assuan-defs.h (unsetenv): Define correctly.
212
213 2006-09-14  Werner Koch  <wk@g10code.com>
214
215         * assuan-io.c (_assuan_waitpid): New.  Changed all waitpid calls
216         to this.
217
218         * assuan.h (_ASSUAN_DEPRECATED): New internal macro.
219         (assuan_pipe_connect2): Declare deprecated.
220         (assuan_init_connected_socket_server): Declare deprecated.
221
222         * assuan-connect.c (assuan_get_peercred): New.
223         * assuan-socket-server.c (accept_connection_bottom): Save uid and gid.
224
225 2006-09-13  Werner Koch  <wk@g10code.com>
226
227         * assuan-client.c (assuan_transact): Need to map the error code.
228         * mkerrors: Need to map ASSUAN_No_Secret_Key.
229
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.
233
234         * assuan-socket-server.c (assuan_init_socket_server_ext): New.
235         Changed other init fucntions to make use of it.
236
237         * assuan-handler.c (assuan_command_parse_fd): Allow for lowercase
238         "fd".
239         (std_handler_reset): Close pending fds.
240         * assuan-uds.c (uds_receivefd): Fixed.
241         (_assuan_uds_close_fds): New.
242
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.
246
247 2006-09-12  Werner Koch  <wk@g10code.com>
248
249         * assuan-buffer.c (_assuan_write_line): Also log the prefix.
250
251         * assuan-defs.h (DIM, DIMof): New.
252
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.
261
262         * assuan-io.c (_assuan_simple_sendmsg, _assuan_simple_recvmsg): New.
263         (my_pth_fdmode, my_pth_select): New.
264
265 2006-09-11  Werner Koch  <wk@g10code.com>
266
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
269         case.
270
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.
280
281 2006-09-10  Werner Koch  <wk@g10code.com>
282
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
288         set.
289         (_assuan_set_default_log_stream): Test this env variable.
290
291 2006-09-06  Werner Koch  <wk@g10code.com>
292
293         * assuan.h (_ASSUAN_ONLY_GPG_ERRORS): New.
294
295         * assuan-handler.c (dispatch_command): Use Syntax_Error instead of
296         Invalid_Command.
297
298         * assuan-domain-connect.c: Changed alloc malloc/free/realloc to
299         xtrymalloc et al.
300         (read_int, write_int): Make args void pointers.
301         (domain_receivefd): Take care of realloc shrinking failure.
302
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
307         readable.
308
309 2006-09-05  Werner Koch  <wk@g10code.com>
310
311         * assuan-defs.h (err_code, err_is_eof): New.
312
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.
318
319         * assuan-logging.c (_assuan_log_printf): Do not change ERRNO and
320         print the pid.
321
322         * assuan-domain-connect.c (domain_reader): Replaced plain printf
323         by assuan_log function.
324
325 2005-10-24  Werner Koch  <wk@g10code.com>
326
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.
331
332 2005-10-08  Marcus Brinkmann  <marcus@g10code.de>
333
334         * assuan-defs.h (setenv, unsetenv, clearenv) [!HAVE_SETENV]:
335         Define to _assuan_*.
336         * setenv.c: Include "assuan-defs.h".
337         (__add_to_environ): Make static.
338
339 2005-10-07  Marcus Brinkmann  <marcus@g10code.de>
340
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.
349
350 2005-10-01  Marcus Brinkmann  <marcus@g10code.de>
351
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.
357
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.
363
364 2005-08-19  Werner Koch  <wk@g10code.com>
365
366         * funopen.c, assuan-socket.c: Copied from libassuan CVS.
367         * assuan-pipe-connect.c (assuan_pipe_connect2): Add missing
368         declaration of PID.
369
370 2005-08-09  Werner Koch  <wk@g10code.com>
371
372         * README.1st: Adjusted to cope with changes done in upstream Assuan.
373
374         Merged changes for W32 support from libassuan.
375         
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
391         from gnupg 1.9.
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
398         commands correctly.
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
405         flag.
406         * mkerrors: Include config.h into assuan-errors.c.  This is
407         required so that assuan.h knows about the W32 macro.
408
409 2005-08-09 Timo Schulz  <twoaday@g10code.com> (ported from libassuan by wk)
410         
411         * assuan-io.c (_assuan_simple_read, _assuan_simple_write): W32
412         support.
413         * assuan-socket.c (_assuan_close): New.
414         (_assuan_sock_new): New.
415         (_assuan_sock_bind): New.
416
417 2005-03-22  Werner Koch  <wk@g10code.com>
418
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ä.
422
423 2004-12-16  Marcus Brinkmann  <marcus@g10code.de>
424
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
428         status line.
429
430 2004-12-07  Marcus Brinkmann  <marcus@g10code.de>
431
432         * README.1st: Add copyright notice.
433
434 2004-06-23  Marcus Brinkmann  <marcus@g10code.de>
435
436         * assuan-domain-connect.c [HAVE_SYS_UIO_H]: Include <sys/uio.h>.
437
438         * assuan-handler.c: Include <errno.h>.
439
440 2004-06-08  Marcus Brinkmann  <marcus@g10code.de>
441
442         * assuan-buffer.c (assuan_write_line): If the line is longer than
443         the maximum line length, bail out early.
444
445 2004-04-21  Werner Koch  <wk@gnupg.org>
446
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
453         of the child.
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.
457
458 2004-04-19  Werner Koch  <wk@gnupg.org>
459
460         * assuan-socket-server.c, assuan-socket-connect.c: Includes
461         sys/types.h.  Reported by Michael Nottebrock.
462         * assuan-domain-connect.c: Ditto.
463
464 2004-04-13  Werner Koch  <wk@gnupg.org>
465
466         * assuan-util.c (_assuan_log_print_buffer): Relaxed quoting.
467         (_assuan_log_sanitized_string): Ditto.
468
469 2004-03-14  Werner Koch  <wk@gnupg.org>
470
471         * assuan-handler.c: Include <errno.h>.  Reported by Bernd Kuhls.
472
473 2004-02-18  Werner Koch  <wk@gnupg.org>
474
475         * libassuan-config.in: Ignore setting of --prefix.
476
477         * assuan-handler.c (assuan_get_data_fp): Fail with ENOSYS if we
478         can't implement this.
479
480 2004-02-15  Werner Koch  <wk@gnupg.org>
481
482         * memrchr.c (memrchr): Fixed implementation. Taken from gpgme.
483
484 2004-02-13  Werner Koch  <wk@gnupg.org>
485
486         * assuan-domain-connect.c: Removed the unneeded alloca.h.
487
488 2004-01-24  Werner Koch  <wk@gnupg.org>
489
490         * assuan-pipe-connect.c (assuan_pipe_connect2): New as an
491         extension of assuan_pipe_connect. Made the latter call this one.
492
493 2004-01-14  Werner Koch  <wk@gnupg.org>
494
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().
498
499 2003-12-22  Werner Koch  <wk@gnupg.org>
500
501         * assuan.h (ASSUAN_Locale_Problem): Added.
502         * assuan-errors.c (assuan_strerror): Ditto.
503
504 2003-12-18  Werner Koch  <wk@gnupg.org>
505
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.
510
511 2003-12-16  Werner Koch  <wk@gnupg.org>
512
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.
518
519 2003-12-11  Werner Koch  <wk@gnupg.org>
520
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.
525
526 2003-12-08  Werner Koch  <wk@gnupg.org>
527
528         * TODO: Removed.
529
530 2003-11-12  Werner Koch  <wk@gnupg.org>
531
532         * assuan-handler.c (process_request): Kludge to print better error
533         messages for gpg-error enabled programs.
534
535 2003-11-06  Werner Koch  <wk@gnupg.org>
536
537         * assuan.h (assuan_context_t): New.  Should be used in favor of
538         ASSUAN_CONTEXT.
539         (assuan_error_t): New. To be used instead of AssuanError.
540
541 2003-11-11  Moritz Schulte  <mo@g10code.com>
542
543         * assuan-socket-connect.c (assuan_socket_connect): Fix computation
544         of socket address length.
545
546 2003-08-13  Werner Koch  <wk@gnupg.org>
547
548         * assuan-inquire.c (assuan_inquire): Increase length of cmdbuf to
549         the Assuan limit.
550
551 2003-06-24  Werner Koch  <wk@gnupg.org>
552
553         * mkerrors: Kludge to print libgpg-error values in an easier
554         readable way.
555
556 2003-04-29  Werner Koch  <wk@gnupg.org>
557
558         * libassuan.m4: New. Based on libgrypt.m4.
559         * Makefile.am (m4data_DATA): New.
560
561         * assuan.h (AssuanCommand): Removed.
562
563         * assuan-handler.c: Remove the cmd_id element,
564         (assuan_register_command): Likewise.  Note that semantics changed.
565         (_assuan_register_std_commands): Adjusted.
566
567 2003-02-22  Neal H. Walfield  <neal@g10code.de>
568
569         * Makefile.am (bin_SCRIPTS): Renamed from bin_PROGRAMS.
570
571 2003-02-18  Neal H. Walfield  <neal@g10code.de>
572
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.
578         
579 2003-02-18  Neal H. Walfield  <neal@g10code.de>
580
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.
585
586 2003-02-18  Neal H. Walfield  <neal@g10code.de>
587
588         * libassuan-config.in: New file.
589         * Makefile.am (bin_PROGRAMS): New variable.
590
591 2003-02-17  Neal H. Walfield  <neal@g10code.de>
592
593         * .cvsignore: New file.
594
595 2003-02-17  Neal H. Walfield  <neal@g10code.de>
596
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.
601
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.
606
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
611         my_log_prefix.
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,
616         LOGERRORX):  Remove.
617         (LOG): New macro.
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.
627         (LOG): New macro.
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.
632         (LOG): New macro.
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,
639         not jnlib.
640
641 2002-11-24  Neal H. Walfield  <neal@g10code.de>
642
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.
648
649 2002-11-24  Neal H. Walfield  <neal@g10code.de>
650
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
658         receivefd.
659         (struct assuan_context_s): Add fields pendingfds and
660         pendingfdscount.
661         * assuan-pipe-server.c (_assuan_new_context): Update IO to reflect
662         new features.
663         * assuan-domain-connect.c (do_deinit): Cleanup any unreceived file
664         descriptors.
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
669         features.
670
671 2002-11-24  Neal H. Walfield  <neal@g10code.de>
672
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
679         client.
680
681 2002-11-24  Neal H. Walfield  <neal@g10code.de>
682
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
691
692 2002-11-23  Neal H. Walfield  <neal@g10code.de>
693
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.
711
712 2002-11-23  Neal H. Walfield  <neal@g10code.de>
713
714         * assuan-buffer.c (readline): Use memrchr.
715         (_assuan_read_line): Rewritten to use the string functions.
716
717 2002-11-20  Neal H. Walfield  <neal@g10code.de>
718
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
721         is more portable.
722         (assuan_socket_connect): Use AF_LOCAL, not AF_UNIX which is more
723         POSIXy.
724
725 2002-11-20  Neal H. Walfield  <neal@g10code.de>
726
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
745         descriptor directly.
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.
751
752 2002-11-10  Werner Koch  <wk@gnupg.org>
753
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
756         other things.
757
758 2002-10-31  Neal H. Walfield  <neal@g10code.de>
759
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
764         the isfoo functions.
765
766 2002-09-05  Neal H. Walfield  <neal@g10code.de>
767
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.
774
775         * assuan-defs.h (_assuan_read): New function.
776         (_assuan_write): Likewise.
777         * assuan-io.c: New file.
778
779         * assuan-buffer.c (writen): Use _assuan_write rather than doing
780         the work here.
781         (readline): Likewise for _assuan_read.
782
783         * Makefile.am (libassuan_a_SOURCES): Add assuan-io.c.
784
785 2002-08-16  Werner Koch  <wk@gnupg.org>
786
787         * assuan.h: Renamed Bad_Certificate_Path to Bad_Certificate_Chain.
788
789 2002-07-30  Werner Koch  <wk@gnupg.org>
790
791         Changed the license from GPL to LGPL.
792
793 2002-07-23  Werner Koch  <wk@gnupg.org>
794
795         * assuan-handler.c (_IO_cookie_io_functions_t): Define it here if
796         it does not exists.
797
798 2002-06-27  Werner Koch  <wk@gnupg.org>
799
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.
803
804 2002-06-26  Werner Koch  <wk@gnupg.org>
805
806         * assuan-buffer.c (assuan_write_line): Make sure we never
807         accidently print an extra LF.
808
809 2002-05-23  Werner Koch  <wk@gnupg.org>
810
811         * assuan-util.c (assuan_set_io_func): New.
812         * assuan-buffer.c (writen, readline): Use the new functions
813         instead of pth.
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.
817
818 2002-05-22  Werner Koch  <wk@gnupg.org>
819
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.
823
824 2002-04-04  Werner Koch  <wk@gnupg.org>
825
826         * assuan-buffer.c (my_log_prefix): New.  Use it for all i/o debug
827         output.
828
829 2002-03-06  Werner Koch  <wk@gnupg.org>
830
831         * assuan-client.c (_assuan_read_from_server): Detect END.
832         (assuan_transact): Pass it to the data callback.
833
834 2002-02-27  Werner Koch  <wk@gnupg.org>
835
836         * assuan-client.c (assuan_transact): Add 2 more arguments to
837         support status lines. Passing NULL yields the old behaviour.
838
839         * assuan-handler.c (process_request): Flush data lines send
840         without using the data fp.
841
842 2002-02-14  Werner Koch  <wk@gnupg.org>
843
844         * assuan-inquire.c (assuan_inquire): Check for a cancel command
845         and return ASSUAN_Canceled.  Allow for non-data inquiry.
846
847         * assuan.h: Add a few token specific error codes.
848
849 2002-02-13  Werner Koch  <wk@gnupg.org>
850
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.
854
855 2002-02-12  Werner Koch  <wk@gnupg.org>
856
857         * assuan-buffer.c (writen,readline) [USE_GNU_PT]: Use pth_read/write.
858         * assuan-socket-server.c (accept_connection) [USE_GNU_PTH]: Ditto.
859
860 2002-02-01  Marcus Brinkmann  <marcus@g10code.de>
861
862         * Makefile.am (MOSTLYCLEANFILES): New variable.
863
864 2002-01-23  Werner Koch  <wk@gnupg.org>
865
866         * assuan-socket-connect.c (LOGERRORX): and removed typo.
867
868 2002-01-22  Marcus Brinkmann  <marcus@g10code.de>
869
870         * assuan-socket-connect.c (LOGERRORX): Reverse arguments to fputs.
871
872 2002-01-21  Werner Koch  <wk@gnupg.org>
873
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.
880         
881         * assuan-util.c (_assuan_log_sanitized_string): New.
882
883         * assuan-pipe-server.c (assuan_init_pipe_server): Factored most
884         code out to ...
885         (_assuan_new_context): new func.
886         (_assuan_release_context): New
887         * assuan-connect.c (assuan_pipe_connect): Use the new functions.
888
889 2002-01-20  Werner Koch  <wk@gnupg.org>
890
891         * assuan.h: Added Invalid Option error code.
892
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.
898
899 2002-01-19  Werner Koch  <wk@gnupg.org>
900
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.
909
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.
917
918 2002-01-14  Werner Koch  <wk@gnupg.org>
919
920         * assuan-client.c (_assuan_read_from_server): Skip spaces after
921         the keyword.
922
923 2002-01-03  Werner Koch  <wk@gnupg.org>
924
925         * assuan-handler.c (assuan_set_okay_line): New.
926         (process_request): And use it here.
927
928 2002-01-02  Werner Koch  <wk@gnupg.org>
929
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.
933
934 2001-12-14  Marcus Brinkmann  <marcus@g10code.de>
935
936         * assuan-connect.c (assuan_pipe_connect): New argument
937         FD_CHILD_LIST.  Don't close those fds.
938         * assuan.h: Likewise for prototype.
939
940 2001-12-14  Werner Koch  <wk@gnupg.org>
941
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
945         reset command.
946         (std_handler_bye): Likewise.
947
948 2001-12-14  Marcus Brinkmann  <marcus@g10code.de>
949
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.
953
954 2001-12-14  Marcus Brinkmann  <marcus@g10code.de>
955
956         * assuan-defs.h (LINELENGTH): Define as ASSUAN_LINELENGTH.
957         assuan.h: Define ASSUAN_LINELENGTH.
958
959 2001-12-13  Marcus Brinkmann  <marcus@g10code.de>
960
961         * assuan-buffer.c (assuan_read_line): Fix order of execution to
962         get correct return values.
963
964 2001-12-13  Werner Koch  <wk@gnupg.org>
965
966         * assuan-handler.c (assuan_get_active_fds): Fixed silly bug,
967         pretty obvious that nobody ever tested this function.
968
969 2001-12-12  Werner Koch  <wk@gnupg.org>
970
971         * assuan-connect.c (assuan_pipe_connect): Implemented the inital
972         handshake.
973         * assuan-client.c (read_from_server): Renamed to  
974         (_assuan_read_from_server): this and made external.
975
976         * assuan-listen.c (assuan_set_hello_line): New.
977         (assuan_accept): Use a custom hello line is available.
978
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.
983
984 2001-12-04  Werner Koch  <wk@gnupg.org>
985
986         * assuan-connect.c (assuan_pipe_connect): Add more error reporting.
987         * assuan-client.c: New.
988
989         * assuan-inquire.c: New.
990         * assuan-handler.c (process_request): Check for nested invocations.
991
992 2001-11-27  Werner Koch  <wk@gnupg.org>
993
994         * assuan-handler.c (assuan_register_input_notify): New.
995         (assuan_register_output_notify): New.
996
997 2001-11-26  Werner Koch  <wk@gnupg.org>
998
999         * assuan.h: Added more status codes.
1000
1001 2001-11-25  Werner Koch  <wk@gnupg.org>
1002
1003         * assuan-handler.c (assuan_register_bye_notify)
1004         (assuan_register_reset_notify)
1005         (assuan_register_cancel_notify): New and call them from the
1006         standard handlers.
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.
1011
1012 2001-11-24  Werner Koch  <wk@gnupg.org>
1013
1014         * assuan-connect.c (assuan_get_pid): New.
1015
1016         * assuan-buffer.c (_assuan_read_line): Deal with reads of more
1017         than a line.
1018         * assuan-defs.h: Add space in the context for this.
1019
1020         
1021  Copyright 2001, 2002, 2006 Free Software Foundation, Inc.
1022
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.
1026
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.