2009-06-16 Marcus Brinkmann <marcus@g10code.de>
[gpgme.git] / src / ChangeLog
1 2009-06-16  Marcus Brinkmann  <marcus@g10code.de>
2
3         * gpgme.c (gpgme_result_unref): Hot fix to release a lock.
4
5         * gpgme.c (result_ref_lock): New global variable.
6         (gpgme_result_ref, gpgme_result_unref): use it.
7
8 2009-06-16  Werner Koch  <wk@g10code.com>
9
10         * version.c: Include stdlib.h. 
11
12         * gpgme.h.in (gpgme_data_encoding_t): Add GPGME_DATA_ENCODING_URL,
13         GPGME_DATA_ENCODING_URLESC, GPGME_DATA_ENCODING_URL0.
14         * data.c (gpgme_data_set_encoding): Adjust for new values.
15         * engine-gpg.c (string_from_data): New.
16         (gpg_import): Implement --fetch-key feature.
17
18         * gpgme.h.in (gpgme_op_export_keys_start, gpgme_op_export_keys): New.
19         * gpgme.def, libgpgme.vers: Add them.
20         * export.c (gpgme_op_export_keys_start, gpgme_op_export_keys): New.
21         (export_keys_start): New.
22
23         * gpgme.h.in (gpgme_export_mode_t, GPGME_EXPORT_MODE_EXTERN): New.
24         (gpgme_op_export_start, gpgme_op_export, gpgme_op_export_ext_start)
25         (gpgme_op_export_ext): Change arg RESERVED to MODE of new
26         compatible type.
27         * export.c (gpgme_export_ext_start, gpgme_op_export)
28         (gpgme_op_export_ext_start, gpgme_op_export_ext): Ditto.
29         (export_start): Ditto.
30         * engine.c (_gpgme_engine_op_export): Ditto.
31         * engine-backend.h (struct engine_ops): Ditto.
32         * engine-gpgsm.c (gpgsm_export, gpgsm_export_ext): Ditto.
33         * engine-gpg.c (gpg_export, gpg_export_ext): Ditto.  Implement
34         mode EXTERN.
35         (gpg_export, gpg_export_ext): Factor common code out to ..
36         (export_common): .. this.
37
38         * gpgme.h.in (gpgme_op_import_keys_start, gpgme_op_import_keys): New.
39         * gpgme.def, libgpgme.vers: Add them.
40         * import.c (gpgme_op_import_keys_start, gpgme_op_import_keys): New.
41         (_gpgme_op_import_keys_start): New.
42         * engine.c (_gpgme_engine_op_import): Add arg KEYARRAY.
43         * engine-backend.h (struct engine_ops): Ditto.
44         * engine-gpgsm.c (gpgsm_import): Ditto.  Not functional.
45         * engine-gpg.c (gpg_import): Ditto.  Implement it.
46
47 2009-06-15  Marcus Brinkmann  <marcus@g10code.de>
48
49         * gpgme.h.in (gpgme_result_ref, gpgme_result_unref): Add
50         prototypes.
51         * gpgme.def, libgpgme.vers (gpgme_result_ref, gpgme_result_unref):
52         Add these.
53         * context.h (struct ctx_op_data): Add member "references".
54         * gpgme.c (gpgme_result_ref, gpgme_result_unref): New functions.
55         (_gpgme_release_result): Use gpgme_result_unref.
56         * op-support.c (_gpgme_op_data_lookup): Initialize references.
57
58 2009-06-12  Werner Koch  <wk@g10code.com>
59
60         * gpgme-w32spawn.c (translate_get_from_file): Parse optional spawn
61         flags.  Add new arg R_FLAGS.  Fix segv on file w/o LF.
62         (translate_handles): Add new arg R_FLAGS.  Avoid possible segv.
63         (main): Pass flags for my_spawn.
64         (my_spawn): Add arg FLAGS and implement AllowSetForegroundWindow.
65
66         * priv-io.h (IOSPAWN_FLAG_ALLOW_SET_FG): New.
67         * w32-io.c (_gpgme_io_spawn): Add arg FLAGS and implement it.
68         * w32-glib-io.c (_gpgme_io_spawn): Ditto.
69         * w32-qt-io.cpp (_gpgme_io_spawn): Ditto.
70         * posix-io.c (_gpgme_io_spawn): Add dummy arg FLAGS.
71         * engine-gpg.c (start): Call spawn with new flag.
72
73         * w32-util.c (_gpgme_allow_set_foregound_window): Rename to
74         _gpgme_allow_set_foreground_window.  Change all callers.
75         * posix-util.c (_gpgme_allow_set_foreground_window): Ditto.
76
77 2009-06-10  Werner Koch  <wk@g10code.com>
78
79         * w32-util.c (_gpgme_allow_set_foregound_window): Add trace support.
80
81 2009-06-09  Werner Koch  <wk@g10code.com>
82
83         * engine-gpg.c (gpg_io_event): Test for cmd.fd.
84
85         * version.c (gpgme_check_version_internal): Make result const.
86
87         * gpgme.c: Include priv-io.h.
88         (gpgme_io_read, gpgme_io_write): New.
89         * libgpgme.vers (GPGME_1.1): Add them. 
90         * gpgme.def: Ditto.
91
92         * Makefile.am (main_sources): Remove gpgme.h.
93         (include_HEADERS): Rename to nodist_include_HEADERS so that a
94         VPATH build won't use the distributed one.
95
96         * util.h (GPG_ERR_NOT_OPERATIONAL): Define.
97
98 2009-05-28  Marcus Brinkmann  <marcus@g10code.de>
99
100         * gpgme.h.in (gpgme_check_version_internal): New prototype.
101         (gpgme_check_version): New macro, overriding function of the same
102         name.
103         * libgpgme.vers, gpgme.def: Add gpgme_check_version_internal.o
104         * context.h (_gpgme_selftest): New variable declaration.
105         * version.c: Include "context.h".
106         (gpgme_check_version): Set _gpgme_selftest on success.
107         (gpgme_check_version_internal): New function.
108         * gpgme.c (_gpgme_selftest): Define it.
109         (gpgme_new): Check the selftest result.
110
111 2009-05-18  Marcus Brinkmann  <marcus@g10code.de>
112
113         * gpgme.h.in (gpgme_encrypt_flags_t): Add
114         GPGME_ENCRYPT_NO_ENCRYPT_TO.
115         * engine-gpg.c (gpg_encrypt): Pass --no-encrypt-to to gpg if
116         GPGME_ENCRYPT_NO_ENCRYPT_TO flag is set.
117
118 2009-05-14  Werner Koch  <wk@g10code.com>
119
120         * gpgme.h.in (gpgme_status_code_t): Explicitly initialize for
121         better maintainability and to help debugging.
122
123 2009-05-05  Marcus Brinkmann  <marcus@g10code.de>
124
125         * gpgme.h.in: Add compile time check for _FILE_OFFSET_BITS.
126
127 2009-04-15  Marcus Brinkmann  <marcus@g10code.de>
128
129         * posix-io.c (_gpgme_io_socket, _gpgme_io_connect): New functions.
130         * w32-io.c (_gpgme_io_connect): Fix stupid error.
131
132 2009-04-08  Marcus Brinkmann  <marcus@g10code.de>
133
134         * w32-glib-io.c (giochannel_table): New members used, fd, socket.
135         (find_channel): Drop CREATE argument.
136         (new_dummy_channel_from_fd, new_channel_from_fd)
137         (new_channel_from_socket): New functions.
138         (_gpgm_io_fd2str): Implement for sockets.
139         (_gpgme_io_write, _gpgme_io_read): Translate EAGAIN errors
140         correctly.
141         (_gpgme_io_pipe): Fix for new channel bookkeeping.
142         (_gpgme_io_close, _gpgme_io_dup): Likewise.
143         (wsa2errno, _gpgme_io_socket, _gpgme_io_connect): New.
144         * w32-io.c (MAX_READERS, MAX_WRITERS): Bump up to 40.
145         (wsa2errno, _gpgme_io_socket, _gpgme_io_connect): New.
146         * w32-qt-io.cpp (_gpgme_io_socket, _gpgme_io_connect): New stubs.
147         * version.c [HAVE_W32_SYSTEM]: Include "windows.h.
148         (do_subsystem_inits) [HAVE_W32_SYSTEM]: Call WSAStartup.
149         * engine-assuan.c (llass_status_handler): Ignore EAGAIN errors.
150
151 2009-03-18  Werner Koch  <wk@g10code.com>
152
153         * gpgme.h.in (GPGME_KEYLIST_MODE_EPHEMERAL): New.
154         * engine-gpgsm.c (gpgsm_keylist): Send new option.
155
156 2009-03-13  Werner Koch  <wk@g10code.com>
157
158         * gpgme-config.in: Make sure locale is set to C.
159
160 2009-02-24  Werner Koch  <wk@g10code.com>
161
162         * gpgme.h.in (struct _gpgme_op_assuan_result): New.
163         (gpgme_assuan_result_t): New.
164         (gpgme_op_assuan_result): Change return type.
165         (struct _gpgme_assuan_sendfnc_ctx)
166         (gpgme_assuan_sendfnc_ctx_t, gpgme_assuan_sendfnc_t):Remove.
167         (gpgme_assuan_inquire_cb_t): Changed.
168         * opassuan.c (op_data_t): Make use of a result structure.
169         (gpgme_op_assuan_result): Change return type.
170         (opassuan_start): Use result structure.
171         (result_cb): Ditto.
172         * engine-assuan.c (struct _gpgme_assuan_sendfnc_ctx): Remove.
173         (inquire_cb_sendfnc): Remove.
174         (inquire_cb): Change for new callback scheme.  Not yet finished.
175         (llass_status_handler): Allow sending a CANCEL from the inquire CB.
176
177 2009-02-04  Werner Koch  <wk@g10code.com>
178
179         * w32-glib-io.c (_gpgme_io_spawn): Make ARGV argument const to
180         match prototype.
181         * w32-qt-io.cpp (_gpgme_io_spawn): Ditto.
182
183 2009-02-03  Werner Koch  <wk@g10code.com>
184
185         * gpgme.h.in (struct _gpgme_subkey): Add fields IS_CARDKEY and
186         CARD_NUMBER..
187         * key.c (gpgme_key_unref): Release field CARD_NUMBER.
188         * keylist.c (keylist_colon_handler): Factor common code out to ...
189         (parse_sec_field15): New.  Set card number.
190
191 2009-01-26  Werner Koch  <wk@g10code.com>
192
193         * opassuan.c, dirinfo.c, engine-assuan.c: New.
194         * Makefile.am:  Add them.
195         * engine-backend.h: Add _gpgme_engine_ops_assuan. 
196         (struct engine_ops): Add field OPASSUAN_TRANSACT.  Update all
197         engine intializers.
198         * Makefile.am (gpgsm_components): Add engine-assuan.c.
199         * gpgme.h.in (gpgme_protocol_t): Add GPGME_PROTOCOL_ASSUAN.
200         (gpgme_assuan_data_cb_t, gpgme_assuan_sendfnc_ctx_t)
201         (gpgme_assuan_inquire_cb_t, gpgme_assuan_status_cb_t): New.
202         (gpgme_op_assuan_transact_start, gpgme_op_assuan_transact): New.
203         * gpgme.c (gpgme_get_protocol_name): Ditto.
204         (gpgme_set_protocol): Support it.
205         * engine.c (gpgme_get_engine_info): Ditto.
206         (engine_ops): Register it.
207         (_gpgme_engine_op_assuan_transact): New.
208         * libgpgme.vers (gpgme_op_assuan_transact_start)
209         (gpgme_op_assuan_transact): New.
210         * gpgme.def (gpgme_op_assuan_transact_start)
211         (gpgme_op_assuan_transact): New.
212         * engine-backend.h (struct engine_ops): Add GET_HOME_DIR and
213         initialize to NULL for all engines.
214         * engine.c (engine_get_home_dir): New.
215         (gpgme_get_engine_info): Use it.
216         (_gpgme_set_engine_info): Use it.
217         * engine.h (engine_assuan_result_cb_t): New.
218         * context.h (ctx_op_data_id_t): Add OPDATA_ASSUAN.
219
220         * util.h (GPG_ERR_UNFINISHED): Define if not yet defined.
221
222         * version.c (gpgme_check_version): Protect trace arg against NULL.
223
224 2009-01-19  Werner Koch  <wk@g10code.com>
225
226         * rungpg.c: Rename to engine-gpg.c
227         * Makefile.am (main_sources): Ditto.
228
229 2008-12-03  Marcus Brinkmann  <marcus@g10code.de>
230
231         * Makefile.am (status-table.h): Use $(builddir) to find gpgme.h.
232
233 2008-11-18  Werner Koch  <wk@g10code.com>
234
235         * version.c (do_subsystem_inits): Always initialize I/O
236         subsystem.  Fixes regression from 2007-08-02.
237
238         * decrypt.c (_gpgme_decrypt_status_handler): Use
239         _gpgme_map_gnupg_error to parse the error code for decrypt.algorithm.
240
241 2008-10-30  Marcus Brinkmann  <marcus@g10code.de>
242
243         * wait-private.c (_gpgme_wait_on_condition): Remove unused
244         variable IDX.
245         * wait-global.c: Include ops.h to silence gcc warning.
246         (_gpgme_wait_global_event_cb): Pass error value directly.
247         * wait-user.c: Include ops.h to silence gcc warning.
248
249         * posix-io.c (_gpgme_io_spawn): Make ARGV argument const to
250         silence gcc warning.  Cast argument to execv to silence warning.
251         * w32-io.c (_gpgme_io_spawn): Likewise.
252         * priv-io.h (_gpgme_io_spawn): Likewise for prototype.
253
254 2008-10-24  Werner Koch  <wk@g10code.com>
255
256         * rungpg.c (gpg_keylist_preprocess): Escape backslashes too.
257
258 2008-10-23  Marcus Brinkmann  <marcus@g10code.de>
259
260         * rungpg.c (gpg_keylist_preprocess): Convert percent escaped
261         string to C coded string.
262
263 2008-10-20  Werner Koch  <wk@g10code.com>
264
265         * Makefile.am (EXTRA_DIST): Add gpgme.h.in.
266
267         * gpgme.h: Rename to gpgme.h.in.
268         * gpgme.h.in (GPGME_VERSION): Use autoconf substitution.
269
270         * posix-io.c: Include sys/uio.h.  Fixes bug #818.
271
272 2008-10-18  Marcus Brinkmann  <marcus@g10code.com>
273
274         * w32-util.c (find_program_in_registry): Don't define.
275         (_gpgme_get_gpg_path, _gpgme_get_gpgsm_path)
276         (_gpgme_get_gpgconf_path): Do not check for fooProgram in the
277         registry anymore.  It is now no longer possible to overwrite the
278         default location in that way.
279
280 2008-10-17  Werner Koch  <wk@g10code.com>
281
282         * w32-glib-io.c (_gpgme_io_fd2str): Use "%d" and not "%ld" to work
283         around a bug in mingw32.
284
285 2008-09-23  Marcus Brinkmann  <marcus@g10code.com>
286
287         * gpgme.c (gpgme_sig_notation_clear): Clear CTX->sig_notations.
288         Submitted by "Daniel Mueller" <daniel@danm.de>
289
290 2008-09-16  Marcus Brinkmann  <marcus@g10code.com>
291
292         * rungpg.c (gpg_new): Don't use errno with ttyname_r.
293
294 2008-08-11  Marcus Brinkmann  <marcus@g10code.com>
295
296         * rungpg.c (gpg_cancel): Remove cmd fd before status fd.
297         * gpgme.c (_gpgme_cancel_with_err): New function.
298         (gpgme_cancel): Reimplement in terms of _gpgme_cancel_with_err.
299         * wait-private.c (_gpgme_wait_on_condition): Use
300         _gpgme_cancel_with_err.
301         * wait-user.c (_gpgme_user_io_cb_handler): Likewise.
302         * wait-global.c (_gpgme_wait_global_event_cb, gpgme_wait): Likewise.
303
304 2008-08-08  Marcus Brinkmann  <marcus@g10code.com>
305
306         * rungpg.c (command_handler): Remove I/O callback on error, too.
307
308 2008-06-29  Marcus Brinkmann  <marcus@g10code.com>
309
310         * gpgme.c (gpgme_cancel_async): Remove unused variable.
311
312 2008-06-27  Marcus Brinkmann  <marcus@g10code.de>
313
314         * libgpgme.vers: Add gpgme_cancel_async.
315         * gpgme.def: Likewise.
316
317         * context.h: Include "sema.h".
318         (struct gpgme_context): New members lock and canceled.
319         * gpgme.c (gpgme_new): Initialize lock.
320         (gpgme_release): Destroy lock.
321         (gpgme_cancel_async): New function.
322         * op-support.c (_gpgme_op_reset): Reset the canceled flag.
323         * wait-global.c (gpgme_wait): Check cancel flag before processing
324         any I/O callbacks.
325         * wait-private.c (_gpgme_wait_on_condition): Likewise.
326         * wait-user.c (_gpgme_user_io_cb_handler): Likewise.
327
328 2008-06-26  Werner Koch  <wk@g10code.com>
329
330         * w32-util.c (_gpgme_mkstemp): Replace sprint by stpcpy.
331         (mkstemp): Need to use GetSystemTimeAsFileTime for better
332         compatibility.
333
334 2008-06-25  Marcus Brinkmann  <marcus@g10code.de>
335
336         * gpgme-w32spawn.c: New file.
337         * Makefile.am (libexec_PROGRAMS) [HAVE_W32_SYSTEM]: New variable
338         with gpgme-w32spawn.
339         * engine-gpgsm.c (gpgsm_new): Use server translated handles.
340         (gpgsm_set_locale): Return early if locale value is NULL.
341         * util.h (_gpgme_mkstemp)
342         (_gpgme_get_w32spawn_path) [HAVE_W32_SYSTEM]: New function
343         prototypes.
344         * w32-util.c: Include <stdint.h>, <sys/stat.h> and <unistd.h>.
345         (letters, mkstemp, _gpgme_mkstemp, _gpgme_get_w32spawn_path): New
346         functions.
347         * rungpg.c (gpg_decrypt, gpg_encrypt, gpg_encrypt_sign)
348         (gpg_genkey, gpg_import, gpg_verify, gpg_sign): Pass data over
349         special filename FD rather than stdin.
350         (struct arg_and_data_s): Add member ARG_LOCP.
351         (struct fd_data_map_s): Add member ARG_LOC.
352         (struct engine_gpg): Add member ARG_LOC to status and colon.
353         (_add_arg, add_arg_with_locp): New function.
354         (add_arg_ext): Reimplement in terms of _add_arg.
355         (gpg_new): Remember argument location for status FD.
356         (build_argv): Set argument location if requested.  Also set
357         argument location of fd_data_map for data items.
358         (start): Adjust caller of _gpgme_io_spawn.
359         * priv-io.h (struct spawn_fd_item_s): Add members peer_name and
360         arg_loc.
361         (_gpgme_io_spawn): Remove parent fd list argument.
362         * posix-io.c (get_max_fds): New function.
363         (_gpgme_io_dup): Add tracing.
364         (_gpgme_io_spawn): Remove parent fd list.  Change meaning of child
365         fd list to contain all child fds that should be inherited.  Close
366         all other file descriptors after fork.
367         * w32-io.c, w32-glib-io.c, w32-qt-io.c(_gpgme_io_spawn): Remove
368         parent fd list.  Change meaning of child fd list to contain all
369         child fds that should be inherited.  Do not inherit any file
370         descriptors, but DuplicateHandle them.  Spawn process through
371         wrapper process.  Provide wrapper process with a temporary file
372         containing handle translation data.  Return translated handle
373         names.
374         * w32-io.c (reader): Add more tracing output.
375         (_gpgme_io_read): Likewise.
376         * engine-gpgconf.c (gpgconf_read): Adjust caller of
377         _gpgme_io_spawn.
378         * version.c (_gpgme_get_program_version): Likewise.
379
380 2008-06-20  Werner Koch  <wk@g10code.com>
381
382         * engine-gpgconf.c (gpgconf_read): Change ARGV initialization for
383         compatibility with old compilers.  Fix amount of memmove.  Fix
384         CR removal.
385
386 2008-06-19  Werner Koch  <wk@g10code.com>
387
388         * gpgme.h (GPGME_CONF_PATHNAME): Replace by GPGME_CONF_FILENAME,
389         change all callers and provide compatibilty macro.
390         (gpgme_conf_type_t): Add complex types 34..37.
391         * engine-gpgconf.c (gpgconf_parse_option, arg_to_data)
392         (_gpgme_conf_arg_new, _gpgme_conf_arg_release): Add new types.
393
394 2008-06-19  Marcus Brinkmann  <marcus@g10code.de>
395
396         * engine-gpgconf.c (gpgconf_parse_option): Fix comma detection.
397
398 2008-05-09  Werner Koch  <wk@g10code.com>
399
400         * engine-gpgconf.c (gpgconf_read): Do not pass empty lines to the
401         callback.
402
403 2008-05-07  Werner Koch  <wk@g10code.com>
404
405         * engine-gpgconf.c (gpgconf_write): Change argv[0] to a
406         self-explaining string.  Needs a proper fix, though.
407
408         * rungpg.c (gpg_keylist, gpg_keylist_ext): Factor common code out
409         to ..
410         (gpg_build_keylist_options): .. new. Allow combination of extern
411         and intern mode.
412         (gpg_new): DFT_TTYNAME is an array, thus check the first character.
413
414 2008-05-06  Werner Koch  <wk@g10code.com>
415
416         * version.c (extract_version_string): New.
417         (_gpgme_get_program_version): Use it to allow for suffixes in the
418         version line.
419
420 2008-04-28  Werner Koch  <wk@g10code.com>
421
422         * engine-gpgconf.c (gpgconf_read): Fixed segv.  Avoid memmove for
423         each line.
424
425 2008-04-22  Marcus Brinkmann  <marcus@g10code.de>
426
427         * w32-qt-io.cpp, kdpipeiodevice.cpp: New versions from Frank
428         Osterfeld, implement blocking select.
429
430 2008-03-11  Marcus Brinkmann  <marcus@g10code.de>
431
432         * data.c (gpgme_data_read, gpgme_data_write): Retry on EINTR.
433
434 2008-03-06  Marcus Brinkmann  <marcus@g10code.de>
435
436         * key.c (_gpgme_key_add_sig): Terminate UID in case SRC is NULL.
437         Reported by Marc Mutz.
438
439 2008-03-05  Marcus Brinkmann  <marcus@g10code.de>
440
441         * decrypt.c (release_op_data): Release OPD->result.recipients.
442         * encrypt.c (release_op_data): Release invalid_recipient.
443
444 2008-02-15  Marcus Brinkmann  <marcus@g10code.de>
445
446         * engine-gpgconf.c (gpgconf_read): Fix end-of-line handline.
447
448 2008-02-14  Werner Koch  <wk@g10code.com>
449
450         * w32-io.c (_gpgme_io_spawn): Add arg R_PID to return the pid.
451         * posix-io.c (_gpgme_io_spawn): Ditto.
452         * w32-glib-io.c (_gpgme_io_spawn): Ditto.
453         * w32-qt-io.cpp (_gpgme_io_spawn): Ditto.
454         * priv-io.h (_gpgme_io_spawn): Adjust prototyp and change all callers.
455         * rungpg.c (start): Call _gpgme_allow_set_foregound_window.
456
457         * w32-util.c (_gpgme_allow_set_foregound_window): New.
458         * posix-util.c (_gpgme_allow_set_foregound_window): New.
459         * engine-gpgsm.c (default_inq_cb): New.
460         (gpgsm_new) [W32]: Enable pinentry notifications.
461         (status_handler): Handle inquiries.
462
463 2008-01-30  Marcus Brinkmann  <marcus@g10code.de>
464
465         * kdpipeiodevice.cpp: New version by Frank Osterfeld, fixes race
466         condition.
467
468 2008-01-28  Marcus Brinkmann  <marcus@g10code.de>
469
470         * engine-gpgsm.c (map_input_enc): Rename to ...
471         (map_data_enc): ... this.  Also change all callers.
472         (gpgsm_encrypt, gpgsm_export, gpgsm_export_ext, gpgsm_genkey)
473         (gpgsm_sign): Set encoding for output.
474
475 2008-01-28  Werner Koch  <wk@g10code.com>
476
477         * keylist.c (gpgme_get_key): Skip duplicated keys.  Fixes bug 876.
478
479 2008-01-14  Marcus Brinkmann  <marcus@g10code.de>
480
481         * engine-gpgconf.c (gpgconf_config_load_cb): Fix program_name
482         field.
483
484 2008-01-10  Marcus Brinkmann  <marcus@g10code.de>
485
486         * kdpipeiodevice.cpp: New version from Frank Osterfeld.
487
488         * engine-gpgconf.c (gpgconf_config_load_cb2): Handle the flag
489         NO_ARG_DESC.
490
491 2008-01-04  Marcus Brinkmann  <marcus@g10code.de>
492
493         * Makefile.am (gpgconf_components): New variable.
494         (main_sources): Add gpgconf.c.
495         * gpgme.h (gpgme_protocol_t): New protocol GPGME_PROTOCOL_GPGCONF.
496         (gpgme_conf_level_t, gpgme_conf_type_t, gpgme_conf_arg_t)
497         (gpgme_conf_opt_t, gpgme_conf_comp_t, gpgme_conf_arg_new)
498         (gpgme_conf_arg_release, gpgme_conf_opt_change)
499         (gpgme_conf_release, gpgme_op_conf_load, gpgme_op_conf_save): New
500         types.
501         * gpgconf.c, engine-gpgconf.c: New files.
502         * engine.h: (_gpgme_engine_op_conf_load,
503         (_gpgme_engine_op_conf_save): New prototypes.
504         * op-support.c (_gpgme_op_reset): Ignore not implemented locale
505         function.
506         * posix-util.c (_gpgme_get_gpgconf_path): New function.
507         * w32-util.c (_gpgme_get_gpgconf_path): New function.
508         * engine-gpgsm.c:
509         (_gpgme_engine_ops_gpgsm): Add stubs for conf_load and conf_save.
510         * rungpg.c:
511         (_gpgme_engine_ops_gpg): Add stubs for conf_load and conf_save.
512         * gpgme.def: Add new gpgconf related interfaces.
513         * libgpgme.vers: Likewise.
514         * util.h (_gpgme_get_gpgconf_path): New prototype.
515         * gpgme.h (gpgme_protocol_t): Add GPGME_PROTOCOL_GPGCONF.
516         * engine-backend.h (_gpgme_engine_ops_gpgconf): New prototype.
517         (struct engine_ops): Add members for conf_load and conf_save.
518         * engine.c (engine_ops): Add _gpgme_engine_ops_gpgconf.
519         (_gpgme_engine_op_conf_load,
520         (_gpgme_engine_op_conf_save): New functions.
521         (gpgme_get_engine_info): Allow protocol GPGME_PROTOCOL_GPGCONF.
522
523 2007-11-28  Marcus Brinkmann  <marcus@g10code.de>
524
525         * w32-util.c (_gpgme_get_gpg_path, _gpgme_get_gpgsm_path): Search
526         for installation directory.  Remove old fallback default.
527         (find_program_in_inst_dir): New function.
528
529 2007-11-26  Werner Koch  <wk@g10code.com>
530
531         * engine-gpgsm.c (struct engine_gpgsm): Add field INLINE_DATA and
532         always reset it before calling start.
533         (gpgsm_new): Clear it.
534         (status_handler): Implement it.
535         (gpgsm_getauditlog) [USE_DESCRIPTOR_PASSING]: Use INLINE_DATA.
536
537 2007-11-23  Werner Koch  <wk@g10code.com>
538
539         * op-support.c (_gpgme_op_reset): Implement a no-reset flag.
540         * getauditlog.c (getauditlog_start): Use that flag.
541
542 2007-11-22  Werner Koch  <wk@g10code.com>
543
544         * gpgme.h (gpgme_op_getauditlog_start, gpgme_op_getauditlog): New.
545         * libgpgme.vers: Ditto.
546         * gpgme.def: Ditto.
547         * getauditlog.c: New.
548         * engine-backend.h (struct engine_ops): Add member GETAUDITLOG.
549         * engine-gpgsm.c (gpgsm_getauditlog): New.
550         (_gpgme_engine_ops_gpgsm): Insert new function.
551         (gpgsm_new): Try to enable audit log support.
552         * rungpg.c (_gpgme_engine_ops_gpg): Insert dummy entry.
553         
554 2007-11-20  Werner Koch  <wk@g10code.com>
555
556         * op-support.c (_gpgme_parse_inv_recp): Add new reason code 11.
557
558 2007-11-12  Marcus Brinkmann  <marcus@g10code.de>
559
560         * kdpipeiodevice.cpp: New version from Frank Osterfeld.
561
562 2007-10-11  Marcus Brinkmann  <marcus@g10code.de>
563
564         * kdpipeiodevice.cpp: New version from Frank Osterfeld.
565
566 2007-10-09  Marcus Brinkmann  <marcus@g10code.de>
567
568         * kdpipeiodevice.cpp: New version from Frank Osterfeld and Marc
569         Mutz.
570
571 2007-10-05  Marcus Brinkmann  <marcus@g10code.de>
572
573         * kdpipeiodevice.cpp, w32-qt-io.cpp: New versions from Frank
574         Osterfeld.
575
576 2007-10-04  Marcus Brinkmann  <marcus@g10code.de>
577
578         * kdpipeiodevice.h, kdpipeiodevice.cpp, kdpipeiodevice.moc,
579         w32-qt-io.cpp: New versions from Frank Osterfeld.
580
581 2007-10-02  Marcus Brinkmann  <marcus@g10code.de>
582
583         * kdpipeiodevice.cpp, kdpipeiodevice.moc: New versions.
584         * w32-qt-io.cpp (_gpgme_io_fd2str): Print actual_fd if available.
585         (_gpgme_io_dup): Only acquire a reference, do not actually dup.
586         Submitted by Frank Osterfeld.
587
588         * priv-io.h, engine-gpgsm.c: Add comments.
589         * w32-qt-io.cpp (_gpgme_io_select): Remove code handling frozen FDs.
590         * w32-glib-io.c (_gpgme_io_close): Always dereference the channel,
591         even if not primary.
592         (_gpgme_io_dup): Acquire a reference.  Replace unused
593         implementation by assertion.
594
595 2007-09-28  Werner Koch  <wk@g10code.com>
596
597         * engine-gpgsm.c (iocb_data_t): Add SERVER_FD_STR.
598         (gpgsm_new): Set it.
599         (gpgsm_set_fd): Use it.
600
601         * w32-glib-io.c (find_channel): Add a new primary flag.
602         (_gpgme_io_close): Close channel only if primary.
603         (_gpgme_io_dup): Put newfd into the table as shallow copy.
604
605         * priv-io.h (struct io_select_fd_s): Remove member FROZEN.
606         * w32-io.c (_gpgme_io_select): Ditto.
607         * w32-glib-io.c (_gpgme_io_select): Ditto.
608
609         * posix-io.c (_gpgme_io_select): Ditto.
610         * rungpg.c (read_status): Ditto.
611         * wait.c (fd_table_put): Ditto.
612
613         * rungpg.c (gpg_io_event): Add tracing.
614         (start): Use gpg_io_event for sending the start event.
615         * engine-gpgsm.c (gpgsm_io_event): Add tracing.
616         (start): Use gpgsm_io_event for sending the start event.
617         * wait.c (_gpgme_add_io_cb, _gpgme_run_io_cb): Add tracing.
618
619 2007-09-28  Marcus Brinkmann  <marcus@g10code.de>
620
621         * kdpipeiodevice.moc, w32-qt-io.cpp, kdpipeiodevice.cpp: New
622         versions from Frank Osterfeld.
623
624 2007-09-27  Marcus Brinkmann  <marcus@g10code.de>
625
626         * w32-glib-io.c (_gpgme_io_spawn),
627         w32-qt-io.cpp (_gpgme_io_spawn), w32-io.c (_gpgme_io_spawn): Close
628         the process handle, return 0.
629
630         * gpgme.h (gpgme_protocol_t): Add GPGME_PROTOCOL_UNKNOWN.
631         * gpgme.c (gpgme_get_protocol_name): Implement support for
632         GPGME_PROTOCOL_UNKNOWN.
633
634         * kdpipeiodevice.h: Fix last change.
635
636         * w32-glib-io.c (_gpgme_io_pipe), w32-qt-io.c (_gpgme_io_pipe),
637         w32-io.c (_gpgme_io_pipe), posix-io.c (_gpgme_io_pipe): Fix debug
638         output.
639
640 2007-09-25  Marcus Brinkmann  <marcus@g10code.de>
641
642         * conversion.c, keylist.c: Include <sys/types.h>.
643
644         * kdpipeiodevice.h: Use namespace _gpgme_.
645         * kdpipeiodevice.cpp: Use namespace _gpgme_.
646         [Q_OS_WIN32 && NOMINMAX]: Do not define NOMINMAX again.
647         * w32-qt-io.cpp: Change namespace of KDPipeIODevice to
648         _gpgme_::KDPipeIODevice.
649
650 2007-09-17  Werner Koch  <wk@g10code.com>
651
652         * rungpg.c (gpg_new): Make robust against undefined ttyname or
653         ttytype.
654
655 2007-09-14  Werner Koch  <wk@g10code.com>
656
657         * data-mem.c (gpgme_data_release_and_get_mem): Fix tracing bug.
658
659 2007-09-14  Marcus Brinkmann  <marcus@g10code.de>
660
661         * gpgme.c (gpgme_release): Call gpgme_sig_notation_clear.
662
663 2007-09-13  Marcus Brinkmann  <marcus@g10code.de>
664
665         * rungpg.c (gpg_new): Handle return value of _gpgme_getenv (fixes
666         small memory leak).
667
668 2007-09-07  Marcus Brinkmann  <marcus@g10code.de>
669
670         * Makefile.am (libgpgme_qt_la_SOURCES): Move
671         moc_kdpipeiodevice.cpp to EXTRA_DIST, as this is only included by
672         another file (it's more like a header file than a cpp file, but
673         automake doesn't know that).
674
675         * w32-qt-io.cpp (_gpgme_io_spawn): Fix several cast errors and typos.
676         * w32-io.c (_gpgme_io_write): Use TRACE_SYSRES instead of TRACE_SYS.
677         (libgpgme_qt_la_LIBADD): Add QT4_CORE_LIBS, not QT4_CORE_LIB.
678
679         * kdpipeiodevice.h, kdpipeiodevice.cpp, moc_kdpipeiodevice.cpp,
680         kdpipeiodevice.moc, w32-qt-io.c: New files.
681         * Makefile.am (ltlib_gpgme_extra): Rename to ltlib_gpgme_glib.
682         (ltlib_gpgme_qt): New variable.
683         (lib_LTLIBRARIES): Add $(ltlib_gpgme_qt).
684         (libgpgme_qt_la_SOURCES): New variable.
685         (AM_CPPFLAGS): Add @QT4_CORE_INCLUDES@
686         (AM_CFLAGS): Add @QT4_CORE_CFLAGS@.
687         (libgpgme_qt_la_LDFLAGS, libgpgme_qt_la_DEPENDENCIES)
688         (libgpgme_qt_la_LIBADD): New variables.
689
690         * sema.h (struct critsect_s): Rename "private" to "priv" to make
691         C++ users happy.  Change users.
692         * posix-sema.c (_gpgme_sema_cs_enter, _gpgme_sema_cs_leave)
693         (_gpgme_sema_cs_destroy): Likewise.
694         * w32-sema.c (critsect_init, _gpgme_sema_cs_enter)
695         (_gpgme_sema_cs_leave, _gpgme_sema_cs_destroy): Likewise.
696         * w32-glib-io.c (gpgme_get_giochannel): Change return type to
697         void*.
698         (gpgme_get_fdptr): New function.
699         * w32-io.c (gpgme_get_fdptr): New function
700         * gpgme.def: Add gpgme_get_fdptr.
701
702 2007-08-22  Marcus Brinkmann  <marcus@g10code.de>
703
704         * w32-io.c (_gpgme_io_write): Return early if COUNT is zero.
705         (writer): Remove superfluous check.
706
707 2007-08-20  Marcus Brinkmann  <marcus@g10code.de>
708
709         * gpgme.h: Move include of gpg-error.h out of extern "C".
710
711 2007-08-07  Werner Koch  <wk@g10code.com>
712
713         * gpgme.h (struct _gpgme_signature): Add member CHAIN_MODEL.
714         * verify.c (parse_trust): Set Chain_MODEL.
715
716 2007-08-02  Werner Koch  <wk@g10code.com>
717
718         * w32-glib-io.c (_gpgme_io_spawn): Use DETACHED_PROCESS flag.
719         * w32-io.c (_gpgme_io_spawn): Ditto.
720         (_gpgme_io_write): Map ERROR_NO_DATA to EPIPE.
721         * debug.c (_gpgme_debug): Enable assuan logging.
722         (_gpgme_debug_subsystem_init): New.
723         * version.c (do_subsystem_inits): Disable assuan logging and
724         initialize the debug system.
725         (gpgme_check_version): Do not trace before the subsystems are
726         initialized.
727
728 2007-07-17  Marcus Brinkmann  <marcus@g10code.de>
729
730         * debug.c: Include <errno.h> and "debug.h".
731         (_gpgme_debug): Save and restore ERRNO.
732         (TOHEX): New macro.
733         (_gpgme_debug_buffer): New function.
734         * conversion.c, data-compat.c, data-mem.c, data.c, engine-gpgsm.c,
735         gpgme.c, keylist.c, posix-io.c, rungpg.c, sign.c, version.c,
736         w32-io.c, wait.c: Replace DEBUG macros by TRACE_* variants.  In
737         most of these files, add many more tracepoints.
738
739 2007-07-16  Marcus Brinkmann  <marcus@g10code.de>
740
741         * engine-gpgsm.c (status_handler): Do not send BYE here.
742
743         * w32-io.c (struct reader_context_s, struct writer_context_s): New
744         members REFCOUNT.
745         (create_reader, create_writer): Initialize C->refcount to 1.
746         (destroy_reader, destroy_writer): Only destroy if C->refcount
747         drops to 0.
748         (find_reader, find_writer, kill_reader, kill_writer): Beautify.
749         * priv-io.h (_gpgme_io_dup): New prototype.
750         * posix-io.c (_gpgme_io_dup): New function. 
751         * w32-io.c (_gpgme_io_dup): Likewise.
752         * w32-glib-io.c (_gpgme_io_dup): Likewise.
753         * engine-gpgsm.c (start): Reverting to version 2007-07-10.
754
755 2007-07-13  Marcus Brinkmann  <marcus@g10code.de>
756
757         * data-user.c (user_read, user_write, user_seek): Set errno and
758         return -1 instead returning the error code directly.
759         * data-compat.c (old_user_seek): Likewise.
760         * gpgme.c (gpgme_sig_notation_add): Return error properly.
761
762         * Revert the "close_notify_handler" returns int stuff.  Always
763         close in the _gpgme_io_close implementations.
764         * engine-gpgsm.c (status_handler): Try to terminate the connection
765         in case of error.
766         * w32-io.c (_gpgme_io_read): Return C->error_code in ERRNO.
767         (_gpgme_io_write): Likewise.
768         
769         * priv-io.h (_gpgme_io_set_close_notify): Change type of HANDLER
770         to _gpgme_close_notify_handler.
771         (_gpgme_close_notify_handler): New type.
772         (_gpgme_io_dup): Remove prototype.
773         * posix-io.c (notify_table, _gpgme_io_set_close_notify): Change
774         type of HANDLER to _gpgme_close_notify_handler_t.
775         (_gpgme_io_close): Do not close the FD if handler returns 0.
776         (_gpgme_io_dup): Remove function.
777         * w32-io.c (notify_table, _gpgme_io_set_close_notify,
778         _gpgme_io_close): Change type of HANDLER to
779         _gpgme_close_notify_handler_t.
780         (_gpgme_io_close): Do not close the FD if handler returns 0.
781         (_gpgme_io_dup): Remove function.
782         * w32-glib-io.c (_gpgme_io_dup): Remove function.
783         (_gpgme_io_set_close_notify, notify_table): Change type of HANDLER
784         to _gpgme_close_notify_handler_t.
785         (_gpgme_io_close): Do not close the FD if handler returns 0.
786         * rungpg.c (close_notify_handler): Change return type to int,
787         return 1.
788         * engine-gpgsm.c (close_notify_handler): Change return type to
789         int, return 0 for status FD and 1 for all other FDs.
790         (start): Do not duplicate the status FD.
791
792 2007-07-12  Marcus Brinkmann  <marcus@g10code.de>
793
794         * Makefile.am: Replace implicite rule by suffix rule.  Add
795         SUFFIXES for that.
796
797 2007-07-12  Werner Koch  <wk@g10code.com>
798
799         * version.c (do_subsystem_inits) [W32]: Make sure that the socket
800         system has been started.
801
802 2007-07-10  Marcus Brinkmann  <marcus@g10code.de>
803
804         * priv-io.h (_gpgme_io_dup): New prototype.
805         * posix-io.c (_gpgme_io_dup): New function. 
806         * w32-io.c (_gpgme_io_dup): Likewise.
807         * w32-glib-io.c (_gpgme_io_dup): Likewise.
808         * engine-gpgsm.c (start): Use _gpgme_dup() instead of dup().
809
810 2007-07-08  Marcus Brinkmann  <marcus@g10code.de>
811
812         * engine-gpgsm.c [HAVE_W32_SYSTEM]: Enable the bunch of the file.
813         * funopen.c (funopen): Rename to _gpgme_funopen.
814
815 2007-04-30  Marcus Brinkmann  <marcus@g10code.de>
816
817         * engine-gpgsm.c (gpgsm_new): Fix error handling for ttyname_r.
818         * rungpg.c (gpg_new): Likewise.
819         Submitted by Stephen Tether.
820
821 2007-02-26  Werner Koch  <wk@g10code.com>
822
823         * verify.c (op_data_t): New element PLAINTEXT_SEEN.
824         (_gpgme_verify_status_handler): Return an error if more than one
825         plaintext has been seen.
826         (parse_error): New arg SET_STATUS. Also detect it based on an
827         ERROR status (gpg > 1.4.6).
828
829 2007-01-26  Werner Koch  <wk@g10code.com>
830
831         * w32-io.c (build_commandline): Fixed stupid quoting bug.
832         * w32-glib-io.c (build_commandline): Ditto.
833
834         * rungpg.c (gpg_set_locale): Avoid dangling pointer after free.
835
836         * gpgme-config.in: New options --get-gpg and --get-gpgsm.
837
838 2007-01-18  Marcus Brinkmann  <marcus@g10code.de>
839
840         * data.h (_gpgme_data_get_fd): Add prototype.
841         (gpgme_data_get_fd_cb): New type.
842         (struct _gpgme_data_cbs): New member get_fd.
843         * data.c (_gpgme_data_get_fd): New function.
844         * data-fd.c (fd_get_fd): New function.
845         (fd_cbs): Add fd_get_fd.
846         * data-stream.c (stream_get_fd): New function.
847         (stream_cbs): Add stream_get_fd.
848         * data-mem.c (mem_cbs): Add NULL for get_fd callback.   
849         * data-user.c (user_cbs): Likewise.
850         * engine-gpgsm.c (gpgsm_set_fd) [USE_DESCRIPTOR_PASSING]: Try to
851         short-cut by passing the data descriptor directly.
852
853 2007-01-17  Marcus Brinkmann  <marcus@g10code.de>
854
855         * w32-io.c (build_commandline): Quote all command line arguments.
856         * w32-glib-io.c (build_commandline): Likewise.
857
858 2007-01-10  Werner Koch  <wk@g10code.com>
859
860         * ttyname_r.c (ttyname_r) [W32]: Return a dummy name.
861
862 2007-01-08  Werner Koch  <wk@g10code.com>
863
864         * version.c (do_subsystem_inits): Do assuan init only if building
865         with Assuan.
866         * setenv.c: Include assuan-def.h only if building with Assuan
867         support.
868
869         * op-support.c (_gpgme_op_reset): Set LC_MESSAGES only if
870         if defined.
871         * engine-gpgsm.c (gpgsm_set_locale): Ditto.
872         * rungpg.c (gpg_set_locale): Ditto.
873
874 2006-12-17  Marcus Brinkmann  <marcus@g10code.de>
875
876         * gpgme.c (gpgme_set_protocol): Shut down the engine when
877         switching protocols.
878         (gpgme_ctx_set_engine_info): Likewise for engine info.
879         * engine.h (_gpgme_engine_reset): New function prototype.
880         * engine.c (_gpgme_engine_reset): New function.
881         * engine-backend.h (struct engine_ops): New member RESET.
882         * rungpg.c (_gpgme_engine_ops_gpg): Add NULL for reset function.
883         * engine-gpgsm.c (_gpgme_engine_ops_gpgsm)
884         [USE_DESCRIPTOR_PASSING]: Add gpgsm_reset for reset.
885         (_gpgme_engine_ops_gpgsm) [!USE_DESCRIPTOR_PASSING]: Add NULL for
886         reset function.
887         (gpgsm_reset) [USE_DESCRIPTOR_PASSING]: New function.
888         * op-support.c (_gpgme_op_reset): Try to use the engine's reset
889         function if available.
890         * engine-gpgsm.c (gpgsm_new): Move code to dup status_fd to ...
891         (start): ... here.
892         * posix-io.c (_gpgme_io_recvmsg, _gpgme_io_sendmsg): New functions.
893         
894         * engine.h (_gpgme_engine_new): Remove arguments lc_ctype and
895         lc_messages from prototype.
896         (_gpgme_engine_set_locale): New prototype.
897         * engine.c (_gpgme_engine_set_locale): New function.
898         * op-support.c (_gpgme_op_reset): Call _gpgme_engine_set_locale.
899         * engine-backend.h (struct engine_ops): Add new member SET_LOCALE.
900         Remove arguments lc_messages and lc_ctype from member NEW.
901         * engine-gpgsm.c (struct engine_gpgsm): New members lc_ctype_set
902         and lc_messages_set.
903         (gpgsm_new): Remove lc_messages and lc_ctype
904         arguments.
905         (gpgsm_set_locale): New function.
906         (_gpgme_engine_ops_gpgsm): Add gpgsm_set_locale.
907         * rungpg.c (struct engine_gpg): Add new members lc_messages and
908         lc_ctype.
909         (gpg_release): Release lc_messages and lc_ctype if set.
910         (gpg_new): Remove lc_messages and lc_ctype arguments.
911         (gpg_set_locale): New function.
912         (_gpgme_engine_ops_gpg): Add gpg_set_locale.
913         (add_arg): Implement in terms of:
914         (add_arg_ext): New function.
915         (start): Set lc-messages and lc-ctype arguments here.
916
917 2006-12-03  Marcus Brinkmann  <marcus@g10code.de>
918
919         * engine-gpgsm.c (struct engine_gpgsm): Move members
920         input_fd_server, output_fd_server, message_fd_server to ...
921         (iocb_data): ... here (as server_fd).
922         (close_notify_handler): Reset tags as well.
923         (gpgsm_new): Implement support for descriptor
924         passing.
925         (fd_type_t): New type.
926         (gpgsm_clear_fd): New function.  Use it instead of _gpgsm_io_close
927         for unused communication channels.
928         (gpgsm_set_fd): Rewritten to support descriptor passing.  All
929         relevant callers adjusted as well (previously of _gpgme_io_close).
930
931 2006-12-02  Marcus Brinkmann  <marcus@g10code.de>
932
933         * version.c: Include "assuan.h".
934         (do_subsystem_inits): Call assuan_set_assuan_err_source.
935
936 2006-12-01  Marcus Brinkmann  <marcus@g10code.de>
937
938         * Makefile.am (libgpgme_real_la_SOURCES): Rename to main_sources.
939         (libgpgme_la_SOURCES, libgpgme_pthread_la_SOURCES,
940         libgpgme_glib_la_SOURCES, libgpgme_pth_la_SOURCES): Add
941         $(main_sources).
942         (libgpgme_la_DEPENDENCIES, libgpgme_la_LIBADD,
943         libgpgme_pthread_la_DEPENDENCIES, libgpgme_pthread_la_LIBADD,
944         libgpgme_pth_la_DEPENDENCIES, libgpgme_pth_la_LIBADD,
945         libgpgme_glib_la_DEPENDENCIES, libgpgme_glib_la_LIBADD): Remove
946         libgpgme-real.la.
947         (noinst_LTLIBRARIES): Removed.
948         (libgpgme_glib_la_CFLAGS, libgpgme_pth_la_CFLAGS): Removed.
949         (AM_CFLAGS): New variable.
950
951 2006-11-30  Marcus Brinkmann  <marcus@g10code.de>
952
953         * engine-gpgsm.c: Replace AssuanError with gpg_error_t and
954         ASSUAN_CONTEXT with assuan_context_t.
955
956 2006-11-29  Marcus Brinkmann  <marcus@g10code.de>
957
958         * engine-gpgsm.c (gpgsm_new): Check return value of
959         assuan_pipe_connect.
960
961         * rungpg.c: Include <unistd.h>.
962         (gpg_new): Support --display, --ttyname, --ttytype, --lc-ctype and
963         --lc-messages.  Fixes issue 734.
964
965 2006-10-24  Marcus Brinkmann  <marcus@g10code.de>
966
967         * trustlist.c (gpgme_op_trustlist_next): Return error if OPD is
968         NULL.
969
970 2006-10-23  Marcus Brinkmann  <marcus@g10code.de>
971
972         * wait-global.c (gpgme_wait): Unlock CTX_LIST_LOCK while calling
973         _gpgme_engine_io_event().
974
975         * keylist.c (gpgme_op_keylist_next): Return error if OPD is NULL.
976
977 2006-09-25  Marcus Brinkmann  <marcus@g10code.de>
978
979         * data-mem.c (gpgme_data_release_and_get_mem): Release the data
980         object properly.
981
982 2006-09-22  Marcus Brinkmann  <marcus@g10code.de>
983
984         * keylist.c (keylist_colon_handler): Move debug output after
985         initialising KEY.
986
987 2006-07-29  Marcus Brinkmann  <marcus@g10code.de>
988
989         * gpgme-config.in (Options): Add NETLIBS.
990         * Makefile.am (libgpgme_la_LIBADD, libgpgme_pthread_la_LIBADD,
991         libgpgme_pth_la_LIBADD, libgpgme_glib_la_LIBADD): Add NETLIBS.
992
993         * rungpg.c (read_status): Fix comparison disguising as an
994         assignment.
995
996 2005-03-24  Marcus Brinkmann  <marcus@g10code.de>
997
998         * gpgme.c (gpgme_set_locale): Remove conditional on
999         HAVE_W32_SYSTEM, and just check for LC_MESSAGES.
1000
1001 2006-07-16  Marcus Brinkmann  <marcus@g10code.de>
1002
1003         * rungpg.c (read_status): Strip potential carriage return.
1004         * genkey.c (get_key_parameter): Skip potential carriage return.
1005         * version.c (_gpgme_get_program_version): Strip potential carriage
1006         return.
1007
1008         * data.c (gpgme_data_set_file_name): Allow to clear the file name
1009         by passing NULL.
1010
1011 2006-06-22  Marcus Brinkmann  <marcus@g10code.de>
1012
1013         * keylist.c (gpgme_get_key): Also clone the engine info.
1014
1015 2006-03-06  Marcus Brinkmann  <marcus@g10code.de>
1016
1017         * gpgme-config.in (cflags_pth): Revert accidential removal of
1018         pthread support with last change.
1019
1020 2006-02-28  Marcus Brinkmann  <marcus@g10code.de>
1021
1022         * w32-glib-io.c (O_BINARY) [!O_BINARY]: New macro.
1023         (_gpgme_io_pipe): Open pipes in binary mode.
1024
1025 2006-02-22  Marcus Brinkmann  <marcus@g10code.de>
1026
1027         * engine.c (gpgme_engine_check_version): Reimplemented to allow
1028         checking the version correctly even after changing the engine
1029         information.  Bug reported by Stéphane Corthésy.
1030
1031         * rungpg.c (read_colon_line): Invoke colon preprocess handler if
1032         it is set.
1033         (colon_preprocessor_t): New type.
1034         (struct engine_gpg): New member colon.preprocess_fnc.
1035         (gpg_keylist_preprocess): New function.
1036         * keylist.c (keylist_colon_handler): Allow short key IDs.
1037
1038 2006-02-15  Marcus Brinkmann  <marcus@g10code.de>
1039
1040         * w32-io.c (create_writer): Make C->have_data a manually resetted
1041         event.
1042         (writer): Move code from end of if block to beginning, so it
1043         is also run the first time.
1044         (_gpgme_io_write): Move assert check after error check.  Reset
1045         the is_empty event, and also do it eagerly.
1046         (_gpgme_io_select): Unconditionally wait for the is_empty event.
1047
1048 2006-01-26  Werner Koch  <wk@g10code.com>
1049
1050         * w32-util.c (_gpgme_get_conf_int): New.
1051         * posix-util.c (_gpgme_get_conf_int): New.
1052         * w32-io.c (get_desired_thread_priority): New.
1053         (create_reader, create_writer): Use it here.
1054
1055 2006-01-04  Werner Koch  <wk@g10code.com>
1056
1057         * debug.h (_gpgme_debug_srcname): New. Use it with the debug macros.
1058
1059         * w32-glib-io.c (_gpgme_io_set_nonblocking): Add debug
1060         statements. Disable error return for failed nonblocking call.
1061
1062 2006-01-03  Marcus Brinkmann  <marcus@g10code.de>
1063
1064         * w32-glib-io.c (_gpgme_io_close): Only close fd if there is no
1065         channel for it.
1066
1067 2005-12-31  Marcus Brinkmann  <marcus@g10code.de>
1068
1069         * w32-glib-io.c (find_channel): Set channel to unbuffered.
1070         (_gpgme_io_select): Fix debug output.
1071
1072 2005-12-23  Werner Koch  <wk@g10code.com>
1073
1074         * gpgme.h (struct _gpgme_signature): Append field PKA_ADDRESS.
1075         * verify.c (release_op_data, _gpgme_verify_status_handler): Set
1076         this field.
1077
1078 2005-12-20  Werner Koch  <wk@g10code.com>
1079
1080         * gpgme.h (gpgme_status_code_t): Added GPGME_STATUS_PKA_TRUST_BAD
1081         and GPGME_STATUS_PKA_TRUST_GOOD.
1082         (struct _gpgme_signature): New field pka_trust.
1083         * verify.c (_gpgme_verify_status_handler): Set pka_trust.
1084
1085 2005-12-06  Werner Koch  <wk@g10code.com>
1086
1087         * keylist.c (keylist_colon_handler): Store fingerprints of the
1088         subkeys.  Reset the secret flag of subkeys for stub secret keys.
1089         (NR_FIELDS): Bumped up to 16
1090
1091 2005-11-27  Marcus Brinkmann  <marcus@g10code.de>
1092
1093         * engine.c (_gpgme_set_engine_info): Use new_file_name in
1094         engine_get_version invocation.  Reported by Stéphane Corthésy.
1095
1096 2005-11-24  Marcus Brinkmann  <marcus@g10code.de>
1097
1098         * w32-glib-io.c (_gpgme_io_fd2str): Remove debug printf.
1099
1100 2005-11-18  Werner Koch  <wk@g10code.com>
1101
1102         * w32-glib-io.c: Include glib.h before windows to avoid a symbol
1103         shadowing warning.
1104         (find_channel): Better use g_io_channel_win32_new_fd instead of
1105         the autodetection function g_io_channel_unix_new.
1106         (_gpgme_io_select): Rewritten.  It is now a fully working select
1107         implementation.
1108
1109 2005-11-18  Marcus Brinkmann  <marcus@g10code.de>
1110
1111         * priv-io.h (_gpgme_io_fd2str): New prototype.
1112         * posix-io.c (_gpgme_io_fd2str): New function.
1113         * w32-io.c (_gpgme_io_fd2str): New function.
1114         * rungpg.c: Use this new function.
1115         * w32-glib-io.c (_gpgme_io_fd2str): Rewrote the file handle code
1116         again.  Two's company, three's the musketeers.
1117
1118         * w32-glib-io.c: Rewrote the file handle code.  We don't create
1119         system fds for every handle (doesn't work for inherited handles),
1120         but we create pseudo fds in a private namespace that designate a
1121         handle and potentially a giochannel.
1122
1123 2005-11-18  Werner Koch  <wk@g10code.com>
1124
1125         * versioninfo.rc.in: Set file version to LT-version + Svn-revision.
1126
1127 2005-11-17  Marcus Brinkmann  <marcus@g10code.de>
1128
1129         * w32-glib-io.c: New file.
1130         * gpgme.def (gpgme_get_giochannel): Add symbol.
1131         * Makefile.am (system_components) [HAVE_DOSISH_SYSTEM]: Remove
1132         w32-io.c.
1133         (ltlib_gpgme_extra): New variable.
1134         (lib_LTLIBRARIES): Add $(ltlib_gpgme_extra).
1135         (system_components_not_extra): New variable.
1136         (libgpgme_la_SOURCES, libgpgme_pthread_la_SOURCES,
1137         (libgpgme_pth_la_SOURCES): Add $(system_components_not_extra).
1138         (libgpgme_glib_la_LDFLAGS, libgpgme_glib_la_DEPENDENCIES,
1139         (libgpgme_glib_la_LIBADD, libgpgme_glib_la_CFLAGS)
1140         [BUILD_W32_GLIB]: New variables. 
1141         * gpgme-config.in (glib): New option.
1142         * gpgme.m4 (AM_PATH_GPGME_GLIB): New macro.
1143
1144 2005-11-17  Marcus Brinkmann  <marcus@g10code.de>
1145
1146         * priv-io.h (_gpgme_io_waitpid, _gpgme_io_kill): Removed.
1147         * w32-io.c (_gpgme_io_waitpid, _gpgme_io_kill): Removed.
1148         * posix-io.c (_gpgme_io_kill): Removed.
1149         (_gpgme_io_waitpid): Declare static.
1150
1151 2005-10-24  Marcus Brinkmann  <marcus@g10code.de>
1152
1153         * w32-io.c (_gpgme_io_spawn): Don't minimize window, hide it.
1154
1155 2005-10-21  Werner Koch  <wk@g10code.com>
1156
1157         * Makefile.am: Fixed cut+paste problem
1158
1159 2005-10-20  Marcus Brinkmann  <marcus@g10code.de>
1160
1161         * Makefile.am: Build versioninfo.lo, not versioninfo.o.  Also, fix
1162         the whole mess.
1163
1164 2005-10-16  Marcus Brinkmann  <marcus@g10code.de>
1165
1166         * rungpg.c (gpg_edit): Don't add a key argument if in card edit
1167         mode.
1168
1169 2005-10-06  Marcus Brinkmann  <marcus@g10code.de>
1170
1171         * Makefile.am (gpgme.dll gpgme.dll.a): Use $(srcdir) for
1172         gpgme.def.
1173
1174         * gpgme.h (gpgme_free): New prototype.
1175         * data-mem.c (gpgme_free): New function.
1176         * libgpgme.vers (GPGME_1.1): Add gpgme_free.
1177         * gpgme.def: Add gpgme_free.
1178
1179 2005-10-02  Marcus Brinkmann  <marcus@g10code.de>
1180
1181         * util.h (_gpgme_decode_percent_string): Add new argument BINARY
1182         to prototype.
1183         * verify.c (parse_notation): Likewise for invocation.
1184         * conversion.c (_gpgme_decode_percent_string): Likewise to
1185         declaration.  If set, do not replace '\0' characters with a
1186         printable string.
1187         * gpgme.h (struct _gpgme_key_sig): New field notations.
1188         * ops.h (_gpgme_parse_notation): New prototype.
1189         * sig-notation.c (_gpgme_parse_notation): New function.
1190         * key.c (gpgme_key_unref): Free all signature notations.
1191         * keylist.c (op_data_t): New member tmp_keysig.
1192         (finish_key): Clear OPD->tmp_keysig.
1193         * gpgme.c (gpgme_set_keylist_mode): Remove check.
1194         * rungpg.c (gpg_keylist): Support listing signature notations.
1195         (gpg_keylist_ext): Likewise.
1196
1197 2005-10-01  Marcus Brinkmann  <marcus@g10code.de>
1198
1199         * engine.h (_gpgme_set_engine_info): Add prototype.
1200         * engine-backend.h (struct engine_ops): Change return type of
1201         get_file_name() to const char * to silence gcc warning.
1202         * engine.c (engine_get_file_name): Change return type to const
1203         char * to silence gcc warning.
1204         (gpgme_get_engine_info): Use transitional variable to go from
1205         const char * to char * to silence gcc warning.
1206         (_gpgme_set_engine_info): Likewise.
1207         * engine-gpgsm.c (struct engine_gpgsm): Change type of LINE to
1208         char * to silence gcc warning.
1209         (gpgsm_new): Make ARGV a pointer to const char.
1210         (status_handler): Change type of SRC, END, DST, ALINE and NEWLINE
1211         to char * to silence gcc warning.
1212
1213         * gpgme.def: Add gpgme_data_set_file_name,
1214         gpgme_data_get_file_name, gpgme_sig_notation_clear,
1215         gpgme_sig_notation_add and gpgme_sig_notation_get.
1216         * libgpgme.vers: Add gpgme_sig_notation_clear,
1217         gpgme_sig_notation_add and gpgme_sig_notation_get.
1218         * Makefile.am (libgpgme_real_la_SOURCES): Add sig-notation.c.
1219         * context.h (struct gpgme_context): New field sig_notations.
1220         * gpgme.h (struct _gpgme_sig_notation): New member value_len and
1221         critical.
1222         (GPGME_SIG_NOTATION_CRITICAL): New symbol.
1223         (gpgme_sig_notation_flags_t): New type.
1224         (gpgme_sig_notation_add, gpgme_sig_notation_clear,
1225         gpgme_sig_notation_get): New prototypes.
1226         * ops.h (_gpgme_sig_notation_create, _gpgme_sig_notation_free):
1227         New prototypes.
1228         * sig-notation.c (_gpgme_sig_notation_free): New file.
1229         * verify.c (parse_notation): Use support functions.
1230         (release_op_data): Likewise.
1231         * rungpg.c (append_args_from_sig_notations): New function.
1232         (gpg_encrypt_sign, gpg_sign): Call it.
1233
1234 2005-09-30  Marcus Brinkmann  <marcus@g10code.de>
1235
1236         * data.h (struct gpgme_data): New member file_name.
1237         * data.c (gpgme_data_set_filename): New function.
1238         (_gpgme_data_release): Free DH->filename if necessary.
1239         (gpgme_data_get_filename): New function.
1240         * rungpg.c (gpg_encrypt): Set filename option.
1241         (gpg_encrypt_sign): Likewise.
1242         (gpg_sign): Likewise.
1243         * libgpgme.vers (GPGME_1.1): Add gpgme_data_set_file_name and
1244         gpgme_data_get_file_name.
1245
1246         * decrpyt.c, verify.c, gpgme.h: Replace plaintext_filename with
1247         file_name.
1248
1249 2005-09-29  Marcus Brinkmann  <marcus@g10code.de>
1250
1251         * gpgme.h (struct _gpgme_key): Add field is_qualified.
1252         (struct _gpgme_subkey): Likewise.
1253         * keylist.c (set_subkey_capability, set_mainkey_capability): Set
1254         field is_qualified.
1255
1256 2005-09-23  Werner Koch  <wk@g10code.com>
1257
1258         * w32-io.c (_gpgme_io_pipe): Removed use of environment variable
1259         again.
1260         (create_reader, create_writer): Set thread priority higher.
1261
1262 2005-09-19  Werner Koch  <wk@g10code.com>
1263
1264         * w32-io.c (_gpgme_io_pipe): New environment variable to change
1265         the size of the pipe buffer.
1266
1267 2005-09-13  Werner Koch  <wk@g10code.com>
1268
1269         * ath.c: Changes to make it work under W32.
1270
1271 2005-09-12  Marcus Brinkmann  <marcus@g10code.de>
1272
1273         * Makefile.am (libgpgme_la_SOURCES): Set to ath.h and ath.c.
1274         (ath_pth_src, ath_pthread_src): Removed.
1275         (w32_o_files): Replace ath-compat.o with ath.o.
1276         (libgpgme_pth_la_CFLAGS): New variable.
1277         * ath-compat.c, ath-pthread-compat.c, ath-pth-compat.c: Removed.
1278         * ath.h (ath_pthread_available, ath_pth_available): Removed.
1279         (ath_init) [!_ATH_EXT_SYM_PREFIX]: Do not define macro.
1280         (struct ath_ops, ath_init) [_ATH_COMPAT]: Removed.
1281         (_ATH_COMPAT): Macro removed.
1282         * posix-sema.c (_gpgme_sema_subsystem_init): Do not call
1283         _gpgme_ath_init.
1284
1285 2005-09-12  Marcus Brinkmann  <marcus@g10code.de>
1286
1287         * keylist.c (release_op_data): Do not free opd->tmp_uid.
1288
1289 2005-09-07  Werner Koch  <wk@g10code.com>
1290
1291         * w32-io.c (build_commandline): Quote argv[0].
1292
1293 2005-08-26  Marcus Brinkmann  <marcus@g10code.de>
1294
1295         * rungpg.c (command_handler): Use _gpgme_io_write instead of write.
1296
1297         * edit.c (command_handler): Do not depend on PROCESSED being
1298         available.
1299
1300         * engine.h (engine_command_handler_t): Add new argument processed.
1301         * ops.h (_gpgme_passphrase_command_handler_internal): Rename
1302         prototype to ...
1303         (_gpgme_passphrase_command_handler): ... this one.
1304         * passphrase.c (_gpgme_passphrase_command_handler_internal):
1305         Rename to ...
1306         (_gpgme_passphrase_command_handler): ... this one.
1307         * edit.c (command_handler): Add new argument processed.  Remove
1308         local variable with the same name.  Always return processed as
1309         true.
1310         * rungpg.c (command_handler): Send a newline character if the
1311         handler did not.
1312
1313 2005-08-26  Werner Koch  <wk@g10code.com>
1314
1315         * w32-util.c (read_w32_registry_string): Updated from code used by
1316         GnuPG.  This allows for expanding strings and features the
1317         implicit fallback key.
1318         (w32_shgetfolderpath, find_program_at_standard_place): New.
1319         (_gpgme_get_gpg_path, _gpgme_get_gpgsm_path): With no registry
1320         entry, locate the programs at the standard place.
1321         (dlopen, dlsym, dlclose): New, so that we can keep on using what
1322         we are accustomed to.
1323
1324         * debug.c (debug_init): Use PATHSEP_C so that under W32 a
1325         semicolon is used which allows us to create files with drive
1326         letters.
1327
1328         * w32-io.c (_gpgme_io_read, _gpgme_io_write): Print content in
1329         debug mode too.
1330
1331 2005-08-19  Werner Koch  <wk@g10code.com>
1332
1333         * gpgme.def: New.
1334         * versioninfo.rc.in: New.
1335         * Makefile.am: Addes support for building a W32 DLL.
1336         
1337         * ttyname_r.c (ttyname_r) [W32]: Return error.
1338         * ath-compat.c [W32]: select and co are not yet supported; return
1339         error.
1340         * data-stream.c (stream_seek): Use ftell if ftello is not available.
1341
1342 2005-08-08  Werner Koch  <wk@g10code.com>
1343
1344         * util.h (stpcpy): Renamed to ..
1345         (_gpgme_stpcpy): .. this and made inline.  This avoids duplicate
1346         definitions when linking statically.
1347         * stpcpy.c: Removed.
1348         
1349 2005-07-27  Marcus Brinkmann  <marcus@g10code.de>
1350
1351         * gpgme.h (gpgme_status_code_t): Add GPGME_STATUS_PLAINTEXT.
1352         (struct _gpgme_op_decrypt_result): New member plaintext_filename.
1353         (struct _gpgme_op_verify_result): Likewise.
1354         * ops.h (_gpgme_parse_plaintext): Add prototype.
1355         * op-support.c (_gpgme_parse_plaintext): New function.
1356         * decrypt.c (release_op_data): Release
1357         OPD->result.plaintext_filename.
1358         (_gpgme_decrypt_status_handler): Handle GPGME_STATUS_PLAINTEXT.
1359         * verify.c (release_op_data): Release
1360         OPD->result.plaintext_filename.
1361         (_gpgme_verify_status_handler): Handle GPGME_STATUS_PLAINTEXT.
1362
1363 2005-07-26  Marcus Brinkmann  <marcus@g10code.de>
1364
1365         * keylist.c (gpgme_get_key): Allow key IDs.
1366
1367 2005-06-20  Marcus Brinkmann  <marcus@g10code.de>
1368
1369         * gpgme.m4: Only call GPGME_CONFIG if found.
1370
1371 2005-06-03  Marcus Brinkmann  <marcus@g10code.de>
1372
1373         * gpgme.h (struct _gpgme_signature): New members pubkey_algo and
1374         hash_algo.
1375         * verify.c (parse_valid_sig): Parse pubkey and hash algo numbers.
1376         (parse_new_sig): Parse pubkey, hash algo and timestamp for ERRSIG.
1377
1378         (_gpgme_decrypt_status_handler): Fix last change.
1379
1380         * gpgme.h (struct _gpgme_recipient): New structure.
1381         (gpgme_recipient_t): New type.
1382         (struct _gpgme_op_decrypt_result): Add member recipients.
1383         * decrypt.c (op_data_t): New member last_recipient_p.
1384         (_gpgme_op_decrypt_init_result): Initialize last_recipient_p.
1385         (parse_enc_to): New function.
1386         (_gpgme_decrypt_status_handler): Handle status ENC_TO and
1387         NO_SECKEY.
1388
1389         * wait-global.c (gpgme_wait): Break out of the fd processing loop
1390         after an error.
1391         Reported by Igor Belyi <gpgme@katehok.ac93.org>.
1392
1393 2005-06-02  Marcus Brinkmann  <marcus@g10code.de>
1394
1395         * wait.h (_gpgme_run_io_cb): New prototype.
1396         * wait.c (_gpgme_run_io_cb): New function.
1397         * wait-global.c (gpgme_wait): Call it.
1398         * wait-user.c (_gpgme_user_io_cb_handler): Likewise.
1399         * wait-private.c (_gpgme_wait_on_condition): Likewise.
1400
1401 2005-06-02  Werner Koch  <wk@g10code.com>
1402
1403         * passphrase.c (_gpgme_passphrase_status_handler): Take care of
1404         GPGME_STATUS_NEED_PASSPHRASE_PIN.
1405         (_gpgme_passphrase_command_handler_internal): Also act on the key
1406         "passphrase.pin.ask".
1407
1408         * gpgme.h: Added status codes GPGME_STATUS_SIG_SUBPACKET,
1409         GPGME_STATUS_NEED_PASSPHRASE_PIN, GPGME_STATUS_SC_OP_FAILURE,
1410         GPGME_STATUS_SC_OP_SUCCESS, GPGME_STATUS_CARDCTRL,
1411         GPGME_STATUS_BACKUP_KEY_CREATED.
1412
1413 2005-05-28  Marcus Brinkmann  <marcus@g10code.de>
1414
1415         * data-user.c: Include <errno.h>.
1416
1417 2005-05-17  Marcus Brinkmann  <marcus@g10code.de>
1418
1419         * gpgme.c (gpgme_new): Set the CTX->include_certs default to the
1420         default.
1421
1422 2005-05-11  Marcus Brinkmann  <marcus@g10code.de>
1423
1424         * w32-io.c (_gpgme_io_select): Fix loop increment.
1425
1426 2005-05-05  Marcus Brinkmann  <marcus@g10code.de>
1427
1428         * data-user.c (user_release): Only call user hook if provided.
1429         (user_seek): Return EBADF if no user hook is provided.
1430         (user_read): Likewise.
1431         (user_write): Likewise.
1432
1433 2005-04-28  Marcus Brinkmann  <marcus@g10code.de>
1434
1435         * gpgme.h (GPGME_INCLUDE_CERTS_DEFAULT): New macro.
1436         * engine-gpgsm.c (gpgsm_sign): Send the include-certs option after
1437         the reset, just for cleanliness, and do not sent it at all if the
1438         default is requested.
1439         * gpgme.c (gpgme_set_include_certs): Allow to use
1440         GPGME_INCLUDE_CERTS_DEFAULT.
1441
1442 2005-04-21  Werner Koch  <wk@g10code.com>
1443
1444         * verify.c (calc_sig_summary): Set the key revoked bit.
1445
1446 2005-04-14  Marcus Brinkmann  <marcus@g10code.de>
1447
1448         * wait-global.c (gpgme_wait): Use LI->ctx when checking a context
1449         in the list, not the user-provided CTX.
1450         Reported by Igor Belyi <gpgme@katehok.ac93.org>.
1451
1452         * wait-global.c (gpgme_wait): If no context is found, and we
1453         should not hang, set *status to 0 and return NULL.
1454         Reported by Igor Belyi <gpgme@katehok.ac93.org>.
1455
1456 2005-03-24  Marcus Brinkmann  <marcus@g10code.de>
1457
1458         * data.h (EOPNOTSUPP) [_WIN32]: Remove definition.
1459         * data.c (EOPNOTSUPP) [HAVE_W32_SYSTEM]: Remove definition.
1460         (gpgme_data_read, gpgme_data_write, gpgme_data_seek): Return
1461         ENOSYS instead EOPNOTSUPP.
1462         * data-compat.c (EOPNOTSUPP) [HAVE_W32_SYSTEM]: Remove definition.
1463         (gpgme_error_to_errno): Map GPG_ERR_NOT_SUPPORTED
1464         to ENOSYS.
1465
1466 2005-03-24  Marcus Brinkmann  <marcus@g10code.de>
1467
1468         * io.h: Rename to ...
1469         * priv-io.h: ... this.
1470         * Makefile.am (libgpgme_real_la_SOURCES): Change io.h to priv-io.h.
1471         * data.c, engine-gpgsm.c, posix-io.c, rungpg.c, version.c,
1472         w32-io.c, wait-private.c, wait-global.c, wait-user.c, wait.c:
1473         Change all includes of "io.h" to "priv-io.h"
1474         
1475 2005-03-09  Werner Koch  <wk@g10code.com>
1476
1477         * w32-util.c (_gpgme_get_gpg_path, _gpgme_get_gpgsm_path): Do not
1478         cast away type checks.
1479
1480         * io.h [W32]: Do not include stdio.h.  If it is needed do it at
1481         the right place.
1482
1483         * data.h [W32]: Removed kludge for EOPNOTSUP.
1484         * data.c, data-compat.c [W32]: Explicitly test for it here.
1485
1486         Replaced use of _WIN32 by HAVE_W32_SYSTEM except for public header
1487         files.
1488
1489 2005-03-07  Timo Schulz  <twoaday@g10code.de>
1490  
1491         * gpgme.h: [_WIN32] Removed ssize_t typedef.
1492         * ath.h: [_WIN32] Added some (dummy) types.
1493         * io.h: [_WIN32] include stdio.h.
1494         * data.h: [_WIN32] Define EOPNOTSUPP.
1495         * w32-io.c [_WIN32] (_gpgme_io_subsystem_init): New.
1496         * gpgme.c [_WIN32] (gpgme_set_locale): Disabled.
1497
1498 2004-12-12  Marcus Brinkmann  <marcus@g10code.de>
1499
1500         * engine.c (_gpgme_set_engine_info): Fix assertion.
1501
1502 2004-12-11  Marcus Brinkmann  <marcus@g10code.de>
1503
1504         * util.h [HAVE_CONFIG_H && HAVE_TTYNAME_R] (ttyname_r): Define
1505         prototype.
1506         * ttyname_r.c: New file.
1507
1508 2004-12-07  Marcus Brinkmann  <marcus@g10code.de>
1509
1510         * putc_unlocked.c, funopen.c: I just claim copyright on these
1511         files and change their license to LGPL, because they are totally
1512         trivial wrapper functions.
1513         * isascii.c: Change copyright notice to the one from ctype/ctype.h
1514         in the GNU C Library (CVS Head 2004-10-10), where isascii is
1515         defined as a macro doing exactly the same as the function in this
1516         file.
1517         * memrchr.c: Update from the GNU C Library (CVS Head 2001-07-06).
1518         * stpcpy.c: Update from the GNU C Library (CVS Head 2004-10-10).
1519         * ath.c, ath-compat.c, ath.h, ath-pth.c, ath-pth-compat.c,
1520         ath-pthread.c, ath-pthread-compat.c, context.h, conversion.c,
1521         data.c, data-compat.c, data-fd.c, data.h, data-mem.c,
1522         data-stream.c, data-user.c, debug.c, debug.h, decrypt.c,
1523         decrypt-verify.c, delete.c, edit.c, encrypt.c, encrypt-sign.c,
1524         engine-backend.h, engine.c, engine-gpgsm.c, engine.h, error.c,
1525         export.c, genkey.c, get-env.c, gpgme.c, gpgme.h, import.c, io.h,
1526         key.c, keylist.c, mkstatus, Makefile.am, ops.h, op-support.c,
1527         passphrase.c, posix-io.c, posix-sema.c, posix-util.c, progress.c,
1528         rungpg.c, sema.h, sign.c, signers.c, trust-item.c, trustlist.c,
1529         util.h, verify.c, version.c, w32-io.c, w32-sema.c, w32-util.c,
1530         wait.c, wait-global.c, wait.h, wait-private.c, wait-user.c: Change
1531         license to LGPL.
1532
1533 2004-12-07  Marcus Brinkmann  <marcus@g10code.de>
1534
1535         * libgpgme.vers (GPGME_1.1): New version.
1536         * engine-backend.h (struct engine_ops): Add argument FILE_NAME to
1537         member get_version().  Add arguments FILE_NAME and HOME_DIR to
1538         member new().  Change return type of get_file_name and get_version
1539         to char *.
1540         * engine-gpgsm.c (gpgsm_get_version): Change return type to char
1541         pointer.  Do not cache result.
1542         (gpgsm_new): Add file_name and home_dir argument, and use them
1543         instead of the defaults, if set.
1544         * rungpg.c (struct engine_gpg): New member file_name.
1545         (gpg_get_version): Change return type to char pointer, and do not
1546         cache result.
1547         (gpg_release): Free gpg->file_name.
1548         (gpg_new): Take new arguments file_name and home_dir.  Set the
1549         --homedir argument if HOME_DIR is not NULL.  Set gpg->file_name.
1550         (start): Use gpg->file_name instead _gpgme_get_gpg_path, if set.
1551         * engine.h (_gpgme_engine_info_copy, _gpgme_engine_info_release):
1552         New prototypes.
1553         (_gpgme_engine_new): Change first argument to gpgme_engine_info_t
1554         info.
1555         * engine.c: Include <assert.h>.
1556         (gpgme_get_engine_info): Set *INFO within the lock.  Move
1557         ENGINE_INFO and ENGINE_INFO_LOCK to ....
1558         (engine_info, engine_info_lock): ... here.  New static variables.
1559         (engine_get_version): Add file_name argument to
1560         get_version invocation.  Change return type to char pointer.
1561         (gpgme_engine_check_version): Rewritten to free() the return value
1562         of engine_get_version after using it.
1563         (_gpgme_engine_info_release): New function.
1564         (gpgme_get_engine_info): Rewritten.
1565         (_gpgme_engine_info_copy): New function.
1566         (_gpgme_set_engine_info): New function.
1567         (gpgme_set_engine_info): New function.
1568         (_gpgme_engine_new): Change first argument to gpgme_engine_info_t
1569         info, and use that.
1570         * gpgme.h (struct _gpgme_engine_info): Change type of file_name
1571         and version to char * (remove the const).  New member home_dir.
1572         (gpgme_set_engine_info, gpgme_ctx_get_engine_info,
1573         gpgme_ctx_set_engine_info): New prototypes.
1574         * context.h (struct gpgme_context): New member engine_info.
1575         * gpgme.c (gpgme_new): Allocate CTX->engine_info.
1576         (gpgme_release): Deallocate CTX->engine_info.
1577         (gpgme_ctx_get_engine_info, gpgme_ctx_set_engine_info): New
1578         functions.
1579         * op-support.c (_gpgme_op_reset): Look for correct engine info and
1580         pass it to _gpgme_engine_new.
1581         * version.c (gpgme_check_version): Adjust to
1582         _gpgme_compare_versions returning an int.
1583         (_gpgme_compare_versions): Return an int value, not a const char
1584         pointer.
1585         * ops.h (_gpgme_compare_versions): Same for prototype.
1586
1587 2004-10-03  Marcus Brinkmann  <marcus@g10code.de>
1588
1589         * verify.c (parse_trust): If no reason is provided, set
1590         SIG->validity_reason to 0.
1591         (calc_sig_summary): Set GPGME_SIGSUM_CRL_TOO_OLD if appropriate.
1592
1593 2004-10-22  Marcus Brinkmann  <marcus@g10code.de>
1594
1595         * engine-gpgsm.c (map_assuan_error): Return 0 if ERR is 0.
1596         (start): Call map_assuan_error on return value of
1597         assuan_write_line.
1598
1599 2004-10-05  Marcus Brinkmann  <marcus@g10code.de>
1600
1601         * op-support.c (_gpgme_op_data_lookup): Use char pointer for
1602         pointer arithmetic.
1603
1604 2004-09-30  Marcus Brinkmann  <marcus@g10code.de>
1605
1606         * gpgme.m4: Implement the --api-version check.
1607
1608         * rungpg.c (read_status): Move the polling of the output data pipe
1609         to just before removing the command fd, from just before adding
1610         it.  This avoids buffering problems.
1611
1612         * data.c (_gpgme_data_inbound_handler): Use _gpgme_io_read, not
1613         read, to improve debug output.
1614
1615 2004-09-29  Marcus Brinkmann  <marcus@g10code.de>
1616
1617         * gpgme.h (GPGME_IMPORT_NEW, GPGME_IMPORT_UID, GPGME_IMPORT_SIG,
1618         GPGME_IMPORT_SUBKEY, GPGME_IMPORT_SECRET,
1619         (GPGME_KEYLIST_MODE_LOCAL, GPGME_KEYLIST_MODERN_EXTERN,
1620         GPGME_KEYLIST_MODE_SIGS, GPGME_KEYLIST_MODE_VALIDATE): Change from
1621         enum to macros.
1622         (gpgme_keylist_mode_t): Define as unsigned int.
1623         (gpgme_key_t): Change type of keylist_mode to
1624         gpgme_keylist_mode_t.
1625
1626 2004-09-23  Marcus Brinkmann  <marcus@g10code.de>
1627
1628         * data.c (_gpgme_data_outbound_handler): Close the file descriptor
1629         if we get an EPIPE.
1630         
1631         * data-stream.c (stream_seek): Call ftello and return the current
1632         offset.
1633         * data.h (struct gpgme_data): Change type of data.mem.offset to
1634         off_t.
1635         * data.c (gpgme_data_seek): Check dh->cbs->seek callback, not read
1636         callback.  If SEEK_CUR, adjust the offset by the pending buffer
1637         size.  Clear pending buffer on success.
1638
1639
1640 2004-09-14  Marcus Brinkmann  <marcus@g10code.de>
1641
1642         * gpgme.m4: Add copyright notice.
1643
1644 2004-08-18  Marcus Brinkmann  <marcus@g10code.de>
1645
1646         * passphrase.c (_gpgme_passphrase_status_handler): Always run the
1647         status handler.
1648
1649 2004-08-17  Marcus Brinkmann  <marcus@g10code.de>
1650
1651         * rungpg.c (build_argv): Use --no-sk-comment, not --no-comment.
1652
1653 2004-06-23  Marcus Brinkmann  <marcus@g10code.de>
1654
1655         * key.c (_gpgme_key_append_name): Make sure tail points to the
1656         byte following the uid.
1657         (_gpgme_key_add_sig): Likewise.  Don't use calloc, but malloc and
1658         memset.
1659
1660 2004-06-02  Marcus Brinkmann  <marcus@g10code.de>
1661
1662         * libgpgme.vers: Remove C-style comment, which is not supported by
1663         older binutils.
1664
1665 2004-05-21  Marcus Brinkmann  <marcus@g10code.de>
1666
1667         * gpgme-config.in (Options): Support --api-version.
1668
1669         * libgpgme.vers: List all gpgme symbols under version GPGME_1.0.
1670
1671         * decrypt.c (_gpgme_decrypt_status_handler): Fix last change.
1672         * verify.c (parse_error): Likewise.
1673
1674         * verify.c (parse_error): Do not skip location of where token.
1675
1676         * gpgme.h (gpgme_status_code_t): Add GPGME_STATUS_REVKEYSIG.
1677         * verify.c (_gpgme_verify_status_handler): Add handling of
1678         GPGME_STATUS_REVKEYSIG.
1679         (parse_trust): Likewise.
1680
1681 2004-05-21  Marcus Brinkmann  <marcus@g10code.de>
1682
1683         * gpgme.h (struct _gpgme_decrypt_result): New fields
1684         wrong_key_usage and _unused.
1685         * decrypt.c (_gpgme_decrypt_status_handler): Don't skip over
1686         character after a matched string, as in a protocol error this
1687         could skip over the trailing binary zero.
1688         Handle decrypt.keyusage error notifications.
1689
1690         * gpgme.h (struct _gpgme_key): New member keylist_mode.
1691         * keylist.c (keylist_colon_handler): Set the keylist_mode of KEY.
1692
1693 2004-04-29  Marcus Brinkmann  <marcus@g10code.de>
1694
1695         * gpgme.h (struct _gpgme_signature): Change member WRONG_KEY_USAGE
1696         to unsigned int.  Same for member _unused.
1697
1698         * keylist.c (set_mainkey_trust_info): Rewritten.
1699         (set_subkey_capability): Handle 'd' (disabled).
1700         (set_mainkey_capability): Rewritten.
1701
1702 2004-04-22  Marcus Brinkmann  <marcus@g10code.de>
1703
1704         * gpgme.m4: Quote first argument to AC_DEFUN.
1705
1706 2004-04-21  Werner Koch  <wk@gnupg.org>
1707
1708         * key.c (gpgme_key_unref): Allow passing NULL like free does.
1709         The rule of least surprise.
1710
1711 2004-04-15  Werner Koch  <wk@gnupg.org>
1712
1713         * verify.c (prepare_new_sig, _gpgme_verify_status_handler): Remove
1714         unused result.signatures items.
1715
1716         * keylist.c (gpgme_get_key): Return an error if FPR is NULL.
1717
1718 2004-04-08  Werner Koch  <wk@gnupg.org>
1719
1720         * verify.c (_gpgme_verify_status_handler): Ignore the error status
1721         if we can't process it.
1722         * decrypt-verify.c (decrypt_verify_status_handler): Backed out
1723         yesterday's hack.  It is not any longer required.
1724
1725 2004-04-07  Werner Koch  <wk@gnupg.org>
1726
1727         * decrypt-verify.c (decrypt_verify_status_handler): Hack to cope
1728         with meaningless error codes from the verify status function.
1729
1730 2004-04-05  Werner Koch  <wk@gnupg.org>
1731
1732         * gpgme.h: Add GPGME_STATUS_NEWSIG.
1733
1734         * verify.c (parse_error): Compare only the last part of the where
1735         token.
1736         (prepare_new_sig): New.
1737         (parse_new_sig): Use prepare_new_sig when required.
1738         (_gpgme_verify_status_handler): Handle STATUS_NEWSIG.
1739
1740         * engine-gpgsm.c (gpgsm_keylist_ext): Send with-validation
1741         option.  Fixed pattern construction.
1742         (status_handler): Add debugging output.
1743
1744 2004-03-23  Marcus Brinkmann  <marcus@g10code.de>
1745
1746         * engine-gpgsm.c (gpgsm_new): Protect _only_ tty related code with
1747         isatty().  Submitted by Bernhard Herzog.
1748
1749 2004-03-11  Marcus Brinkmann  <marcus@g10code.de>
1750
1751         * engine-gpgsm.c (gpgsm_new): Protect all tty related code with
1752         isatty().
1753
1754         * rungpg.c (gpg_cancel): Set GPG->fd_data_map to NULL after
1755         releasing it.
1756         * engine-gpgsm.c (gpgsm_cancel): Only call assuan_disconnect if
1757         GPGSM->assuan_ctx is not NULL.  Set it to NULL afterwards.
1758
1759 2004-03-07  Marcus Brinkmann  <marcus@g10code.de>
1760
1761         * gpgme-config.in: Do not emit include and lib directory for
1762         prefix "/usr" or "".
1763
1764 2004-03-03  Werner Koch  <wk@gnupg.org>
1765
1766         * engine-gpgsm.c (gpgsm_export_ext): Properly insert a space
1767         beween patterns.
1768
1769 2004-02-18  Werner Koch  <wk@gnupg.org>
1770
1771         * gpgme-config.in: Ignore setting of --prefix.
1772
1773 2004-02-25  Marcus Brinkmann  <marcus@g10code.de>
1774
1775         * rungpg.c (gpg_cancel): New function.
1776         (gpg_release): Call it here.
1777         (_gpgme_engine_ops_gpg): Add it here.
1778         * engine-gpgsm.c (gpgsm_cancel): Fix last change.
1779
1780 2004-02-24  Marcus Brinkmann  <marcus@g10code.de>
1781
1782         * gpgme.c (gpgme_cancel): New function.
1783         * engine-backend.h (struct engine_ops): New member cancel.
1784         * engine.h (_gpgme_engine_cancel): New prototype.
1785         * engine.c (_gpgme_engine_cancel): New function.
1786         * engine-gpgsm.c (_gpgme_engine_ops_gpgsm): Add new member cancel.
1787         (gpgsm_cancel): New function.
1788         (gpgsm_release): Use it.
1789         * rungpg.c (_gpgme_engine_ops_gpg): Add new member cancel.
1790
1791 2004-02-17  Werner Koch  <wk@gnupg.org>
1792
1793         * gpgme.h: Add GPGME_KEYLIST_MODE_VALIDATE. 
1794         * engine-gpgsm.c (gpgsm_keylist): Send this to gpgsm.
1795
1796 2004-02-15  Werner Koch  <wk@gnupg.org>
1797
1798         * memrchr.c (memrchr): Fixed implementation.  Problem pointed out
1799         by Adriaan de Groot.
1800
1801 2004-02-01  Marcus Brinkmann  <marcus@g10code.de>
1802
1803         * rungpg.c (build_argv): Use --no-comment, not --comment "".
1804
1805         * data-compat.c (gpgme_data_new_from_filepart): Call fseeko if
1806         available.
1807         * data-stream.c (stream_seek): Likewise.
1808
1809 2004-01-16  Werner Koch  <wk@gnupg.org>
1810
1811         * conversion.c (_gpgme_map_gnupg_error): Handle numerical codes as
1812         used by GnuPG 1.9.x
1813
1814 2004-01-13  Marcus Brinkmann  <marcus@g10code.de>
1815
1816         * gpgme.h (struct _gpgme_key_sig): Fix comment on REVOKED.
1817
1818 2004-01-12  Werner Koch  <wk@gnupg.org>
1819
1820         * sign.c: Include util.h for prototype of _gpgme_parse_timestamp.
1821
1822 2003-12-25  Marcus Brinkmann  <marcus@g10code.de>
1823
1824         * gpgme.h (_GPGME_D_CLASS): Revert this change.
1825         (struct _gpgme_key_sig): For C++ compilers, rename class
1826         member to _obsolete_class.  Add new member sig_class.
1827         (struct _gpgme_new_signature): Same here.
1828         * key.c (gpgme_key_sig_get_ulong_attr): Use CERTSIG->sig_class,
1829         not CERTSIG->class.
1830         * keylist.c (keylist_colon_handler): Likewise for KEYSIG, but keep
1831         setting KEYSIG->class, too.  Rename variable CLASS to SIG_CLASS.
1832         * sign.c (parse_sig_created): Set SIG->sig_class.
1833
1834 2003-12-22  Werner Koch  <wk@gnupg.org>
1835
1836         * gpgme.h (_GPGME_D_CLASS): Kludge for C++ compatibility without
1837         changing the C API.
1838
1839 2003-11-19  Werner Koch  <wk@gnupg.org>
1840
1841         * conversion.c (_gpgme_parse_timestamp): New.
1842         (atoi_1, atoi_2, atoi_4): New.
1843         * keylist.c (parse_timestamp): Removed. Changed all callers to use
1844         the new function.
1845         * verify.c (parse_valid_sig): Ditto.  Repalced the errno check.
1846         * sign.c (parse_sig_created): Ditto.
1847
1848 2003-10-31  Werner Koch  <wk@gnupg.org>
1849
1850         * keylist.c (parse_timestamp): Detect ISO 8601 timestamps and try
1851         to convert them.
1852
1853 2003-10-10  Marcus Brinkmann  <marcus@g10code.de>
1854
1855         * genkey.c (get_key_parameter): Make a copy of the key parameters.
1856         Submitted by Miguel Coca <e970095@zipi.fi.upm.es>.
1857
1858 2003-10-06  Marcus Brinkmann  <marcus@g10code.de>
1859
1860         * data-compat.c: Include <sys/time.h> before <sys/stat.h> for
1861         broken systems.
1862
1863         * engine-gpgsm.c (map_assuan_error): If ERR is -1, return sensible
1864         error.
1865
1866         * io.h (_gpgme_io_subsystem_init): New prototype.
1867         * posix-io.c (_gpgme_io_subsystem_init): Add function.
1868         (_gpgme_io_spawn): Do not fixup signal handler here.
1869         * version.c (do_subsystem_inits): Call _gpgme_io_subsystem_init.
1870
1871         * debug.c (debug_init): Drop const qualifier from E.
1872
1873         * ath.h (struct ath_ops): Make ADDR argument of CONNECT prototype
1874         const.
1875         (ath_connect): Make ADDR argument const.
1876         * ath-pthread.c (ath_connect): Likewise.
1877         * ath-pth.c (ath_connect): Likewise.
1878         * ath-compat.c (ath_connect): Likewise.
1879         * ath.c (ath_connect): Likewise.
1880
1881         * ath.h [HAVE_SYS_SELECT_H]: Include <sys/select.h> for fd_set.
1882         [!HAVE_SYS_SELECT_H]: Include <sys/time.h>.
1883
1884         * conversion.c (_gpgme_hextobyte): Drop "unsigned" from type of
1885         SRC argument.
1886         * util.h (_gpgme_hextobyte): Likewise for prototype.
1887
1888         * gpgme.h: Remove trailing comma in enum.
1889
1890         * rungpg.c: Do not include <time.h>, <sys/time.h>, <sys/types.h>,
1891         <signal.h>, <fcntl.h>, or "unistd.h".
1892
1893 2003-10-02  Marcus Brinkmann  <marcus@g10code.de>
1894
1895         * engine-backend.h (struct engine_ops): Add argument TYPE.
1896         * engine.c (_gpgme_engine_op_edit): Likewise.
1897         * engine.h: Likewise.
1898         * rungpg.c (gpg_edit): Likewise.  Use it.
1899         * edit.c (edit_start): Likewise.  Pass it on.
1900         (gpgme_op_edit_start, gpgme_op_edit): Likewise.
1901         (gpgme_op_card_edit_start, gpgme_op_card_edit): New functions.
1902
1903 2003-09-30  Marcus Brinkmann  <marcus@g10code.de>
1904
1905         * gpgme.h (gpg_strerror_r): Change prototype to match
1906         gpg_strerror_r change.
1907         * error.c (gpg_strerror_r): Likewise, also update implementation.
1908
1909         * gpgme.c (gpgme_hash_algo_name): Change name of RMD160 to
1910         RIPEMD160, name of TIGER to TIGER192, name of CRC32-RFC1510 to
1911         CRC32RFC1510, and name of CRC24-RFC2440 to CRC24RFC2440.
1912
1913 2003-09-14  Marcus Brinkmann  <marcus@g10code.de>
1914
1915         * gpgme.h: Add prototype for gpgme_set_locale.
1916
1917         * gpgme.h: Define macro _GPGME_INLINE depending on the compiler
1918         characteristics and use that instead __inline__.
1919
1920         * context.h (struct gpgme_context): New members lc_ctype and
1921         lc_messages.
1922         * gpgme.c: Include <locale.h>.
1923         (def_lc_lock, def_lc_ctype, def_lc_messages): New static
1924         variables.
1925         (gpgme_set_locale): New function.
1926         * engine.c (_gpgme_engine_new): Add arguments lc_ctype and
1927         lc_messages.
1928         * engine.h (_gpgme_engine_new): Likewise.
1929         * engine-gpgsm.c (gpgsm_new): Likewise.
1930         * rungpg.c (gpg_new): Likewise.
1931         * engine-backend.h (struct engine_ops): Likewise to NEW.
1932         * op-support.c (_gpgme_op_reset): Likewise to invocation of
1933         _gpgme_engine_new.
1934
1935 2003-09-13  Marcus Brinkmann  <marcus@g10code.de>
1936
1937         * gpgme.h (gpgme_strerror_r): New prototype.
1938         * error.c (gpgme_strerror_r): New function.
1939
1940         * get-env.c: New file.
1941         * util.h (_gpgme_getenv): Add prototype.
1942         * Makefile.am (libgpgme_real_la_SOURCES): Add get-env.c.
1943         * rungpg.c (build_argv): Use _gpgme_getenv.
1944         * debug.c (debug_init): Likewise.
1945         * engine-gpgsm.c (gpgsm_new): Likewise.
1946         (gpgsm_new): Use ttyname_r.
1947         * w32-io.c (_gpgme_io_spawn): Disable debugging for now.
1948
1949 2003-09-03  Marcus Brinkmann  <marcus@g10code.de>
1950
1951         * gpgme-config.in: Use $libdir, not @libdir@, for the echo
1952         command.
1953
1954         * gpgme-config.in: Rewritten.
1955         * gpgme.m4: Rewritten.
1956
1957 2003-08-19  Marcus Brinkmann  <marcus@g10code.de>
1958
1959         The ath files (ath.h, ath.c, ath-pth.c, ath-pthread.c,
1960         ath-compat.c, ath-pth-compat.c and ath-pthread-compat.c) have been
1961         updated to have better thread support, and the Makefile.am was
1962         changed to reflect that.
1963
1964         * util.h [!HAVE_FOPENCOOKIE]: Remove fopencookie declaration.
1965         * engine-gpgsm.c (gpgsm_assuan_simple_command): Set ERR to return
1966         value of status_fnc.
1967         * rungpg.c (start): Return SAVED_ERRNO, not errno.
1968
1969 2003-08-18  Marcus Brinkmann  <marcus@g10code.de>
1970
1971         * rungpg.c (start): Use saved_errno instead errno.
1972
1973 2003-08-18  Marcus Brinkmann  <marcus@g10code.de>
1974
1975         * funopen.c, putc_unlocked.c, isascii.c, memrchr.c: New files.
1976         * fopencookie.c: File removed.
1977
1978 2003-08-15  Marcus Brinkmann  <marcus@g10code.de>
1979
1980         * gpgme-config.in: Put gpg-error related flags after gpgme's.
1981
1982 2003-08-14  Marcus Brinkmann  <marcus@g10code.de>
1983
1984         * gpgme.h (struct _gpgme_new_signature): Rename member CLASS to
1985         _OBSOLETE_CLASS, add member CLASS with type unsigned int.
1986         * sign.c (parse_sig_created): Also set SIG->_unused_class for
1987         backward compatibility.
1988
1989 2003-08-04  Marcus Brinkmann  <marcus@g10code.de>
1990
1991         * verify.c (parse_new_sig): Fix status parsing case.
1992
1993 2003-07-31  Marcus Brinkmann  <marcus@g10code.de>
1994
1995         * gpgme.h (struct _gpgme_subkey): Add flag CAN_AUTHENTICATE.
1996         Lower _UNUSED to 23 bits.
1997         (struct _gpgme_key): Likewise.
1998         * keylist.c (set_mainkey_capability): Support 'a' and 'A'.
1999         (set_subkey_capability): Support 'a'.
2000
2001         * keylist.c (gpgme_get_key): Check if there is more than one key
2002         listed, and return GPG_ERR_AMBIGUOUS_NAME in that case.
2003
2004         * util.h (_gpgme_decode_c_string): Change type of LEN argument to
2005         size_t.
2006         (_gpgme_decode_percent_string): Likewise.
2007         * conversion.c (_gpgme_decode_c_string): Likewise.
2008         (_gpgme_decode_percent_string): Likewise.
2009         (_gpgme_map_gnupg_error): Change type of I to unsigned int.
2010         * signers.c (gpgme_signers_clear): Likewise.
2011         (gpgme_signers_enum): New unsigned variable SEQNO, set to SEQ.
2012         Use SEQNO instead SEQ.
2013         * wait.c (fd_table_put): Change type of I and J to unsigned int.
2014         * wait-global.c (_gpgme_wait_global_event_cb): Change type of IDX
2015         to unsigned int.
2016         (gpgme_wait): Change type of I and IDX to unsigned int.
2017         * wait-private.c (_gpgme_wait_on_condition): Change type of IDX
2018         and I to unsigned int.
2019         * posix-io.c (_gpgme_io_close): Cast return value of macro DIM to
2020         int to suppress gcc warning.
2021         (_gpgme_io_set_close_notify): Likewise.
2022         (_gpgme_io_select): Change type of I to unsigned int.
2023         * engine.c (gpgme_get_engine_info): Change type of PROTO to
2024         unsigned int.
2025         * wait-user.c (_gpgme_user_io_cb_handler): Change type of IDX and
2026         I to unsigned int.
2027
2028 2003-07-29  Marcus Brinkmann  <marcus@g10code.de>
2029
2030         * decrypt-verify.c (decrypt_verify_status_handler): Expand silly
2031         and wrong expression.
2032         * encrypt-sign.c (encrypt_sign_status_handler): Likewise.
2033         * encrypt.c (encrypt_sym_status_handler): Likewise.
2034         * sign.c (sign_status_handler): Likewise.
2035         * verify.c (verify_status_handler): Likewise.
2036         * decrypt.c (decrypt_status_handler): Likewise.
2037
2038         * engine.c (gpgme_get_engine_info): Initialize NULL.
2039
2040 2003-07-23  Marcus Brinkmann  <marcus@g10code.de>
2041
2042         * gpgme-config.in (gpg_error_libs): Quote GPG_ERROR_CFLAGS and
2043         GPG_ERROR_LIBS when setting the corresponding variables.
2044         Reported by Stéphane Corthésy.
2045
2046 2003-07-22  Marcus Brinkmann  <marcus@g10code.de>
2047
2048         * engine-gpgsm.c (set_recipients): Move declaration of NEWLEN to
2049         the beginning of the block.
2050
2051 2003-06-22  Marcus Brinkmann  <marcus@g10code.de>
2052
2053         * data-mem.c (mem_write): Copy original buffer content.
2054
2055 2003-06-22  Marcus Brinkmann  <marcus@g10code.de>
2056
2057         * gpgme.h (gpgme_user_ids_release, gpgme_user_ids_append): Remove
2058         prototypes.
2059
2060 2003-06-06  Marcus Brinkmann  <marcus@g10code.de>
2061
2062         * Makefile.am (AM_CPPFLAGS): Add @GPG_ERROR_CFLAGS@.
2063         * gpgme-config.in (gpg_error_libs, gpg_error_cflags): New variables.
2064         Print them.
2065
2066         * op-support.c (_gpgme_parse_inv_userid): Rename to
2067         _gpgme_parse_inv_recp and change to new datatype.
2068         * ops.h (_gpgme_parse_inv_key): Fix prototype.
2069         * gpgme.h (struct _gpgme_invalid_user_id): Rename to
2070         __gpgme_invalid_key.  Rename field ID to KEY.
2071         (gpgme_invalid_user_id_t): Rename to gpgme_invalid_key_t.
2072         (struct _gpgme_op_encrypt_result): Here, too.
2073         (struct _gpgme_op_sign_result): Likewise.
2074         * encrypt.c (struct op_data): Likewise.
2075         (release_op_data): Likewise.
2076         * sign.c (struct op_data): Likewise.
2077         (release_op_data): Likewise.
2078
2079         * posix-io.c (_gpgme_io_read): Save errno across debug calls.
2080         (_gpgme_io_write): Likewise.
2081         (_gpgme_io_pipe): Likewise.
2082         (_gpgme_io_select): Likewise.
2083
2084         * rungpg.c (struct engine_gpg): Remove arg_error.
2085         (add_arg): Don't set arg_error.
2086         (add_data): Likewise.
2087         (start): Don't check arg_error.
2088         (gpg_new): Check return value of add_arg.
2089         * verify.c (parse_notation): Free allocated memory at error.
2090
2091 2003-06-05  Marcus Brinkmann  <marcus@g10code.de>
2092
2093         Everywhere: Use libgpg-error error codes.
2094
2095         * Makefile.am (EXTRA_DIST): Remove mkerrors.
2096         (BUILT_SOURCES): Remove errors.c.
2097         (MOSTLYCLEANFILES): Likewise.
2098         (libgpgme_la_SOURCES): Likewise.  Add error.c.
2099         (errors.c): Remove target.
2100         * mkerrors: File removed.
2101         * error.c: New file.
2102
2103         * gpgme.h (gpgme_error_t): Change to type gpg_error_t.
2104         (gpgme_err_code_t, gpgme_err_source_t): New types.
2105         (gpgme_err_code, gpgme_err_source, gpgme_error, gpgme_err_make):
2106         New static inline functions.
2107         (gpgme_strsource, gpgme_err_code_from_errno,
2108         gpgme_err_code_to_errno, gpgme_err_make_from_errno,
2109         gpgme_error_from_errno): New prototypes.
2110
2111 2003-05-29  Marcus Brinkmann  <marcus@g10code.de>
2112
2113         * gpgme.h (gpgme_op_export_start): Change second arg to const char *.
2114         (gpgme_op_export): Likewise.
2115         (gpgme_op_export_ext_start): New prototype.
2116         (gpgme_op_export_ext): Likewise.
2117         * engine.h: Likewise for _gpgme_engine_op_export and
2118         _gpgme_engine_op_export_ext.
2119         * engine-backend.h (struct engine_ops): Change second argument of
2120         prototype of export to const char *, and add reserverd int as
2121         third argument.  Add prototype for export_ext.
2122         * engine.c (_gpgme_engine_op_export_ext): New function.
2123         (_gpgme_engine_op_export): Change second argument of prototype of
2124         export to const char *, and add reserverd int as third argument.
2125         * rungpg.c (gpg_export): Change second argument of prototype of
2126         export to const char *, and add reserverd int as third argument.
2127         (gpg_export_ext): New function.
2128         (gpg_keylist_ext): Break loop at error.
2129         (_gpgme_engine_ops_gpg): Add gpg_export_ext.
2130         * engine-gpgsm.c (gpgsm_export): Change second argument of
2131         prototype of export to const char *, and add reserverd int as
2132         third argument.
2133         (gpgsm_export_ext): New function.
2134         (_gpgme_engine_ops_gpgsm): Add gpgsm_export_ext.
2135         * export.c (export_start): Change second argument of prototype of
2136         export to const char *, and add reserverd int as third argument.
2137         (gpgme_op_export_start): Likewise.
2138         (export_ext_start): New function.
2139         (gpgme_op_export_ext_start): Likewise.
2140         (gpgme_op_export_ext): Likewise.
2141
2142         * gpgme.h (gpgme_keylist_mode_t): New type for anonymous enum.
2143         (gpgme_sigsum_t): New type for anonymous enum.
2144
2145         * encrypt-sign.c (encrypt_sign_start): Check for errors earlier,
2146         and return an error if RECP is not set.
2147
2148         * Makefile.am (libgpgme_la_SOURCES): Remove user-id.c.
2149         * user-id.c: Remove file.
2150         * ops.h: Remove prototype for _gpgme_user_ids_all_valid.
2151         * gpgme.h (gpgme_encrypt_flags_t): New type.
2152         (gpgme_op_encrypt_start): Change second parameter to type
2153         gpgme_key_t[], and add third parameter.
2154         (gpgme_op_encrypt): Likewise.
2155         (gpgme_op_encrypt_sign_start): Likewise.
2156         (gpgme_op_encrypt_sign): Likewise.
2157         * encrypt.c (encrypt_start): Likewise.
2158         (gpgme_op_encrypt_start): Likewise.
2159         (gpgme_op_encrypt): Likewise.  Pass flags to engine.
2160         * encrypt-sign.c (encrypt_sign_start): Likewise.
2161         (gpgme_op_encrypt_sign_start): Likewise.
2162         (gpgme_op_encrypt_sign): Likewise.
2163         * engine-backend.h (struct engine_ops): Likewise for prototypes of
2164         encrypt and encrypt_sign.
2165         * engine.h: Likewise for prototypes of _gpgme_engine_op_encrypt
2166         and _gpgme_engine_op_encrypt_sign.
2167         * engine.c (_gpgme_engine_op_encrypt): Likewise.
2168         (_gpgme_engine_op_encrypt_sign): Likewise.
2169         * rungpg.c (gpg_encrypt): Likewise.
2170         (gpg_encrypt_sign): Likewise.
2171         * rungpg.c (gpg_encrypt): Check flags for always trust option.
2172         * engine-gpgsm.c (gpgsm_encrypt): Likewise.
2173         (set_recipients): Rewritten to use keys instead user IDs.
2174         * rungpg.c (append_args_from_recipients): Rewritten to use keys
2175         instead user IDs.
2176         * encrypt.c (_gpgme_encrypt_status_handler): Change errors
2177         returned to GPGME_Invalid_Key and GPGME_General_Error.
2178
2179 2003-05-28  Marcus Brinkmann  <marcus@g10code.de>
2180
2181         * engine-gpgsm.c: Rename GpgsmObject to engine_gpgsm_t.
2182         (struct gpgsm_object_s): Rename to struct engine_gpgsm.
2183         * rungpg.c: Rename GpgObject to engine_gpg_t.
2184         (struct gpg_object_s): Rename to struct engine_gpg.
2185
2186         * context.h (struct gpgme_context): Change EngineObject to
2187         engine_object_t.
2188         (enum ctx_op_data_type): Rename to ctx_op_data_id_t.
2189         (ctx_op_data_t): New type.
2190         (struct gpgme_context): Use it.
2191         * ops.h (_gpgme_op_data_lookup): Use new type name.
2192         * op-support.c (_gpgme_op_data_lookup): Likewise.
2193         * engine.c: Rename EngineObject to engine_t in the file.  Also
2194         EngineStatusHandler to engine_status_handler_t,
2195         EngineCommandHandler to engine_command_handler_t and
2196         EngineColonLineHandler to engine_colon_line_handler.    
2197         * rungpg.c (start): Likewise.
2198         * engine-gpgsm.c: Likewise.
2199         * engine-backend.h (struct engine_ops): Likewise
2200         * engine.h (struct engine_object_s): Rename to struct engine.
2201         (EngineObject): Rename to engine_t.  Also everywhere else in the
2202         file.
2203         (EngineStatusHandler): Rename to engine_status_handler_t.
2204         (EngineColonLineHandler): Rename to engine_colon_line_handler_t.
2205         (EngineCommandHandler): Rename to engine_command_handler_t.
2206
2207         * engine-gpgsm.c (gpgsm_export): Fix bug in last change.
2208
2209         * Makefile.am (libgpgme_la_SOURCES): Remove recipient.c, add
2210         user-id.c.
2211         * gpgme.h (gpgme_recipients_t): Removed.
2212         (gpgme_recipients_new, gpgme_recipients_release,
2213         gpgme_recipients_add_name,
2214         gpgme_recipients_add_name_with_validity, gpgme_recipients_count,
2215         gpgme_recipients_enum_open, gpgme_recipients_enum_read,
2216         gpgme_recipients_enum_close): Removed.
2217         (gpgme_op_encrypt, gpgme_op_encrypt_start, gpgme_op_encrypt_sign,
2218         gpgme_op_encrypt_sign_start, gpgme_op_export_start,
2219         gpgme_op_export): Change second argument to gpgme_user_id_t.
2220         (gpgme_user_ids_release): New prototype.
2221         (gpgme_user_ids_append): Likewise.
2222         * ops.h (_gpgme_recipients_all_valid): Remove.
2223         (_gpgme_user_ids_all_valid): Add.
2224         * context.h (struct gpgme_recipients): Removed.
2225         * user-id.c: New file.
2226         * recipient.c: Removed file.
2227         * rungpg.c (append_args_from_recipients): Change last arg to
2228         gpgme_user_id_t.  Reimplement.
2229         (gpg_encrypt): Change second arg to gpgme_user_id_t.
2230         (gpg_encrypt_sign): Likewise.
2231         (gpg_export): Likewise.  Rewrite user ID list code.
2232         * engine.c (_gpgme_engine_op_encrypt): Change second arg to
2233         gpgme_user_id_t.
2234         (_gpgme_engine_op_encrypt_sign): Likewise.
2235         (_gpgme_engine_op_export): Likewise.
2236         * engine.h (_gpgme_engine_op_encrypt, _gpgme_engine_op_encrypt_sign,
2237         _gpgme_engine_op_export): Likewise.
2238         * engine-gpgsm.c (set_recipients): Likewise.  Rewrite loop code.
2239         (gpgsm_encrypt): Likewise.
2240         (gpgsm_export): Likewise.
2241         * engine-backend.h (struct engine_ops): Likewise for members
2242         ENCRYPT, ENCRYPT_SIGN and EXPORT.
2243         * export.c (export_start, gpgme_op_export_start, gpgme_op_export):
2244         Likewise.
2245         * encrypt.c (encrypt_start): Likewise.  Don't check for count of
2246         recipients.
2247         (gpgme_op_encrypt_start): Likewise.
2248         (gpgme_op_encrypt): Likewise.
2249         * encrypt-sign.c (encrypt_sign_start): Likewise.
2250         (gpgme_op_encrypt_sign): Likewise.
2251         (gpgme_op_encrypt_sign_start): Likewise.
2252
2253 2003-05-27  Marcus Brinkmann  <marcus@g10code.de>
2254
2255         * gpgme.h (struct _gpgme_op_import_result): Add skipped_new_keys.
2256         * import.c (parse_import_res): Add skipped_new_keys parser.
2257
2258         * op-support.c (_gpgme_parse_inv_userid): Add missing break
2259         statements.
2260         * encrypt.c (gpgme_op_encrypt): Use gpgme_error_t instead of int.
2261
2262 2003-05-27  Marcus Brinkmann  <marcus@g10code.de>
2263
2264         * encrypt.c (gpgme_op_encrypt_result): Use intermediate variable
2265         HOOK to avoid compiler warning.  Don't ask, you don't want to know.
2266         (_gpgme_encrypt_status_handler): Likewise.
2267         (_gpgme_op_encrypt_init_result): Likewise.
2268         * decrypt.c (gpgme_op_decrypt_result): Likewise.
2269         (_gpgme_decrypt_status_handler): Likewise.
2270         (_gpgme_op_decrypt_init_result): Likewise.
2271         * verify.c (gpgme_op_verify_result): Likewise.
2272         (_gpgme_verify_status_handler): Likewise.
2273         (_gpgme_op_verify_init_result): Likewise.
2274         * edit.c (edit_status_handler): Likewise.
2275         (command_handler): Likewise.
2276         (edit_start): Likewise.
2277         * genkey.c (gpgme_op_genkey_result): Likewise.
2278         (genkey_status_handler): Likewise.
2279         (genkey_start): Likewise.
2280         * import.c (gpgme_op_import_result): Likewise.
2281         (import_status_handler): Likewise.
2282         (_gpgme_op_import_start): Likewise.
2283         * trustlist.c (gpgme_op_trustlist_next): Likewise.
2284         (_gpgme_op_trustlist_event_cb): Likewise.
2285         (gpgme_op_trustlist_start): Likewise.
2286         * keylist.c (gpgme_op_keylist_result): Likewise.
2287         (keylist_colon_handler): Likewise.
2288         (keylist_status_handler): Likewise.
2289         (_gpgme_op_keylist_event_cb): Likewise.
2290         (gpgme_op_keylist_start): Likewise.
2291         (gpgme_op_keylist_ext_start): Likewise.
2292         (gpgme_op_keylist_next): Likewise.
2293         * passphrase.c (_gpgme_passphrase_status_handler): Likewise.
2294         (_gpgme_passphrase_command_handler_internal): Likewise.
2295         * sign.c (gpgme_op_sign_result): Likewise.
2296         (_gpgme_sign_status_handler): Likewise.
2297         (_gpgme_op_sign_init_result): Likewise.
2298
2299         * passphrase.c (_gpgme_passphrase_command_handler_internal): Fix
2300         access to pointer type.
2301
2302 2003-05-26  Marcus Brinkmann  <marcus@g10code.de>
2303
2304         * engine.h (EngineCommandHandler): Change last argument to int fd.
2305         * gpgme.h (gpgme_passphrase_cb_t): Rewritten to take parts of the
2306         description and fd.
2307         (gpgme_edit_cb_t): Change last argument to int fd.
2308         * ops.h (_gpgme_passphrase_command_handler_internal): New prototype.
2309         * passphrase.c: Include <assert.h>.
2310         (op_data_t): Rename userid_hint to uid_hint, remove last_pw_handle.
2311         (release_op_data): Check values before calling free.
2312         (_gpgme_passphrase_status_handler): Likewise.
2313         (_gpgme_passphrase_command_handler_internal): New function.
2314         (_gpgme_passphrase_command_handler): Rewritten.
2315         * edit.c (edit_status_handler): Pass -1 as fd argument.
2316         (command_handler): Update prototype.  New variable processed.  Use
2317         it to store return value of
2318         _gpgme_passphrase_command_handler_internal which is now used
2319         instead _gpgme_passphrase_command_handler.  Use it also to check
2320         if we should call the user's edit function.  Pass fd to user's
2321         edit function.
2322         * rungpg.c (struct gpg_object_s): Change type of cmd.cb_data to
2323         void *.
2324         (gpg_release): Check value before calling free.  Do not release
2325         cmd.cb_data.
2326         (command_cb): Function removed.
2327         (command_handler): New function.  Thus we don't use a data object
2328         for command handler stuff anymore, but handle it directly.  This
2329         allows proper error reporting (cancel of passphrase requests, for
2330         example).  Also all callbacks work via direct writes to the file
2331         descriptor (so that passphrases are not kept in insecure memory).
2332         (gpg_set_command_handler): Rewritten to use even more ugly hacks.
2333         (read_status): Check cmd.keyword before calling free.  Install
2334         command_handler as the I/O callback handler with GPG as private
2335         data.
2336
2337         * rungpg.c (gpg_new): Add --enable-progress-filter to gpg
2338         invocation.
2339         * decrypt-verify.c (_gpgme_op_decrypt_verify_start): Rename to
2340         decrypt_verify_start.
2341         (gpgme_op_decrypt_verify_start): Call decrypt_verify_start.
2342         (gpgme_op_decrypt_verify): Likewise.
2343         * verify.c (verify_status_handler): New function that also calls
2344         progress status handler.
2345         (_gpgme_op_verify_start): Set status handler to verify_status_handler.
2346         Rename to (verify_start).
2347         (gpgme_op_verify_start): Call verify_start.
2348         (gpgme_op_verify): Likewise.
2349         * encrypt.c (encrypt_status_handler): New function.
2350         (_gpgme_encrypt_sym_status_handler): Call progress status handler.
2351         Make static.  Rename to encrypt_sym_status_handler.
2352         (encrypt_start): Set status handler to encrypt_sym_status_handler
2353         or encrypt_status_handler.
2354         * sign.c (sign_status_handler): New function.
2355         (sign_start): Set status handler to sign_status_handler.
2356         * decrypt.c (decrypt_status_handler): New function that also calls
2357         progress status handler.
2358         (decrypt_start): Set status handler to decrypt_status_handler.
2359         * encrypt-sign.c (encrypt_sign_status_handler): Likewise.
2360         * decrypt-verify.c (decrypt_verify_status_handler): Call
2361         _gpgme_progress_status_handler.
2362
2363         * conversion.c (_gpgme_decode_c_string): Add missing break
2364         statement.
2365
2366         * recipient.c (gpgme_recipients_add_name_with_validity): Add one
2367         to buffer to allocate.
2368
2369 2003-05-19  Marcus Brinkmann  <marcus@g10code.de>
2370
2371         * verify.c (parse_new_sig): Fix ERRSIG case.
2372         Submitted by Benjamin Lee <benjaminlee@users.sf.net>.
2373
2374 2003-05-18  Marcus Brinkmann  <marcus@g10code.de>
2375
2376         * gpgme.h: The following types are renamed.  The old name is kept
2377         as a deprecated typedef.
2378         (GpgmeCtx): Rename to gpgme_ctx_t.
2379         (GpgmeData): Rename to gpgme_data_t.
2380         (GpgmeRecipients): Rename to gpgme_recipients_t.
2381         (GpgmeError): Rename to gpgme_error_t.
2382         (GpgmeDataEncoding): Rename to gpgme_data_encoding_t.
2383         (GpgmePubKeyAlgo): Rename to gpgme_pubkey_algo_t.
2384         (GpgmeHashAlgo): Rename to gpgme_hash_algo_t.
2385         (GpgmeSigStat): Rename to gpgme_sig_stat_t.
2386         (GpgmeSigMode): Rename to gpgme_sig_mode_t.
2387         (GpgmeAttr): Rename to gpgme_attr_t.
2388         (GpgmeValidity): Rename to gpgme_validity_t.
2389         (GpgmeProtocol): Rename to gpgme_protocol_t.
2390         (GpgmeStatusCode): Rename to gpgme_status_code_t.
2391         (GpgmeEngineInfo): Rename to gpgme_engine_info_t.
2392         (GpgmeSubkey): Rename to gpgme_subkey_t.
2393         (GpgmeKeySig): Rename to gpgme_keysig_t.
2394         (GpgmeUserID): Rename to gpgme_user_id_t.
2395         (GpgmePassphraseCb): Rename to gpgme_passphrase_cb_t.
2396         (GpgmeProgressCb): Rename to gpgme_progress_cb_t.
2397         (GpgmeEditCb): Rename to gpgme_edit_cb_t.
2398         (GpgmeIOCb): Rename to gpgme_io_cb_t.
2399         (GpgmeRegisterIOCb): Rename to gpgme_register_io_cb_t.
2400         (GpgmeRemoveIOCb): Rename to gpgme_remove_io_cb_t.
2401         (GpgmeEventIO): Rename to gpgme_event_io_t.
2402         (GpgmeEventIOCb): Rename to gpgme_event_io_cb_t.
2403         (GpgmeIOCbs): Rename to gpgme_io_cbs.
2404         (gpgme_io_cbs_t): New type.
2405         (GpgmeDataReadCb): Rename to gpgme_data_read_cb_t.
2406         (GpgmeDataWriteCb): Rename to gpgme_data_write_cb_t.
2407         (GpgmeDataSeekCb): Rename to gpgme_data_seek_cb_t.
2408         (GpgmeDataReleaseCb): Rename to gpgme_data_release_cb_t.
2409         (GpgmeDataCbs): Rename to gpgme_data_cbs.
2410         (gpgme_data_cbs_t): New type.
2411         (GpgmeInvalidUserID): Rename to gpgme_invalid_user_id_t.
2412         (GpgmeEncryptResult): Rename to gpgme_encrypt_result_t.
2413         (GpgmeDecryptResult): Rename to gpgme_decrypt_result_t.
2414         (GpgmeNewSignature): Rename to gpgme_new_signature_t.
2415         (GpgmeSignResult): Rename to gpgme_sign_result_t.
2416         (GpgmeSigNotation): Rename to gpgme_sig_notation_t.
2417         (GpgmeSignature): Rename to gpgme_signature_t.
2418         (GpgmeVerifyResult): Rename to gpgme_verify_result_t.
2419         (GpgmeImportStatus): Rename to gpgme_import_status_t.
2420         (GpgmeImportResult): Rename to gpgme_import_result_t.
2421         (GpgmeGenKeyResult): Rename to gpgme_genkey_result_t.
2422         (GpgmeKeyListResult): Rename to gpgme_keylist_result_t.
2423         (GpgmeTrustItem): Rename to gpgme_trust_item_t.
2424         * gpgme.h (gpgme_deprecated_error_t): New type, swallowing macros
2425         GPGME_No_Recipients, GPGME_Invalid_Recipient and
2426         GPGME_No_Passphrase.
2427         * data.h (struct gpgme_data_s): Rename to struct gpgme_data.
2428         * context.h (struct gpgme_context_s): Rename to struct
2429         gpgme_context.
2430         (struct gpgme_recipients_s): Rename to gpgme_recipients.
2431
2432 2003-05-18  Marcus Brinkmann  <marcus@g10code.de>
2433
2434         * keylist.c (finish_key): Clear OPD->tmp_uid.
2435
2436 2003-05-18  Marcus Brinkmann  <marcus@g10code.de>
2437
2438         * verify.c (_gpgme_verify_status_handler): Return GPGME_No_Data
2439         for NODATA status without signatures.
2440
2441 2003-05-05  Marcus Brinkmann  <marcus@g10code.de>
2442
2443         * key.c (_gpgme_key_append_name): Use decoded string to parse user id.
2444         (_gpgme_key_add_sig): Likewise.
2445
2446 2003-05-04  Marcus Brinkmann  <marcus@g10code.de>
2447
2448         * context.h (struct gpgme_context_s): Remove member op_info.
2449
2450         * key.c (_gpgme_key_add_sig): Initialize SIG->uid.
2451
2452         * gpgme.h (GpgmeError): Add deprecated values for
2453         GPGME_Invalid_Type and GPGME_Invalid_Mode.
2454
2455 2003-04-30  Marcus Brinkmann  <marcus@g10code.de>
2456
2457         * gpgme.h (gpgme_get_op_info): Remove prototype.
2458         * ops.h (_gpgme_set_op_info,
2459         _gpgme_data_release_and_return_string, _gpgme_data_get_as_string,
2460         _gpgme_data_append, _gpgme_data_append_string,
2461         _gpgme_data_append_string_for_xml, _gpgme_data_append_for_xml,
2462         _gpgme_data_append_percentstring_for_xml): Likewise.
2463         (_gpgme_progress_status_handler): Change first arg to void *.
2464         * progress.c (_gpgme_progress_status_handler): Likewise.
2465         * conversion.c: Do not include <string.h>, <errno.h>, <ctype.h>,
2466         and <sys/types.h>, but <string.h>.
2467         (_gpgme_data_append): Remove function.
2468         (_gpgme_data_append_string): Likewise.
2469         (_gpgme_data_append_for_xml): Likewise.
2470         (_gpgme_data_append_string_for_xml): Likewise.
2471         (_gpgme_data_append_percentstring_for_xml): Likewise.
2472         * data-mem.c (_gpgme_data_get_as_string): Likewise.
2473         (_gpgme_data_release_and_return_string): Likewise.
2474         * gpgme.c (gpgme_get_op_info): Likewise.
2475         (_gpgme_set_op_info): Likewise.
2476
2477         * gpgme.h (struct _gpgme_key): New structure.
2478         (GpgmeKey): Define using _gpgme_key.
2479         (struct _gpgme_subkey): New structure.
2480         (GpgmeSubKey): New type.
2481         (struct _gpgme_key_sig): New structure.
2482         (GpgmeKeySig): New type.
2483         (struct _gpgme_user_id): New structure.
2484         (GpgmeUserID): New type.
2485         (struct _gpgme_op_keylist_result): New structure.
2486         (GpgmeKeyListResult): New type.
2487         (gpgme_op_keylist_result): New function.
2488         (gpgme_key_get_as_xml): Remove prototype.
2489         * context.h (struct gpgme_context_s): Remove members tmp_key,
2490         tmp_uid, key_cond and key_queue.
2491         (struct key_queue_item_s): Remove structure.
2492         (struct user_id_s): Remove structure.
2493         (struct gpgme_recipients_s): Replace with simple
2494         GpgmeUserID list.
2495         * gpgme.c (gpgme_release): Do not release CTX->tmp_key.
2496         * ops.h (_gpgme_key_add_subkey, _gpgme_key_append_name,
2497         _gpgme_key_add_sig, _gpgme_trust_item_new): New prototypes.
2498         * rungpg.c (command_cb): Return GpgmeError instead int.
2499         New variable ERR.  Use it to hold return value of cmd handler.
2500         (gpg_delete): Access fingerprint of key directly.
2501         (append_args_from_signers): Likewise.
2502         (gpg_edit): Likewise.
2503         (append_args_from_recipients): Use GpgmeUserID for recipient list.
2504         * engine-gpgsm.c: Do not include "key.h".
2505         (gpgsm_delete): Access fingerprint of key directly.
2506         (gpgsm_sign): Likewise.
2507         (set_recipients): Use GpgmeUserID for recipients.  Invert invalid
2508         user ID flag.
2509         * key.h: File removed.
2510         * key.c: Completely reworked to use exposed GpgmeKey data types.
2511         * keylist.c: Likewise.
2512         * recipient.c: Completely reworked to use GpgmeUserID.
2513
2514 2003-04-29  Marcus Brinkmann  <marcus@g10code.de>
2515
2516         * gpgme.h (gpgme_get_key): Remove force_update argument.
2517         * key-cache.c: File removed.
2518         * Makefile.am (libgpgme_la_SOURCES): Remove key-cache.c.
2519         * ops.h (_gpgme_key_cache_add, _gpgme_key_cache_get): Remove
2520         prototypes.
2521         * keylist.c (_gpgme_op_keylist_event_cb): Don't call
2522         _gpgme_key_cache_add.
2523         (gpgme_get_key): New function.
2524         * verify.c (gpgme_get_sig_key): Remove last argument to
2525         gpgme_get_key invocation.
2526
2527         * gpgme.h (struct _gpgme_trust_item): New structure.
2528         (GpgmeTrustItem): New type.
2529         (gpgme_trust_item_ref, gpgme_trust_item_unref): New prototypes.
2530         * context.h (struct trust_queue_item_s): Remove structure.
2531         (struct gpgme_context_s): Remove trust_queue member.
2532         * Makefile.am (libgpgme_la_SOURCES): Add trust-item.c.
2533         * trust-item.c: New file.
2534         * trustlist.c: Do not include <stdio.h> or <time.h>, but
2535         "gpgme.h".
2536         (struct trust_queue_item_s): Change to new type op_data_t.
2537         (trust_status_handler): Change first argument to void *.
2538         (trust_colon_handler): Likewise.
2539         (_gpgme_op_trustlist_event_cb): Use op_data_t type.
2540         (gpgme_op_trustlist_start): Use op_data_t and rework error
2541         handling.
2542         (gpgme_op_trustlist_next): Use op_data_t.
2543         (gpgme_trust_item_release): Remove function.
2544         (gpgme_trust_item_get_string_attr): Likewise.
2545         (gpgme_trust_item_get_int_attr): Likewise.
2546
2547         * verify.c (calc_sig_summary): Do not set GPGME_SIGSUM_SYS_ERROR
2548         for bad signatures.
2549
2550 2003-04-28  Marcus Brinkmann  <marcus@g10code.de>
2551
2552         * context.h: Remove OPDATA_VERIFY_COLLECTING.
2553         (struct gpgme_context_s): Remove member notation.
2554         * gpgme.h: Make enum for GPGME_KEYLIST_MODE_* values.
2555
2556         * gpgme.h (struct _gpgme_sig_notation): New structure.
2557         (GpgmeSigNotation): New type.
2558         (struct _gpgme_signature): New structure.
2559         (GpgmeSignature): New type.
2560         (struct _gpgme_op_verify_result): New structure.
2561         (GpgmeVerifyResult): New type.
2562         (gpgme_op_verify_result): New prototype.
2563         (gpgme_get_notation): Remove prototype.
2564         * ops.h (_gpgme_op_verify_init_result): New prototype.
2565         (_gpgme_verify_status_handler): Change first argument to void *.
2566         * util.h (_gpgme_decode_percent_string, _gpgme_map_gnupg_error):
2567         New prototypes.
2568         * conversion.c (_gpgme_decode_percent_string): New function.
2569         (gnupg_errors): New static global.
2570         (_gpgme_map_gnupg_error): New function.
2571         * gpgme.c (gpgme_release): Don't release CTX->notation.
2572         (gpgme_get_notation): Remove function.
2573         * decrypt-verify.c (_gpgme_op_decrypt_verify_start): Call
2574         _gpgme_op_verify_init_result.
2575         * verify.c: Do not include <stdio.h>, <assert.h> and "key.h", but
2576         do include "gpgme.h".
2577         (struct verify_result): Replace with ...
2578         (op_data_t): ... this type.
2579         (release_verify_result): Remove function.
2580         (release_op_data): New function.
2581         (is_token): Remove function.
2582         (skip_token): Remove function.
2583         (copy_token): Remove function.
2584         (gpgme_op_verify_result): New function.
2585         (calc_sig_summary): Rewritten.
2586         (finish_sig): Remove function.
2587         (parse_new_sig): New function.
2588         (parse_valid_sig): New function.
2589         (parse_notation): New function.
2590         (parse_trust): New function.
2591         (parse_error): New function.
2592         (_gpgme_verify_status_handler): Rewritten.  Change first argument
2593         to void *.
2594         (_gpgme_op_verify_start): Rework error handling.  Call
2595         _gpgme_op_verify_init_result.
2596         (gpgme_op_verify): Do not release or clear CTX->notation.
2597         (gpgme_get_sig_status): Rewritten.
2598         (gpgme_get_sig_string_attr): Likewise.
2599         (gpgme_get_sig_ulong_attr): Likewise.
2600         (gpgme_get_sig_key): Likewise.
2601
2602         * gpgme.h (struct _gpgme_op_decrypt_result): New structure.
2603         (GpgmeDecryptResult): New type.
2604         (gpgme_op_decrypt_result): New prototype.
2605         * ops.h (_gpgme_op_decrypt_init_result): New prototype.
2606         (_gpgme_decrypt_status_handler): Fix prototype.
2607         (_gpgme_decrypt_start): Remove prototype.
2608         * decrypt-verify.c: Do not include <stdio.h>, <stdlib.h>,
2609         <string.h> and <assert.h>, "util.h" and "context.h", but
2610         "gpgme.h".
2611         (decrypt_verify_status_handler): Change first argument to void *,
2612         and rework error handling.
2613         (_gpgme_op_decrypt_verify_start): New function.
2614         (gpgme_op_decrypt_verify_start): Rewrite using
2615         _gpgme_op_decrypt_verify_start.
2616         (gpgme_op_decrypt_verify): Likewise.
2617         * decrypt.c: Include <string.h>, "gpgme.h" and "util.h".
2618         (struct decrypt_result): Change to typedef op_data_t, rewritten.
2619         (is_token): Remove function.
2620         (release_op_data): New function.
2621         (skip_token): Remove function.
2622         (gpgme_op_decrypt_result): New function.
2623         (_gpgme_decrypt_status_handler): Change first argument to void *.
2624         Rework error handling.
2625         (_gpgme_decrypt_start): Rename to ...
2626         (decrypt_start): ... this.  Call _gpgme_op_decrypt_init_result.
2627         (_gpgme_op_decrypt_init_result): New function.
2628         (gpgme_op_decrypt_start): Use decrypt_start.
2629         (gpgme_op_decrypt): Likewise.
2630
2631 2003-04-27  Marcus Brinkmann  <marcus@g10code.de>
2632
2633         * encrypt-sign.c: Do not include <stddef.h>, <stdio.h>,
2634         <stdlib.h>, <string.h>, <assert.h> and "util.h", but "gpgme.h".
2635         (_gpgme_op_encrypt_sign_start): Rename to ...
2636         (encrypt_sign_start): ... this.
2637         (gpgme_op_encrypt_sign_start): Use encrypt_sign_start, not
2638         _gpgme_op_encrypt_sign_start.
2639         (gpgme_op_encrypt_sign): Likewise.
2640
2641         * gpgme.h (GpgmeEncryptResult): New data type.
2642         (gpgme_op_encrypt_result): New prototype.
2643         * ops.h (_gpgme_op_encrypt_init_result): New prototype.
2644         (_gpgme_op_encrypt_status_handler): Fix prototype.
2645         * encrypt-sign.c (_gpgme_op_encrypt_sign_start): Call
2646         _gpgme_op_encrypt_init_result.
2647         * encrypt.c: Do not include <stdio.h>, <assert.h>, "util.h" and
2648         "wait.h".  Include <errno.h> and "gpgme.h".
2649         (SKIP_TOKEN_OR_RETURN): Remove macro.
2650         (struct encrypt_result): Rename to ...
2651         (op_data_t): ... new data type.  Rewrite for user result data.
2652         (append_xml_encinfo): Remove function.
2653         (release_op_data): New function.
2654         (gpgme_op_encrypt_result): New function.
2655         (_gpgme_op_encrypt_status_handler): Change first argument to void *.
2656         Rewrite result parsing.
2657         (_gpgme_op_encrypt_sym_status_handler): Change first argument to
2658         void *.
2659         (_gpgme_op_encrypt_init_result): New function.
2660         (_gpgme_op_encrypt_start): Rename to ...
2661         (encrypt_start): ... this.
2662         (gpgme_op_encrypt_start): Use encrypt_start, not
2663         gpgme_op_encrypt_start.
2664         (gpgme_op_encrypt): Likewise.
2665
2666         * gpgme.h (GpgmePubKeyAlgo, GpgmeHashAlgo, GpgmeInvalidUserID,
2667         GpgmeNewSignature, GpgmeSignResult): New data types.
2668         (gpgme_op_sign_result, gpgme_pubkey_algo_name,
2669         gpgme_hash_algo_name): New prototypes.
2670         * gpgme.c (gpgme_pubkey_algo_name): New function.
2671         (gpgme_hash_algo_name): Likewise.
2672         * ops.h (_gpgme_parse_inv_userid, _gpgme_op_sign_init_result): New
2673         prototype.
2674         (_gpgme_op_sign_status_handler): Fix prototype.
2675         * op-support.c: Include <errno.h> and <string.h>.
2676         (_gpgme_parse_inv_userid): New function.
2677         * sign.c: Include <errno.h> and "gpgme.h", but not <stdio.h>,
2678         <assert.h> and "util.h".
2679         (SKIP_TOKEN_OR_RETURN): Remove macro.
2680         (struct sign_result): Change to op_data_t type and rework it.
2681         (release_sign_result): Rename to ...
2682         (release_op_data): ... this and rewrite it.
2683         (append_xml_info): Remove function.
2684         (gpgme_op_sign_result): New function.
2685         (parse_sig_created): New function.
2686         (_gpgme_sign_status_handler): Change first argument to void *.
2687         Rewrite the function to use the new result structure and functions.
2688         (_gpgme_op_sign_init_result): New function.
2689         (_gpgme_op_sign_start): Rename to ...
2690         (sign_start): ... this.  Call _gpgme_op_sign_init_result.
2691         (gpgme_op_sign_start): Use sign_start instead _gpgme_op_sign_start.
2692         (gpgme_op_sign): Likewise.
2693         * encrypt-sign.c (_gpgme_op_encrypt_sign_start): Call
2694         _gpgme_op_sign_init_result.
2695         
2696         * delete.c: Include <errno.h> and "gpgme.h", but not "util.h" or
2697         "key.h".
2698         (enum delete_problem): Move into function delete_status_handler.
2699         (delete_status_handler): Change first argument to void *.  Parse
2700         delete problem with strtol instead atoi.  Return better error
2701         values.
2702         (_gpgme_op_delete_start): Rename to ...
2703         (delete_start): ... this.  Rework error handling.
2704         (gpgme_op_delete_start): Use delete_start instead
2705         _gpgme_op_delete_start.
2706         (gpgme_op_delete): Likewise.
2707         * gpgme.h (GpgmeDataType): Removed.
2708
2709 2003-04-25  Marcus Brinkmann  <marcus@g10code.de>
2710
2711         * gpgme.h: Change GPGME_IMPORT_PRIVATE to GPGME_IMPORT_SECRET.
2712         * import.c (parse_import_res): Parse unchanged field.
2713
2714         * gpgme.h: New enum for GPGME_IMPORT_NEW, GPGME_IMPORT_UID,
2715         GPGME_IMPORT_SIG, GPGME_IMPORT_SUBKEY, GPGME_IMPORT_PRIVATE.
2716         (GpgmeError): GPGME_Unknown_Reason, GPGME_Not_Found,
2717         GPGME_Ambiguous_Specification, GPGME_Wrong_Key_Usage,
2718         GPGME_Key_Revoked, GPGME_Key_Expired, GPGME_No_CRL_Known,
2719         GPGME_CRL_Too_Old, GPGME_Policy_Mismatch, GPGME_No_Secret_Key,
2720         GPGME_Key_Not_Trusted, GPGME_Issuer_Missing, GPGME_Chain_Too_Long,
2721         GPGME_Unsupported_Algorithm, GPGME_Sig_Expired,
2722         GPGME_Bad_Signature, GPGME_No_Public_Key added as new error codes.
2723         (struct _gpgme_import_status): New structure.
2724         (GpgmeImportStatus): New type.
2725         (struct _gpgme_op_import_result): New structure.
2726         (GpgmeImportResult): New type.
2727         (gpgme_op_import_result): New function.
2728         * import.c: Include <errno.h> and "gpgme.h", but not "util.h".
2729         (struct import_result): Change to type op_data_t.
2730         (release_import_result): Rename to ...
2731         (release_op_data): ... this.
2732         (append_xml_impinfo): Function removed.
2733         (gpgme_op_import_result): New function.
2734         (parse_import): New function.
2735         (parse_import_res): Likewise.
2736         (import_status_handler): Change first argument to void *.  Rewrite
2737         to use new functions.
2738         (_gpgme_op_import_start): Rework error handling.
2739
2740         * edit.c: Do not include <assert.h>, "util.h", but "gpgme.h".
2741         (edit_resut): Change to typedef for op_data_t.
2742         (edit_status_handler): Change first argument to void *.
2743         Rework error handling.
2744         (command_handler): Rework error handling.
2745         (_gpgme_op_edit_start): Rename to ...
2746         (edit_start): ... this.  Rework error handling.
2747         (gpgme_op_edit_start): Rewrite using edit_start.
2748         (gpgme_op_edit): Likewise.
2749
2750         * ops.h (_gpgme_passphrase_start): Remove prototype.
2751         * passphrase.c: Do not include <assert.h>, "util.h" or
2752         "debug.h", but "gpgme.h".
2753         (struct passphrase_result): Change to typedef for op_data_t.
2754         (release_passphrase_result): Rename to release_op_data.
2755         (_gpgme_passphrase_status_handler): Change first argument to void *.
2756         Use new op_data_t type.
2757         (_gpgme_passphrase_command_handler): Use new op_data_t type.
2758         (_gpgme_passphrase_start): Remove function.
2759         * decrypt.c (_gpgme_decrypt_start): Rewrite error handling.  Do
2760         not call _gpgme_passphrase_start, but install command handler.
2761         * encrypt.c (_gpgme_op_encrypt_start): Likewise.
2762         * encrypt-sign.c (_gpgme_op_encrypt_sign_start): Likewise.
2763         * sign.c (_gpgme_op_sign_start): Likewise.
2764
2765         * context.h (struct gpgme_context_s): Remove member initialized,
2766         use_cms and help_data_1.  Add member protocol.  Make use_armor and
2767         use_textmode bit flags.  Make keylist_mode, include_certs,
2768         signers_len and signers_size unsigned.
2769         * gpgme.c (gpgme_new): Initialize CTX->protocol.
2770         (gpgme_set_protocol): Do not check CTX.  Use CTX->protocol.
2771         (gpgme_get_protocol): Likewise.
2772         (gpgme_release): Do not release CTX->help_data_1.
2773         * op-support.c (_gpgme_op_reset): Use CTX->protocol.
2774
2775         * wait-private.c (_gpgme_wait_private_event_cb): Remove variable CTX.
2776
2777         * data.c: Do not include <assert.h>, but "gpgme.h".
2778         (_gpgme_data_inbound_handler): Expand _gpgme_data_append, because
2779         it will go.  Do not assert DH.
2780         (_gpgme_data_outbound_handler): Do not assert DH.
2781         
2782         * export.c: Do not include <stdlib.h>, "debug.h" and "util.h", but
2783         "gpgme.h".
2784         (export_status_handler): Change type of first argument to void *.
2785         (_gpgme_op_export_start): Rename to ...
2786         (export_start): ... this.  Rework error handling.
2787         (gpgme_op_export_start): Rewritten to use export_start instead
2788         _gpgme_op_export_start.
2789         (gpgme_op_export): Likewise.
2790
2791         * gpgme.h (GpgmeError): Add GPGME_Busy, GPGME_No_Request.
2792         (GPGME_No_Recipients, GPGME_Invalid_Recipient,
2793         GPGME_No_Passphrase): New macros.
2794
2795         * key.c (gpgme_key_get_string_attr): Fix validity attribute.
2796
2797 2003-04-24  Marcus Brinkmann  <marcus@g10code.de>
2798         
2799         * gpgme.h (struct _gpgme_op_genkey_result): New structure.
2800         (GpgmeGenKeyResult): New type.
2801         (gpgme_op_genkey): Drop last argument.
2802         (gpgme_op_genkey_result): New function.
2803         * genkey.c: Do not include "util.h", but "gpgme.h".
2804         (struct genkey_result): Replace with ...
2805         (op_data_t): ... this new type.
2806         (release_genkey_result): Replace with ...
2807         (release_op_data): ... this new function.
2808         (gpgme_op_genkey_result): New function.
2809         (genkey_status_handler): Rewritten using new op_data_t type.
2810         (get_key_parameter): New function.
2811         (_gpgme_op_genkey_start): Renamed to
2812         (genkey_start): ... this and rewritten.
2813         (gpgme_op_genkey_start): Use genkey_start instead
2814         _gpgme_op_genkey_start.
2815         (gpgme_op_genkey): Rewritten.  Remove FPR argument.
2816
2817         * context.h (struct gpgme_context_s): Remove member verbosity.
2818         * gpgme.c (gpgme_new): Do not set member verbosity.
2819         * engine.h (_gpgme_engine_set_verbosity): Remove prototype.
2820         * engine.c (_gpgme_engine_set_verbosity): Remove function.
2821         * engine-backend.h (struct engine_ops): Remove set_verbosity.
2822         * engine-gpgsm.c (_gpgme_engine_ops_gpgsm): Remove set_verbosity member.
2823         * rungpg.c (_gpgme_engine_ops_gpg): Likewise.
2824         (gpg_set_verbosity): Remove function.
2825         * decrypt.c (_gpgme_decrypt_start): Don't call
2826         _gpgme_engine_set_verbosity.
2827         * delete.c (_gpgme_op_delete_start): Likewise.
2828         * edit.c (_gpgme_op_edit_start): Likewise.
2829         * encrypt.c (_gpgme_op_encrypt_start): Likewise.
2830         * encrypt-sign.c (_gpgme_op_encrypt_sign_start): Likewise.
2831         * export.c (_gpgme_op_export_start): Likewise.
2832         * genkey.c (_gpgme_op_genkey_start): Likewise.
2833         * import.c (_gpgme_op_import_start): Likewise.
2834         * keylist.c (gpgme_op_keylist_start): Likewise.
2835         (gpgme_op_keylist_ext_start): Likewise.
2836         * sign.c (_gpgme_op_sign_start): Likewise.
2837         * verify.c (_gpgme_op_verify_start): Likewise.
2838
2839         * Makefile.am (libgpgme_la_SOURCES): Add key-cache.c.
2840         * key.c (key_cache_initialized, key_cache_size,
2841         key_cache_max_chain_length, ): Removed.
2842         (struct key_cache_item_s, key_cache_lock, key_cache,
2843         key_cache_unused_items, hash_key, _gpgme_key_cache_add,
2844         _gpgme_key_cache_get, gpgme_get_key): Moved to ...
2845         * key-cache.c: ... here.  New file.
2846         * key.h (_gpgme_key_cache_init): Remove prototypes.
2847         (_gpgme_key_cache_add,_gpgme_key_cache_get): Move to ...
2848         * ops.h: ... here.
2849         * version.c: Do not include "key.h".
2850         (do_subsystem_inits): Do not call _gpgme_key_cache_init.
2851
2852         * mkstatus: Strip trailing comma.
2853         * gpgme.h (GpgmeStatus): Pretty print.
2854
2855         * gpgme.h (GpgmeError): Rename GPGME_No_Passphrase to
2856         GPGME_Bad_Passphrase.
2857         * passphrase.c (_gpgme_passphrase_status_handler): Use
2858         GPGME_Bad_Passphrase instead GPGME_No_Passphrase.
2859
2860         * gpgme.h (GpgmeError): Rename GPGME_No_Recipients to
2861         GPGME_No_UserID and GPGME_Invalid_Recipient to
2862         GPGME_Invalid_UserID.
2863         * encrypt.c (_gpgme_encrypt_status_handler): Use GPGME_No_UserID
2864         instead GPGME_No_Recipients and GPGME_Invalid_UserID instead
2865         GPGME_Invalid_Recipient.
2866         (_gpgme_op_encrypt_start): Likewise.
2867
2868         * gpgme.h (GpgmeError): Remove GPGME_Busy and GPGME_No_Request.
2869         * wait-user.c (_gpgme_wait_user_event_cb): Don't clear CTX->pending.
2870         * wait-private.c (_gpgme_wait_private_event_cb): Likewise.
2871         * wait-global.c (gpgme_wait): Likewise.
2872         * verify.c (_gpgme_op_verify_start): Likewise.
2873         (gpgme_get_sig_status): Don't check pending flag.
2874         (gpgme_get_sig_string_attr): Likewise.
2875         (gpgme_get_sig_ulong_attr): Likewise.
2876         (gpgme_get_sig_key): Likewise.
2877         * op-support.c (_gpgme_op_reset): Likewise.
2878         * trustlist.c (gpgme_op_trustlist_start): Don't clear pending flag.
2879         (gpgme_op_trustlist_next): Don't check or clear pending flag.
2880         (gpgme_op_trustlist_end): Likewise.
2881         * sign.c (_gpgme_op_sign_start): Likewise.
2882         * context.h (struct gpgme_context_s): Remove member PENDING.
2883         * decrypt.c (_gpgme_decrypt_start): Likewise.
2884         * delete.c (_gpgme_op_delete_start): Likewise.
2885         * edit.c (_gpgme_op_edit_start): Likewise.
2886         * encrypt.c (_gpgme_op_encrypt_start): Likewise.
2887         * encrypt-sign.c (_gpgme_op_encrypt_sign_start): Likewise.
2888         * export.c (_gpgme_op_export_start): Likewise.
2889         * genkey.c (_gpgme_op_genkey_start): Likewise.
2890         * import.c (_gpgme_op_import_start): Likewise.
2891         * key.c (gpgme_get_key): Likewise.
2892         * keylist.c (gpgme_op_keylist_start): Likewise.
2893         (gpgme_op_keylist_ext_start): Likewise.
2894         (gpgme_op_keylist_next): Likewise.
2895         (gpgme_op_keylist_end): Likewise.
2896         * data-compat.c (gpgme_error_to_errno): Don't convert EBUSY.
2897
2898 2003-02-06  Marcus Brinkmann  <marcus@g10code.de>
2899
2900         * gpgme.h (GpgmePassphraseCb): Change type to return GpgmeError,
2901         and add argument for returning the result string.
2902         (gpgme_cancel): Remove prototype.
2903         * gpgme.c (gpgme_cancel): Remove function.
2904         * context.h (struct gpgme_context_s): Remove member cancel.
2905         * passphrase.c (_gpgme_passphrase_command_handler): Call the
2906         passphrase callback in the new way.
2907
2908 2003-01-30  Marcus Brinkmann  <marcus@g10code.de>
2909
2910         * edit.c (_gpgme_edit_status_handler): Call the progress status
2911         handler.
2912
2913 2003-02-05  Marcus Brinkmann  <marcus@g10code.de>
2914
2915         * wait-user.c (_gpgme_wait_user_remove_io_cb): Move check for no
2916         I/O handlers left to ...
2917         (_gpgme_user_io_cb_handler): ... here.
2918
2919 2003-02-04  Marcus Brinkmann  <marcus@g10code.de>
2920
2921         * trustlist.c (trustlist_colon_handler): Release ITEM if name
2922         could not be allocated.
2923         (gpgme_trust_item_release): Only release name if it is allocated.
2924         Reported by Marc Mutz <Marc.Mutz@uni-bielefeld.de>.
2925
2926 2003-02-04  Marcus Brinkmann  <marcus@g10code.de>
2927
2928         * rungpg.c (read_status): If he status handler returns an error,
2929         return it.
2930         (status_handler): If read_status fails, just return the error.
2931
2932 2003-02-01  Marcus Brinkmann  <marcus@g10code.de>
2933
2934         * engine-gpgsm.c (start): Handle all errors, not only most of
2935         them.
2936         (xtoi_1, xtoi_2): Remove macro.
2937         (status_handler): Replace use of xtoi_2 with _gpgme_hextobyte.
2938
2939 2003-02-01  Marcus Brinkmann  <marcus@g10code.de>
2940
2941         * engine-gpgsm.c (map_assuan_error): Replace
2942         ASSUAN_Bad_Certificate_Path with ASSUAN_Bad_Certificate_Chain.
2943         (gpgsm_new): Use assuan_pipe_connect instead assuan_pipe_connect2.
2944
2945         * util.h (DIMof): Remove macro.
2946
2947         * ops.h (_gpgme_op_event_cb, _gpgme_op_event_cb_user,
2948         _gpgme_data_unread): Prototypes removed.
2949
2950 2003-01-30  Marcus Brinkmann  <marcus@g10code.de>
2951
2952         * types.h: File removed.
2953         * Makefile.am (libgpgme_la_SOURCES): Remove types.h.
2954         * io.h (struct spawn_fd_item_s): Do not include "types.h".
2955         * key.h: Likewise.
2956         * context.h: Likewise.
2957         * cengine-gpgsm.h: Likewise.
2958         * engine.h: Include "gpgme.h" instead "types.h".  Add prototypes
2959         for EngineStatusHandler, EngineColonLineHandler and
2960         EngineCommandHandler.
2961         (_gpgme_engine_set_status_handler): Change parameter type from
2962         GpgmeStatusHandler to EngineStatusHandler.
2963         (_gpgme_engine_set_command_handler): Change parameter type from
2964         GpgmeCommandHandler to EngineCommandHandler.
2965         (_gpgme_engine_set_colon_line_handler): Change parameter type from
2966         GpgmeColonLineHandler to EngineColonLineHandler.
2967         * engine-backend.h: Include "engine.h" instead "types.h".
2968         (struct engine_ops): Change Gpgme*Handler parameters in members
2969         set_command_handler, set_colon_line_handler and set_status_handler
2970         to Engine*Handler.
2971         * engine.c (_gpgme_engine_set_status_handler): Change parameter
2972         type from GpgmeStatusHandler to EngineStatusHandler.
2973         (_gpgme_engine_set_command_handler): Change parameter type from
2974         GpgmeCommandHandler to EngineCommandHandler.
2975         (_gpgme_engine_set_colon_line_handler): Change parameter type from
2976         GpgmeColonLineHandler to EngineColonLineHandler.
2977         * rungpg.c (struct gpg_object_s): Change type of member status.fnc
2978         from GpgmeStatusHandler to EngineStatusHandler.  Change type of
2979         member colon.fnc from GpgmeColonLineHandler to
2980         EngineColonLineHandler.  Change type of member cmd.fnc from
2981         GpgmeCommandHandler to EngineCommandHandler.
2982         * engine-gpgsm.c (struct gpgsm_object_s): Likewise.
2983         * rungpg.c (gpg_set_status_handler): Change parameter type from
2984         GpgmeStatusHandler to EngineStatusHandler.
2985         * engine-gpgsm.c (gpgsm_set_status_handler): Likewise.
2986         (assuan_simple_command): Likewise.
2987         * rungpg.c (gpg_set_colon_line_handler): Change parameter type
2988         from GpgmeColonLineHandler to EngineColonLineHandler.
2989         * engine-gpgsm.c (gpgsm_set_colon_line_handler): Likewise.
2990         * rungpg.c (gpg_set_command_handler): Change parameter type from
2991         GpgmeCommandHandler to EngineCommandHandler.
2992
2993         * engine-gpgsm.c (status_handler): Do not close status fd at end
2994         of function.
2995
2996         * ops.h (_gpgme_op_data_lookup): Add prototype.
2997         * op-support.c: Include <stdlib.h>.
2998         (_gpgme_op_data_lookup): New function.
2999         * decrypt.c (_gpgme_release_decrypt_result): Function removed.
3000         (struct decrypt_result_s): Rename to ...
3001         (struct decrypt_resul): ... this.
3002         (DecryptResult): New type.
3003         (_gpgme_decrypt_status_handler): Don't use
3004         test_and_allocate_result, but use _gpgme_op_data_lookup to
3005         retrieve result data object.
3006         * sign.c (_gpgme_release_sign_result): Function removed.
3007         (release_sign_result): New function.
3008         (struct sign_result_s): Rename to ...
3009         (struct sign_result): ... this.
3010         (SignResult): New type.
3011         (_gpgme_sign_status_handler): Don't use
3012         test_and_allocate_result, but use _gpgme_op_data_lookup to
3013         retrieve result data object.
3014         * encrypt.c (struct encrypt_result_s): Rename to ...
3015         (struct encrypt_result): ... this.
3016         (_gpgme_release_encrypt_result): Function removed.
3017         (release_encrypt_result): New function.
3018         (_gpgme_encrypt_status_handler): Don't use
3019         test_and_allocate_result, but use _gpgme_op_data_lookup to
3020         retrieve result data object.
3021         * verify.c (struct verify_result_s): Rename to ...
3022         (struct verify_result): ... this.  Remove member next.
3023         (VerifyResult): New type.
3024         (_gpgme_release_verify_result): Function removed.
3025         (release_verify_result): New function.
3026         (finish_sig): Change first argument to type VerifyResult.  Diddle
3027         the type of the op_data structure.
3028         (add_notation): Change first argument to type VerifyResult.
3029         (_gpgme_verify_status_handler): Don't use
3030         test_and_allocate_result, but use _gpgme_op_data_lookup to
3031         retrieve result data object.
3032         * passphrase.c (struct passphrase_result_s): Rename to ...
3033         (struct passphrase_result): ... this.  Remove member next.
3034         (PassphraseResult): New type.
3035         (_gpgme_release_passphrase_result): Function removed.
3036         (release_passphrase_result): New function.
3037         (_gpgme_passphrase_status_handler): Don't use
3038         test_and_allocate_result, but use _gpgme_op_data_lookup to
3039         retrieve result data object.
3040         (_gpgme_passphrase_command_handler): Likewise.
3041         * keylist.c (struct keylist_result_s): Rename to ...
3042         (struct keylist_result): ... this.  Remove member next.
3043         (KeylistResult): New type.
3044         (_gpgme_release_keylist_result): Function removed.
3045         (release_keylist_result): New function.
3046         (keylist_status_handler): Don't use
3047         test_and_allocate_result, but use _gpgme_op_data_lookup to
3048         retrieve result data object.
3049         * edit.c (struct edit_result_s): Rename to ...
3050         (struct edit_result): ... this.  Remove member next.
3051         (EditResult): New type.
3052         (_gpgme_release_edit_result): Function removed.
3053         (release_edit_result): New function.
3054         (edit_status_handler): Don't use
3055         test_and_allocate_result, but use _gpgme_op_data_lookup to
3056         retrieve result data object.
3057         (command_handler): Likewise.
3058         * types.h (DecryptResult, SignResult, EncryptResult,
3059         PassphraseResult, ImportResult, DeleteResult, GenKeyResult,
3060         KeylistResult, EditResult): Types removed.
3061         * ops.h: Don't include "types.h", but "gpgme.h" and "context.h".
3062         (test_and_allocate_result): Remove macro.
3063         (_gpgme_release_decrypt_result): Remove prototype.
3064         (_gpgme_decrypt_result): Remove prototype.
3065         (_gpgme_release_sign_result): Remove prototype.
3066         (_gpgme_release_encrypt_result): Remove prototype.
3067         (_gpgme_release_passphrase_result): Remove prototype.
3068         (_gpgme_release_import_result): Remove prototype.
3069         (_gpgme_release_delete_result): Remove prototype.
3070         (_gpgme_release_genkey_result): Remove prototype.
3071         (_gpgme_release_keylist_result): Remove prototype.
3072         (_gpgme_release_edit_result): Remove prototype.
3073         (_gpgme_release_verify_result): Remove prototype.
3074         * gpgme.c (_gpgme_release_result): Rewritten.
3075         * context.h (enum ctx_op_data_type): New enum.
3076         (struct ctx_op_data): New structure.
3077         (struct gpgme_context_s): Replace the member result with a member
3078         op_data.
3079         (fail_on_pending_request): Remove macro.
3080         * op-support.c (_gpgme_op_reset): Expand macro
3081         fail_on_pending_request.
3082         * util.h: Don't include "types.h" or "debug.h", but include "gpgme.h".
3083
3084 2003-01-30  Marcus Brinkmann  <marcus@g10code.de>
3085
3086         * types.h (EngineObject): Move typedef to ...
3087         * engine.h: ... here.
3088         * types.h (GpgObject): Move typedef to ...
3089         * rungpg.c: ... here.
3090         * types.h (GpgsmObject): Move typedef to ...
3091         * engine-gpgsm.c: ... here.
3092
3093         * util.h (return_if_fail, return_null_if_fail,
3094         return_val_if_fail): Remove macro.
3095         * gpgme.c (gpgme_cancel): Don't use return_if_fail.
3096         * key.c (gpgme_key_ref): Likewise.
3097         * signers.c (gpgme_signers_enum): Likewise.
3098         (gpgme_signers_clear): Likewise.
3099
3100         * engine-backend.h (struct engine_ops): Rename get_path to
3101         get_file_name.
3102         * gpgme.h (struct _gpgme_engine_info): Rename member path to
3103         file_name.
3104         * version.c: Do not include <stdio.h>, <stdlib.h>, context.h and
3105         util.h.  Other clean ups.
3106         (parse_version_number): Protect more seriously against
3107         overflow.
3108         (gpgme_get_engine_info): Move to ...
3109         * engine.c (gpgme_get_engine_info): ... here.
3110         (_gpgme_engine_get_info): Function removed.
3111         (_gpgme_engine_get_path): Make static and rename to ...
3112         (engine_get_file_name): .. this.
3113         (_gpgme_engine_get_version): Make static and rename to ...
3114         (engine_get_version): ... this.
3115         (_gpgme_engine_get_req_version): Make static and rename to ...
3116         (engine_get_req_version): ... this.
3117         * engine.h (_gpgme_engine_get_path, _gpgme_engine_get_version,
3118         _gpgme_engine_req_version, _gpgme_engine_get_info.): Remove
3119         prototypes.
3120
3121         * gpgme.h (enum GpgmeProtocol): Remove GPGME_PROTOCOL_AUTO.
3122         * gpgme.c (gpgme_set_protocol): Don't handle GPGME_PROTOCOL_AUTO.
3123         (gpgme_get_protocol_name): New function.
3124
3125         * engine-backend.h (struct engine_ops): New member
3126         get_req_version, remove member check_version.
3127         * engine.h (_gpgme_Engine_get_version): New prototype.
3128         * rungpg.c (gpg_get_req_version): New function.
3129         (gpg_check_version): Function removed.
3130         (_gpgme_engine_ops_gpg): Add gpg_get_req_version, remove
3131         gpg_check_version.
3132         * engine-gpgsm.c (gpgsm_get_req_version): New function.
3133         (gpgsm_check_version): Function removed.
3134         (_gpgme_engine_ops_gpgsm): Add gpgsm_get_req_version, remove
3135         gpgsm_check_version.
3136         * engine.c: Include ops.h.
3137          (_gpgme_engine_get_req_version): New function.
3138         (gpgme_engine_check_version): Rewritten.
3139         * version.c (gpgme_get_engine_info): Rewritten.
3140         * gpgme.h (gpgme_engine_info): New structure.
3141         (GpgmeEngineInfo): New type.
3142         
3143 2003-01-29  Marcus Brinkmann  <marcus@g10code.de>
3144
3145         * types.h: Remove byte and ulong types.
3146         * util.h (_gpgme_hextobyte): Change prototype to unsigned char
3147         instead byte.
3148         * conversion.c (_gpgme_hextobyte): Change argument to unsigned
3149         char instead byte.
3150         (_gpgme_decode_c_string): Likewise, and beautify.  Also support a
3151         few more escaped characters.  Be more strict about buffer size.
3152         (_gpgme_data_append_percentstring_for_xml): Change type of SRC,
3153         BUF and DST to unsigned char instead byte.
3154         * progress.c (_gpgme_progress_status_handler): Use unsigned char
3155         instead byte.
3156         * debug.c (trim_spaces): Likewise.
3157
3158         * util.h (mk_error): Remove macro.
3159         * conversion.c, data.c, data-compat.c, decrypt.c, delete.c,
3160         edit.c, encrypt.c, encrypt-sign.c, engine.c, engine-gpgsm.c,
3161         export.c, genkey.c, gpgme.c, import.c, key.c, keylist.c,
3162         passphrase.c, progress.c, recipient.c, rungpg.c, sign.c,
3163         signers.c, trustlist.c, verify.c, wait.c, wait-global.c,
3164         wait-private (literally everywhere): Expand the mk_error macro.
3165
3166         * context.h (wait_on_request_or_fail): Remove macro.
3167
3168         * context.h (gpgme_context_s): Remove member ERROR.
3169         * types.h (GpgmeStatusHandler): Change return type to GpgmeError.
3170         (GpgmeCommandHandler): Change return type to GpgmeError and add
3171         new argument RESULT.
3172         * gpgme.h (GpgmeIOCb): Change return type to GpgmeError.
3173         (GpgmeEventIO): New event GPGME_EVENT_START.
3174         (GpgmeIdleFunc): Remove type.
3175         (gpgme_register_idle): Remove prototype.
3176         * data.c: Include <assert.h>.
3177         (_gpgme_data_inbound_handler): Change return type to GpgmeError.
3178         Return any error instead ignoring it, don't close file descriptor
3179         on error.
3180         (_gpgme_data_outbound_handler): Likewise.
3181         * decrypt.c: Do not include <stdio.h>, <string.h> and <assert.h>.
3182         (_gpgme_decrypt_status_handler): Change return type to GpgmeError.
3183         Return error instead setting ctx->error.  Return success at end of
3184         function.
3185         (gpgme_op_decrypt): Don't work around the old kludge anymore.
3186         * decrypt-verify.c (decrypt_verify_status_handler): Change return
3187         type to GpgmeError.  Return possible errors.
3188         * delete.c: Do not include <stdio.h>, <string.h>, <time.h> and
3189         <assert.h>.
3190         (delete_status_handler): Change return type to GpgmeError.  Return
3191         error instead setting ctx->error.  Return success at end of
3192         function.
3193         * edit.c: Do not include <stdio.h> and <string.h>.
3194         (_gpgme_edit_status_handler): Change type to GpgmeError,
3195         make static and rename to ...
3196         (edit_status_handler): ... this.  Return error directly.
3197         (command_handler): Change return type to GpgmeError, add result
3198         argument.  Return error directly.
3199         * encrypt.c (status_handler_finish): Remove function.
3200         (_gpgme_encrypt_status_handler): Change return type to GpgmeError.
3201         Return error directly.
3202         (_gpgme_encrypt_sym_status_handler): Likewise.
3203         * encrypt-sign.c (encrypt_sign_status_handler): Likewise.
3204         * engine-gpgsm.c (close_notify_handler): Do not signal done event
3205         anymore.
3206         (status_handler): Change return type to GpgmeError.  Diddle things
3207         around a bit to return errors directly.
3208         (start): Send start event.
3209         * export.c: Do not include <stdio.h>, <string.h> and <assert.h>.
3210         (export_status_handler): Change return type to GpgmeError.  Don't
3211         check ctx->error.
3212         * genkey.c: Do not include <stdio.h> and <assert.h>.
3213         (genkey_status_handler): Change return type to GpgmeError.  Don't
3214         check ctx->error.  Return errors directly.
3215         * gpgme.c (_gpgme_release_result): Do not initialize ctx->error.
3216         (_gpgme_op_event_cb): Function removed.
3217         (_gpgme_op_event_cb_user): Likewise.
3218         * import.c: Do not include <stdio.h>, <string.h> and <assert.h>.
3219         (import_status_handler): Change return type to GpgmeError.  Don't
3220         check ctx->error.
3221         * keylist.c (keylist_colon_handler, keylist_status_handler, finish_key):
3222         Change return type to GpgmeError, return error directly.
3223         * Makefile (libgpgme_la_SOURCES): Add wait-global.c,
3224         wait-private.c and wait-user.c
3225         * ops.h (test_and_allocate_result): Return error instead setting
3226         ctx->error.
3227         (_gpgme_data_inbound_handler, _gpgme_data_outbound_handler,
3228         _gpgme_verify_status_handler, _gpgme_decrypt_status_handler,
3229         _gpgme_sign_status_handler, _gpgme_encrypt_staus_handler,
3230         _gpgme_passphrase_status_handler, _gpgme_progress_status_handler):
3231         Change return type to GpgmeError.
3232         (_gpgme_passphease_command_handler): Change return type to
3233         GpgmeError and add new argument RESULT.
3234         * op-support.c: Use new callback functions, and change private
3235         data to ctx everywhere.
3236         * passphrase.c (_gpgme_passphrase_status_handler): Change return
3237         type to GpgmeError, return error directly.
3238         (_gpgme_passphrase_command_handler): Change return type to
3239         GpgmeError, add result argument.  Return results accordingly.
3240         * progress.c (_gpgme_progress_status_handler): Change return type
3241         to GpgmeError, return errors directly.
3242         * rungpg.c (status_handler): Change return type to GpgmeError.
3243         Return error directly.
3244         (close_notify_handler): Don't send done event.
3245         (colon_line_handler): Change return type to GpgmeError, return
3246         errors directly.
3247         * rungpg.c (start): Send start event.
3248         * sign.c (_gpgme_sign_status_handler): Change return type to
3249         GpgmeError, return errors directly.
3250         * trustlist.c (trustlist_status_handler): Change return type to
3251         GpgmeError.  Return 0.
3252         (trustlist_colon_handler): Change return type GpgmeError.  Return
3253         errors directly.
3254         * verify.c (add_notation): Change return type to GpgmeError,
3255         return errors directly.
3256         (_gpgme_verify_status_handler): Likewise.
3257         * wait.h (struct fd_table): Remove lock member.
3258         (struct wait_item_s): Moved here from wait.c.
3259         (struct tag): New structure.
3260         (_gpgme_wait_event_cb): Remove prototype.
3261         (_gpgme_wait_private_event_cb, _gpgme_wait_global_event_cb,
3262         _gpgme_wait_user_add_io_cb, _gpgme_wait_user_remove_io_cb,
3263         _gpgme_wait_user_event_io_cb): New prototypes.
3264         * wait.c: Don't include <stdio.h>.
3265         (ftd_global, ctx_done_list, ctx_done_list_size,
3266         ctx_done_list_length, ctx_done_list_lock, idle_function): Remove
3267         global variable.
3268         (gpgme_register_idle, do_select, _gpgme_wait_event_cb): Remove
3269         function.
3270         (gpgme_wait): Move to file wait-global.c.
3271         (_gpgme_add_io_cb): Take ctx as private argument, initialize ctx
3272         member in wait item and tag.
3273         (_gpgme_remove_io_cb): Take ctx from tag.  Don't use FDT lock.
3274         (_gpgme_wait_one, _gpgme_wait_on_condition): Move to
3275         wait-private.c.
3276         (gpgme_fd_table_init): Don't initialize FDT->lock.
3277         (gpgme_fd_table_deinit): Don't destroy FDT->lock.
3278         (_gpgme_fd_table_put): Make static and rename to ...
3279         (fd_table_put): ... this function.  Don't use FDT->lock.
3280         (struct wait_item_s): Move to wait.h.
3281         * wait-global.c: New file.
3282         * wait-private.c: New file.
3283         * wait-user.c: New file.
3284
3285         * key.c (gpgme_key_sig_get_string_attr): Use validity_to_string
3286         instead otrust_to_string to calculate validity.
3287         
3288 2003-01-19  Miguel Coca  <mcoca@gnu.org>
3289
3290         * w32-io.c (_gpgme_io_select): Add missing argument in calls to
3291         DEBUG_BEGIN.
3292         * w32-util.c: Include "sema.h".
3293         (find_program_in_registry): Change DEBUG1 to DEBUG2, fixes compilation
3294         error.
3295
3296 2003-01-19  Marcus Brinkmann  <marcus@g10code.de>
3297
3298         * rungpg.c (_gpgme_engine_ops_gpg): Remove gpg_start.
3299         (gpg_start): Rename to ...
3300         (start): ... this function.  Change arguments to GpgObject.
3301         (gpg_decrypt): Call start.
3302         (gpg_edit): Likewise.
3303         (gpg_encrypt): Likewise.
3304         (gpg_encrypt_sign): Likewise.
3305         (gpg_export): Likewise.
3306         (gpg_import): Likewise.
3307         (gpg_keylist): Likewise.
3308         (gpg_keylist_ext): Likewise.
3309         (gpg_trustlist): Likewise.
3310         (gpg_verify): Likewise.
3311
3312         * engine-gpgsm.c (_gpgme_engine_ops_encrypt): Remove gpgsm_start.
3313         (gpgsm_start): Rename to ...
3314         (struct gpgsm_object_s): Remove member command.
3315         (gpgsm_release): Don't free command.
3316         (start): ... this function.  Change arguments to GpgsmObject and
3317         const char *.
3318         (gpgsm_decrypt): Call start.
3319         (gpgsm_delete): Likewise.
3320         (gpgsm_encrypt): Likewise.
3321         (gpgsm_export): Likewise.
3322         (gpgsm_genkey): Likewise.
3323         (gpgsm_import): Likewise.
3324         (gpgsm_keylist): Likewise.
3325         (gpgsm_keylist_ext): Likewise.
3326         (gpgsm_verify): Likewise.
3327
3328         * decrypt.c (_gpgme_decrypt_start): Don't call
3329         _gpgme_engine_start.
3330         * delete.c (_gpgme_op_delete_start): Likewise.
3331         * edit.c (_gpgme_op_edit_start): Likewise.
3332         * encrypt.c (_gpgme_op_encrypt_start): 
3333         * encrypt-sign.c (_gpgme_op_encrypt_sign_start): 
3334         * export.c (_gpgme_op_export_start): Likewise.
3335         * genkey.c (_gpgme_op_genkey_start): Likewise.
3336         * import.c (_gpgme_op_import_start): Likewise.
3337         * keylist.c (gpgme_op_keylist_ext_start): Likewise.
3338         (gpgme_op_keylist_start): Likewise.
3339         * sign.c (_gpgme_op_sign_start): Likewise.
3340         * trustlist.c (gpgme_op_trustlist_start): Likewise.
3341         * verify.c (_gpgme_op_verify_start): Likewise.
3342
3343         * engine-backend.h (struct engine_ops): Remove member start.
3344
3345         * engine.h (_gpgme_engine_start): Remove prototype.
3346         * engine.c (_gpgme_engine_start): Remove function.
3347
3348 2003-01-06  Werner Koch  <wk@gnupg.org>
3349
3350         * keylist.c (set_mainkey_capability): Handle 'd' and 'D' used
3351         since gpg 1.3 to denote disabled keys.
3352
3353 2003-01-06  Marcus Brinkmann  <marcus@g10code.de>
3354
3355         * data-mem.c: Include <string.h>.
3356         * engine.c: Likewise.
3357
3358 2003-01-06  Marcus Brinkmann  <marcus@g10code.de>
3359
3360         * Makefile.am (libgpgme_la_DEPENDENCIES): Correct bug in last change.
3361
3362 2002-12-24  Marcus Brinkmann  <marcus@g10code.de>
3363
3364         * gpgme.h (gpgme_op_verify, gpgme_op_decrypt_verify): Drop R_STAT
3365         argument.
3366         * decrypt-verify.c (gpgme_op_decrypt_verify): Drop R_STAT
3367         argument.
3368         * verify.c (gpgme_op_verify): Drop R_STAT argument.
3369         (_gpgme_intersect_stati): Function removed.
3370         * ops.h (_gpgme_intersect_stati): Remove prototype.
3371
3372 2002-12-24  Marcus Brinkmann  <marcus@g10code.de>
3373
3374         * libgpgme.vers: New file.
3375         * Makefile.am (EXTRA_DIST): Add libgpgme.vers.
3376         (libgpgme_version_script_cmd): New variable.
3377         (libgpgme_la_LDFLAGS): Add libgpgme_version_script_cmd here.
3378         (libgpgme_la_DEPENDENCIES): New variable.
3379
3380 2002-12-23  Marcus Brinkmann  <marcus@g10code.de>
3381
3382         * key.c (gpgme_key_get_string_attr): Don't accept GPGME_ATTR_IS_SECRET.
3383         (otrust_to_string): New function.
3384         (gpgme_key_get_as_xml): Use it.
3385         (validity_to_string): New function.
3386         (gpgme_key_get_string_attr): Beautify using above functions.
3387         (gpgme_key_get_ulong_attr): Likewise.
3388
3389 2002-12-23  Marcus Brinkmann  <marcus@g10code.de>
3390
3391         * data-mem.c (mem_release): Fix gcc warning.
3392         * data-user.c (user_release): Likewise.
3393
3394 2002-12-06  Marcus Brinkmann  <marcus@g10code.de>
3395
3396         * data.h (gpgme_data_release_cb): Change return type to void.
3397         (gpgme_data_read_cb): Change return type to ssize_t.
3398         * data.c (gpgme_data_read): Likewise.
3399         * data-stream.c (stream_read): Likewise.
3400         * data-fd.c (fd_read): Likewise.
3401         * data-mem.c (mem_read): Likewise.
3402         (mem_release): Change return type to void.
3403         * data-user.c (user_read): Change return type to ssize_t.
3404         (user_release): Change return type to void.
3405         * data-compat.c (old_user_read): Change return type to ssize_t. 
3406         * gpgme.h (GpgmeDataReadCb): Likewise.
3407         (gpgme_data_read): Likewise.
3408         (GpgmeDataSeekCb): Change return type to off_t.
3409
3410 2002-12-04  Marcus Brinkmann  <marcus@g10code.de>
3411
3412         * gpgme.h: Add prototype for gpgme_get_key.
3413         * key.c (gpgme_get_key): New function.
3414         * verify.c (gpgme_get_sig_key): Rewrite using gpgme_get_key.
3415
3416         * gpgme.h: Add prototypes for new interfaces
3417         gpgme_key_sig_get_string_attr and gpgme_key_get_ulong_attr.
3418         (enum GpgmeAttr): New attribute GPGME_ATTR_SIG_CLASS.
3419         * gpgme.c (gpgme_set_keylist_mode): Allow GPGME_KEYLIST_MODE_SIGS.
3420         * key.h (struct certsig_s): New members ALGO, NAME_PART,
3421         EMAIL_PART, COMMENT_PART, NAME, SIG_STAT and SIG_CLASS.
3422
3423         * conversion.c (_gpgme_decode_c_string): Add new parameter LEN.
3424         Use that to determine if allocation is desired or not.
3425         * util.h: Adjust prototype of _gpgme_decode_c_string.
3426         * keylist.c (keylist_colon_handler): Adjust caller of
3427         _gpgme_decode_c_string.
3428
3429         * key.h (struct gpgme_key_s): New member last_uid.
3430         * key.c (_gpgme_key_append_name): Rewritten using
3431         _gpgme_decode_c_string and the last_uid pointer.
3432         (my_isdigit): Macro removed.
3433         (ALLOC_CHUNK): Likewise.
3434         * keylist.c (set_userid_flags): Use last_uid member of KEY.
3435
3436         * context.h (struct user_id_s): New member last_certsig.
3437         * key.h: Add prototype for _gpgme_key_add_certsig.
3438         * key.c (_gpgme_key_add_certsig): New function.
3439         (set_user_id_part): Move function before _gpgme_key_add_certsig.
3440         (parse_user_id): Change first argument to SRC, add new arguments
3441         NAME, EMAIL and COMMENT.  Change code to use these arguments
3442         instead going through UID.  Move function before
3443         _gpgme_add_certsig.
3444         (parse_x509_user_id): Likewise.
3445         (_gpgme_key_append_name): Adjust arguments to parse_x509_user_id
3446         and parse_user_id invocation.
3447         (one_certsig_as_xml): New function.
3448         (one_uid_as_xml): Print signatures.
3449         * context.h (struct gpgme_context_s): New member TMP_UID.
3450         * keylist.c (keylist_colon_handler): Rewritten, implement "sig"
3451         record entries.
3452
3453         * key.c (get_certsig): New function.
3454         (gpgme_key_sig_get_string_attr): Likewise.
3455         (gpgme_key_sig_get_ulong_attr): Likewise.
3456
3457         * keylist.c: Include <ctype.h>.
3458         (my_isdigit): Macro removed.
3459         (set_mainkey_trust_info): Use isdigit, not my_isdigit.
3460         (set_userid_flags): Likewise.
3461         (set_subkey_trust_info): Likewise.
3462         (set_ownertrust): Likewise.
3463         (finish_key): Move function up a bit and remove prototype.
3464
3465         * rungpg.c (gpg_keylist_ext): Correct precedence of signature
3466         listing mode.
3467         (gpg_keylist_ext): Implement signature listing mode.
3468
3469 2002-11-25  Marcus Brinkmann  <marcus@g10code.de>
3470
3471         * rungpg.c (_gpgme_gpg_spawn): Do not set parent fds to -1.
3472         * posix-io.c (_gpgme_io_spawn): Call _gpgme_io_close instead close
3473         for parent fds.
3474         * w32-io.c (_gpgme_io_spawn): Call _gpgme_io_close instead
3475         CloseHandle for parent fds.
3476
3477 2002-11-22  Marcus Brinkmann  <marcus@g10code.de>
3478
3479         * gpgme.h [_MSC_VER]: Define ssize_t as long.
3480
3481 2002-11-22  Werner Koch  <wk@gnupg.org>
3482
3483         * engine-gpgsm.c (_gpgme_gpgsm_new): Save the result of a first
3484         setlocale before doing another setlocale.
3485
3486 2002-11-21  Marcus Brinkmann  <marcus@g10code.de>
3487
3488         * decrypt.c: Some beautyfication.
3489
3490         * verify.c (_gpgme_verify_status_handler): Treat
3491         GPGME_STATUS_UNEXPECTED like GPGME_STATUS_NODATA.
3492         Reported by Miguel Coca <e970095@zipi.fi.upm.es>.
3493
3494 2002-11-19  Marcus Brinkmann  <marcus@g10code.de>
3495
3496         * genkey.c: Only include <config.h> if [HAVE_CONFIG_H].
3497         (struct genkey_result_s): Add new member FPR.
3498         (_gpgme_release_genkey_result): Free RESULT->fpr if set.
3499         (genkey_status_handler): Extract the fingerprint from the status
3500         line.
3501         (gpgme_op_genkey): Add new argument FPR and return the fingerprint
3502         in it.
3503         * gpgme.h: Adjust prototype of gpgme_op_genkey.
3504
3505 2002-11-19  Marcus Brinkmann  <marcus@g10code.de>
3506
3507         * rungpg.c (gpg_keylist): Add --with-fingerprint to gpg invocation
3508         twice, to get fingerprints on subkeys.  Suggested by Timo Schulz
3509         <twoaday@freakmail.de>.
3510         (gpg_keylist_ext): Likewise.
3511
3512 2002-11-05  Marcus Brinkmann  <marcus@g10code.de>
3513
3514         * import.c (append_xml_impinfo): Use
3515         _gpgme_data_append_string_for_xml rather than
3516         _gpgme_data_append_string for the field content.
3517         Submitted by Miguel Coca <e970095@zipi.fi.upm.es>.
3518         
3519 2002-10-10  Marcus Brinkmann  <marcus@g10code.de>
3520
3521         * rungpg.h, engine-gpgsm.h: File removed.
3522         * engine-backend.h: New file.
3523         * Makefile.am (gpgsm_components): New variable, set depending on
3524         automake conditional HAVE_GPGSM.
3525         (libgpgme_la_SOURCES): Add engine-backend.h, remove rungpg.h and
3526         engine-gpgsm.h.  Replace engine-gpgsm.c with ${gpgsm_components}.
3527         (status-table.h): Depend on gpgme.h, not rungpg.h.
3528         * conversion.c: Include <stdlib.h>.
3529         * engine-gpgsm.c: Do not set ENABLE_GPGSM here.  Include
3530         "engine-backend.h" instead "engine-gpgsm.h".  Reorder some
3531         functions and remove all function prototypes.
3532         (_gpgme_gpgsm_get_version): Make static and rename to ...
3533         (gpgsm_get_version): ... this.
3534         (_gpgme_gpgsm_check_version): Make static and rename to ...
3535         (gpgsm_check_version): ... this.
3536         (_gpgme_gpgsm_new): Make static.  Change argument type from
3537         GpgsmObject * to void **.  Call gpgsm_release instead
3538         _gpgme_gpgsm_release.
3539         (_gpgme_gpgsm_op_decrypt): Make static and rename to ...
3540         (gpgsm_check_decrypt): ... this.
3541         (_gpgme_gpgsm_op_delete): Make static and rename to ...
3542         (gpgsm_check_delete): ... this.
3543         (_gpgme_gpgsm_set_recipients): Make static and rename to ...
3544         (gpgsm_check_set_recipients): ... this.
3545         (_gpgme_gpgsm_op_encrypt): Make static and rename to ...
3546         (gpgsm_encrypt): ... this.
3547         (_gpgme_gpgsm_op_export): Make static and rename to ...
3548         (gpgsm_export): ... this.
3549         (_gpgme_gpgsm_op_genkey): Make static and rename to ...
3550         (gpgsm_genkey): ... this.
3551         (_gpgme_gpgsm_op_import): Make static and rename to ...
3552         (gpgsm_import): ... this.
3553         (_gpgme_gpgsm_op_keylist): Make static and rename to ...
3554         (gpgsm_keylist): ... this.
3555         (_gpgme_gpgsm_op_keylist_ext): Make static and rename to ...
3556         (gpgsm_keylist_ext): ... this.
3557         (_gpgme_gpgsm_op_sign): Make static and rename to ...
3558         (gpgsm_sign): ... this.
3559         (_gpgme_gpgsm_op_trustlist): Make static and rename to ...
3560         (gpgsm_trustlist): ... this.
3561         (_gpgme_gpgsm_op_verify): Make static and rename to ...
3562         (gpgsm_verify): ... this.
3563         (gpgsm_status_handler): Rename to ...
3564         (status_handler): ... this.
3565         (_gpgme_gpgsm_set_status_handler): Make static and rename to ...
3566         (gpgsm_set_status_handler): ... this.
3567         (_gpgme_gpgsm_set_colon_line_handler): Make static and rename to ...
3568         (gpgsm_set_colon_line_handler): ... this.
3569         (_gpgme_gpgsm_add_io_cb): Rename to ...
3570         (add_io_cb): ... this.
3571         (_gpgme_gpgsm_start): Make static and rename to ...
3572         (gpgsm_start): ... this.
3573         (_gpgme_gpgsm_set_io_cb): Make static and rename to ...
3574         (gpgsm_set_io_cb): ... this.
3575         (_gpgme_gpgsm_io_event): Make static and rename to ...
3576         (gpgsm_io_event): ... this.
3577         (struct _gpgme_engine_ops_gpgsm): New variable.
3578         [!ENABLE_GPGSM]: Removed.
3579         * engine.c: Do not include <time.h>, <sys/types.h>, <string.h>,
3580         <assert.h>, "io.h", "rungpg.h" and "engine-gpgsm.h".  Include
3581         <stdlib.h> and "engine-backend.h".
3582         (struct engine_object_s): Rewritten.
3583         (engine_ops): New variable.
3584         * engine.c (_gpgme_engine_get_path, _gpgme_engine_get_version,
3585         _gpgme_engine_check_version, _gpgme_engine_new,
3586         _gpgme_engine_release, _gpgme_engine_set_verbosity,
3587         _gpgme_engine_set_status_handler,
3588         _gpgme_engine_set_command_handler,
3589         _gpgme_engine_set_colon_line_handler, _gpgme_engine_op_decrypt,
3590         _gpgme_engine_op_delete, _gpgme_engine_op_edit,
3591         _gpgme_engine_op_encrypt, _gpgme_engine_op_encrypt_sign,
3592         _gpgme_engine_op_export, _gpgme_engine_op_genkey,
3593         _gpgme_engine_op_import, _gpgme_engine_op_keylist,
3594         _gpgme_engine_op_keylist_ext, _gpgme_engine_op_sign,
3595         _gpgme_engine_op_trustlist, _gpgme_engine_op_verify,
3596         _gpgme_engine_start, _gpgme_engine_set_io_cbs,
3597         _gpgme_engine_io_event): Reimplement.
3598         * engine.h: Fix a few comments and a variable name in a prototype.
3599         * ops.h: Do not include "rungpg.h".
3600         * passphrase.c: Include config.h only if [HAVE_CONFIG_H].  Do not
3601         include "rungpg.h".
3602         * recipient.c: Likewise.
3603         * signers.c: Likewise.
3604         * version.c: Likewise.
3605         * rungpg.c: Likewise.  Include "engine-backend.h".  Reorder
3606         functions and remove prototypes.
3607         (_gpgme_gpg_get_version): Make static and rename to ...
3608         (gpg_get_version): ... this.
3609         (_gpgme_gpg_check_version): Make static and rename to ...
3610         (gpg_check_version): ... this.
3611         (_gpgme_gpg_new): Make static.  Change argument type from
3612         GpgObject * to void **.  Call gpg_release instead
3613         _gpgme_gpg_release.
3614         (_gpgme_gpg_op_decrypt): Make static and rename to ...
3615         (gpg_check_decrypt): ... this.
3616         (_gpgme_gpg_op_delete): Make static and rename to ...
3617         (gpg_check_delete): ... this.
3618         (_gpgme_gpg_set_recipients): Make static and rename to ...
3619         (gpg_check_set_recipients): ... this.
3620         (_gpgme_gpg_op_encrypt): Make static and rename to ...
3621         (gpg_encrypt): ... this.
3622         (_gpgme_gpg_op_export): Make static and rename to ...
3623         (gpg_export): ... this.
3624         (_gpgme_gpg_op_genkey): Make static and rename to ...
3625         (gpg_genkey): ... this.
3626         (_gpgme_gpg_op_import): Make static and rename to ...
3627         (gpg_import): ... this.
3628         (_gpgme_gpg_op_keylist): Make static and rename to ...
3629         (gpg_keylist): ... this.
3630         (_gpgme_gpg_op_keylist_ext): Make static and rename to ...
3631         (gpg_keylist_ext): ... this.
3632         (_gpgme_gpg_op_sign): Make static and rename to ...
3633         (gpg_sign): ... this.
3634         (_gpgme_gpg_op_trustlist): Make static and rename to ...
3635         (gpg_trustlist): ... this.
3636         (_gpgme_gpg_op_verify): Make static and rename to ...
3637         (gpg_verify): ... this.
3638         (gpg_status_handler): Rename to ...
3639         (status_handler): ... this.
3640         (_gpgme_gpg_set_status_handler): Make static and rename to ...
3641         (gpg_set_status_handler): ... this.
3642         (_gpgme_gpg_set_colon_line_handler): Make static and rename to ...
3643         (gpg_set_colon_line_handler): ... this.
3644         (gpgme_gpg_add_io_cb): Rename to ...
3645         (add_io_cb): ... this.
3646         (_gpgme_gpg_start): Make static and rename to ...
3647         (gpg_start): ... this.
3648         (_gpgme_gpg_set_io_cb): Make static and rename to ...
3649         (gpg_set_io_cb): ... this.
3650         (_gpgme_gpg_io_event): Make static and rename to ...
3651         (gpg_io_event): ... this.
3652         (struct _gpgme_engine_ops_gpg): New variable.
3653
3654 2002-10-10  Marcus Brinkmann  <marcus@g10code.de>
3655
3656         * engine-gpgsm.c (_gpgme_gpgsm_op_verify) [!ENABLE_GPGSM]: Add
3657         missing argument.
3658
3659 2002-10-09  Marcus Brinkmann  <marcus@g10code.de>
3660
3661         * data.h, data-user.c, data-stream.c, data-mem.c, data-fd.c,
3662         data-compat.c: New file.  Really check them in this time, completes
3663         2002-10-08 change.
3664
3665         * rungpg.h (GpgStatusHandler): Rename type to GpgmeStatusHandler
3666         and move to ...
3667         * types.h (GpgmeStatusHandler): ... here.
3668         * rungpg.h (GpgColonLineHandler): Rename type to GpgmeColonLineHandler.
3669         and move to ...
3670         * types.h (GpgmeColonLineHandler): ... here.
3671         * rungpg.h (GpgCommandHandler): Rename type to GpgmeCommandHandler.
3672         and move to ...
3673         * types.h (GpgmeCommandHandler): ... here.
3674         * engine.h: Don't include "rungpg.h".
3675         (_gpgme_engine_set_status_handler): Change type of
3676         argument from GpgStatusHandler to GpgmeStatusHandler.
3677         (_gpgme_engine_set_colon_line_handler): Change type of
3678         argument from GpgColonLineHandler to GpgmeColonLineHandler.
3679         (_gpgme_engine_set_command_handler): Change type of
3680         argument from GpgCommandHandler to GpgmeCommandHandler.
3681         * engine-gpgsm.h: Don't include "rungpg.h".
3682         (_gpgme_gpgsm_set_status_handler): Change type of
3683         argument from GpgStatusHandler to GpgmeStatusHandler.
3684         (_gpgme_gpgsm_set_colon_line_handler): Change type of
3685         argument from GpgColonLineHandler to GpgmeColonLineHandler.
3686         * engine-gpgsm.c: Do not include "rungpg.h".
3687         (struct gpgsm_object_s): Change type of
3688         status.fnc to GpgmeStatusHandler.  Change type of colon.fnc to
3689         GpgmeColonLineHandler.
3690         (gpgsm_assuan_simple_command): Change type of argument from
3691         GpgStatusHandler to GpgmeStatusHandler.
3692         (_gpgme_gpgsm_set_status_handler): Likewise.
3693         (_gpgme_gpgsm_set_colon_line_handler): Change type of argument from
3694         GpgColonLineHandler to GpgmeColonLineHandler.
3695         * rungpg.h (_gpgme_gpg_set_status_handler): Change type of
3696         argument from GpgStatusHandler to GpgmeStatusHandler.
3697         (_gpgme_gpg_set_colon_line_handler): Change type of
3698         argument from GpgColonLineHandler to GpgmeColonLineHandler.
3699         (_gpgme_gpg_set_command_handler): Change type of
3700         argument from GpgCommandHandler to GpgmeCommandHandler.
3701         * rungpg.c (struct gpg_object_s): Change type of status.fnc to
3702         GpgmeStatusHandler.  Change type of colon.fnc to
3703         GpgmeColonLineHandler.  Change type of cmd.fnc to
3704         GpgmeCommandLineHandler.
3705         (_gpgme_gpg_set_status_handler): Change type of argument FNC to
3706         GpgmeStatusHandler.
3707         (_gpgme_gpg_set_colon_line_handler): Change type of argument FNC
3708         to GpgmeColonLineHandler.
3709         (_gpgme_gpg_set_command_handler): Change type of argument FNC to
3710         GpgmeCommandHandler.
3711         * engine.c (_gpgme_engine_set_status_handler): Change type of
3712         argument FNC to GpgmeStatusHandler.
3713         (_gpgme_engine_set_colon_line_handler): Change type of argument FNC
3714         to GpgmeColonLineHandler.
3715         (_gpgme_engine_set_command_handler): Change type of argument FNC to
3716         GpgmeCommandHandler.
3717
3718         * rungpg.h (_gpgme_gpg_enable_pipemode): Remove prototype.
3719         * rungpg.c (struct gpg_object_s): Remove PM.
3720         (pipemode_cb): Prototype removed.
3721         (add_pm_data): Function removed.
3722         (_gpgme_gpg_enable_pipemode): Likewise.
3723         (pipemode_copy): Likewise.
3724         (pipemode_cb): Likewise.
3725         (add_arg): Don't check for pipemode.
3726         (add_data): Likewise.
3727         (_gpgme_gpg_set_status_handler): Likewise.
3728         (_gpgme_gpg_set_colon_line_handler): Likewise.
3729         (_gpgme_gpg_set_command_handler): Likewise.
3730         (_gpgme_gpg_spawn): Likewise.
3731         (_gpgme_gpg_spawn): Don't set PM.active.
3732         (_gpgme_gpg_op_verify): Remove pipemode case.
3733         * verify.c (_gpgme_op_verify_start): Remove pipemode case.
3734
3735         * rungpg.h (_gpgme_gpg_add_arg, _gpgme_gpg_add_data,
3736         _gpgme_gpg_add_pm_data, _gpgme_gpg_housecleaning,
3737         _gpgme_gpg_set_simple_line_handler): Prototype removed.
3738         (_gpgme_gpg_set_verbosity): New prototype.
3739         * rungpg.c (_gpgme_gpg_add_data): Make static and rename to ...
3740         (add_data): ... this.
3741         (_gpgme_gpg_add_pm_data): Call add_data, not _gpgme_gpg_add_data.
3742         (_gpgme_gpg_set_command_handler): Likewise.
3743         (_gpgme_gpg_op_decrypt, _gpgme_gpg_op_edit, _gpgme_gpg_op_encrypt,
3744         _gpgme_gpg_op_encrypt_sign, _gpgme_gpg_op_export,
3745         _gpgme_gpg_op_genkey, _gpgme_gpg_op_import, _gpgme_gpg_op_sign,
3746         _gpgme_gpg_op_verify): Likewise.
3747         (_gpgme_gpg_add_pm_data): Rename to ...
3748         (add_pm_data): ... this.
3749         (_gpgme_gpg_op_verify): Call add_pm_data, not
3750         _gpgme_gpg_add_pm_data.
3751         (_gpgme_gpg_add_arg): Make static and rename to ...
3752         (add_arg): ... this.
3753         (_gpgme_gpg_set_command_handler, _gpgme_gpg_new,
3754         _gpgme_gpg_op_decrypt, _gpgme_gpg_op_delete,
3755         _gpgme_append_gpg_args_from_signers, _gpgme_gpg_op_edit,
3756         _gpgme_append_gpg_args_from_recipients, _gpgme_gpg_op_encrypt,
3757         _gpgme_gpg_op_encrypt_sign, _gpgme_gpg_op_export,
3758         _gpgme_gpg_op_genkey, _gpgme_gpg_op_import, _gpgme_gpg_op_keylist,
3759         _gpgme_gpg_op_keylist_ext, _gpgme_gpg_op_trustlist,
3760         _gpgme_gpg_op_sign, _gpgme_gpg_op_verify): Use add_arg, not
3761         _gpgme_gpg_add_arg.
3762         (_gpgme_gpg_set_verbosity): New function.
3763         (struct gpg_object_s): Remove member simple from colon.
3764         (_gpgme_gpg_set_colon_line_handler): Don't initialize simple.
3765         (_gpgme_gpg_set_simple_line_handler): Removed function.
3766         (read_colon_line): Don't check the GPG->colon.simple.
3767         * engine.c (_gpgme_engine_set_verbosity): Call
3768         _gpgme_gpg_set_verbosity instead _gpgme_gpg_add_arg.
3769
3770 2002-10-08  Marcus Brinkmann  <marcus@g10code.de>
3771
3772         * util.h (_gpgme_malloc, _gpgme_realloc, _gpgme_calloc,
3773         _gpgme_strdup, _gpgme_free): Remove prototypes.
3774         (xtrymalloc, xtrycalloc, xtryrealloc, xtrystrdup, xfree): Remove
3775         macros.
3776         * util.c: File removed.
3777         * Makefile.am (libgpgme_la_SOURCES): Remove util.h.
3778         * conversion.c (_gpgme_decode_c_string): Use malloc instead of
3779         xtrymalloc, realloc instead of xtryrealloc, calloc instead of
3780         xtrycalloc, free instead of xfree.
3781         (_gpgme_data_append_percentstring_for_xml): Likewise.
3782         * data.c (_gpgme_data_new, _gpgme_data_release): Likewise.
3783         * data-compat.c (gpgme_data_new_from_filepart): Likewise.
3784         * data-mem.c (mem_write, mem_release, gpgme_data_new_from_mem,
3785         _gpgme_data_get_as_string): Likewise.
3786         * debug.c (debug_init): Likewise.
3787         * decrypt.c (_gpgme_release_decrypt_result): Likewise.
3788         * delete.c (_gpgme_release_delete_result): Likewise.
3789         * edit.c (_gpgme_release_edit_result, _gpgme_op_edit_start):
3790         Likewise.
3791         * encrypt.c (_gpgme_release_encrypt_result): Likewise.
3792         * engine.c (_gpgme_engine_get_info, _gpgme_engine_new,
3793         _gpgme_engine_release): Likewise.
3794         * engine-gpgsm.c (_gpgme_gpgsm_new, _gpgme_gpgsm_release,
3795         _gpgme_gpgsm_op_decrypt, _gpgme_gpgsm_op_delete,
3796         gpgsm_set_recipients, _gpgme_gpgsm_op_encrypt,
3797         _gpgme_gpgsm_op_export, _gpgme_gpgsm_op_genkey,
3798         _gpgme_gpgsm_op_import, _gpgme_gpgsm_op_keylist,
3799         _gpgme_gpgsm_op_keylist_ext, _gpgme_gpgsm_op_sign,
3800         _gpgme_gpgsm_op_verify, gpgsm_status_handler): Likewise.
3801         * genkey.c (_gpgme_release_genkey_result): Likewise.
3802         * gpgme.c (gpgme_new, gpgme_release): Likewise.
3803         * import.c (_gpgme_release_import_result): Likewise.
3804         * key.c (_gpgme_key_cache_init, _gpgme_key_cache_add, key_new,
3805         add_subkey, gpgme_key_release, _gpgme_key_append_name): Likewise.
3806         * keylist.c (_gpgme_release_keylist_result, keylist_colon_handler,
3807         _gpgme_op_keylist_event_cb, gpgme_op_keylist_next): Likewise.
3808         * ops.h (test_and_allocate_result): Likewise.
3809         * passphrase.c (_gpgme_release_passphrase_result,
3810         _gpgme_passphrase_status_handler,
3811         _gpgme_passphrase_command_handler): Likewise.
3812         * progress.c (_gpgme_progress_status_handler): Likewise.
3813         * recipient.c (gpgme_recipients_new, gpgme_recipients_release,
3814         gpgme_recipients_add_name_with_validity): Likewise.
3815         * rungpg.c (_gpgme_gpg_new, _gpgme_gpg_release,
3816         _gpgme_gpg_add_arg, _gpgme_gpg_add_data,
3817         _gpgme_gpg_set_colon_line_handler, free_argv, free_fd_data_map,
3818         build_argv, _gpgme_gpg_spawn, read_status, read_colon_line):
3819         Likewise.
3820         * sign.c (_gpgme_release_sign_result): Likewise.
3821         * signers.c (_gpgme_signers_add): Likewise.
3822         * trustlist.c (trust_item_new, trustlist_colon_handler,
3823         _gpgme_op_trustlist_event_cb, gpgme_op_trustlist_next,
3824         gpgme_trustitem_release): Likewise.
3825         * verify.c (_gpgme_release_verify_result, finish_sig): Likewise.
3826         * version.c (gpgme_get_engine_info, _gpgme_get_program_version):
3827         Likewise.
3828         * w32-io.c (create_reader, create_writer, destroy_reader,
3829         destroy_writer, build_commandline, _gpgme_io_spawn): Likewise.
3830         * w32-sema.c (critsect_init, _gpgme_sema_cs_destroy): Likewise.
3831         * w32-util.c (read_w32_registry_string): Likewise.
3832         * wait.c (_gpgme_fd_table_deinit, _gpgme_fd_table_put,
3833         _gpgme_wait_event_cb, _gpgme_add_io_cb, _gpgme_remove_io_cb)
3834         * data-compat.c: Include <stdlib.h>.
3835
3836 2002-10-08  Marcus Brinkmann  <marcus@g10code.de>
3837
3838         New data object component:
3839
3840         * gpgme.h (GpgmeDataReadCb, GpgmeDataWriteCb, GpgmeDataSeekCb,
3841         GpgmeDataReleaseCb): New types.
3842         (struct GpgmeDataCbs): New structure.
3843         (gpgme_data_read): Changed prototype to match that of read() closely.
3844         (gpgme_data_write): Similar for write().
3845         (gpgme_data_seek, gpgme_data_new_from_cbs, gpgme_data_new_from_fd,
3846         gpgme_data_new_from_stream): New prototypes.
3847         (gpgme_data_get_type, gpgme_check_engine): Prototype removed.
3848
3849         * Makefile.am (libgpgme_la_SOURCES): Add data.h, data-fd.c,
3850         data-stream.c, data-mem.c, data-user.c and data-compat.c.
3851         * data.c: Reimplemented from scratch.
3852         * (data-compat.c, data-fd.c, data.h, data-mem.c, data-stream.c,
3853         data-user.c): New file.
3854         * context.h (struct gpgme_data_s): Removed.
3855         * conversion.c: Include <errno.h> and <sys/types.h>.
3856         (_gpgme_data_append): New function.
3857         * data.c (_gpgme_data_append_string): Move to ...
3858         * conversion.c (_gpgme_data_append_string): ... here.
3859         * data.c (_gpgme_data_append_for_xml): Move to ...
3860         * conversion.c (_gpgme_data_append_for_xml): ... here.
3861         * data.c (_gpgme_data_append_string_for_xml): Move to ...
3862         * conversion.c (_gpgme_data_append_string_for_xml): ... here.
3863         * data.c (_gpgme_data_append_percentstring_for_xml): Move to ...
3864         * conversion.c (_gpgme_data_append_percentstring_for_xml): ... here.
3865
3866         * ops.h (_gpgme_data_get_mode, _gpgme_data_set_mode): Prototype
3867         removed.
3868         * types.h (GpgmeDataMode): Type removed.
3869
3870         * decrypt.c (_gpgme_decrypt_start): Don't check data type or mode.
3871         * edit.c (_gpgme_op_edit_start): Likewise.
3872         * encrypt.c (_gpgme_op_encrypt_start): Likewise.
3873         * encrypt-sign.c (_gpgme_op_encrypt_sign_start): Likewise.
3874         * encrypt-sign.c (_gpgme_op_encrypt_sign_start): Likewise.
3875         * export.c (_gpgme_op_export_start): Likewise.
3876         * genkey.c (_gpgme_op_genkey_start): Likewise.
3877         * import.c (_gpgme_op_import_start): Likewise.
3878         * sign.c (_gpgme_op_sign_start): Likewise.
3879         * verify.c (_gpgme_op_verify_start): Likewise.
3880         
3881         * encrypt.c (gpgme_op_encrypt): Remove hack that returns invalid
3882         no recipient if no data was returned.
3883         * encrypt-sign.c (gpgme_op_encrypt_sign): Remove hack that returns
3884         no recipient if no data was returned.
3885         * encrypt-sign.c (gpgme_op_encrypt_sign): Remove hack that returns
3886         no recipient if no data was returned.
3887
3888         * engine.c (_gpgme_engine_op_verify): Add new argument to
3889         differentiate detached from normal signatures.
3890         * engine.h (_gpgme_engine_op_verify): Likewise for prototype.
3891         * engine-gpgsm.c (_gpgme_gpgsm_op_verify): Likewise.  Don't check
3892         mode of data argument.
3893         * engine-gpgsm.h (_gpgme_gpgsm_op_verify): Likewise for prototype.
3894         * gpgme.h (gpgme_op_verify_start): Likewise for prototype.
3895         (gpgme_op_verify): Likewise for prototype.
3896         * rungpg.c (_gpgme_gpg_op_verify): Likewise.
3897         * rungpg.h (_gpgme_gpg_op_verify): Likewise for prototype.
3898         * verify.c (_gpgme_op_verify_start): Likewise.
3899         (gpgme_op_verify_start): Likewise.
3900         (gpgme_op_verify): Likewise.
3901
3902         * rungpg.c (struct arg_and_data_s): New member INBOUND to hold
3903         direction of data object.
3904         (_gpgme_gpg_add_data): Add new argument INBOUND.  Use it to
3905         determine direction of data object.
3906         (_gpgme_gpg_add_pm_data, _gpgme_gpg_set_command_handler,
3907         _gpgme_gpg_op_decrypt, _gpgme_gpg_op_edit, _gpgme_gpg_op_encrypt,
3908         _gpgme_gpg_op_encrypt_sign, _gpgme_gpg_op_export,
3909         _gpgme_gpg_op_genkey, _gpgme_gpg_op_import, _gpgme_gpg_op_sign,
3910         _gpgme_gpg_op_verify): Add new argument to _gpgme_gpg_add_data
3911         invocation.
3912         (build_argv): Use new member INBOUND to determine direction of
3913         file descriptor.  Don't check the data type.
3914         * rungpg.h (_gpgme_gpg_add_data): Add new argument to prototype.
3915         
3916         * gpgme.c (gpgme_get_op_info): Don't call
3917         _gpgme_data_get_as_string if CTX->op_info is NULL.
3918
3919         * version.c (gpgme_check_engine): Function removed.
3920
3921 2002-09-30  Werner Koch  <wk@gnupg.org>
3922
3923         * keylist.c (keylist_colon_handler): Take care when printing a
3924         NULL with the DEBUG.
3925
3926         * engine-gpgsm.c (struct gpgsm_object_s): New member ANY.
3927         (gpgsm_status_handler): Run the colon function to indicate EOF.
3928         (_gpgme_gpgsm_set_colon_line_handler): Better reset ANY here.
3929
3930 2002-09-28  Marcus Brinkmann  <marcus@g10code.de>
3931
3932         * conversion.c (_gpgme_hextobyte): Prevent superfluous
3933         multiplication with base.  Reported by Stéphane Corthésy.
3934
3935         * keylist.c (gpgme_op_keylist_ext_start): Use private asynchronous
3936         operation type in invocation of _gpgme_op_reset.
3937
3938 2002-09-20  Werner Koch  <wk@gnupg.org>
3939
3940         * ath.c: Include sys/time.h if sys/select.h is not available.
3941
3942 2002-09-13  Marcus Brinkmann  <marcus@g10code.de>
3943
3944         * keylist.c (keylist_status_handler): Do not call finish_key() here.
3945         (gpgme_op_keylist_ext_start): Set CTX->tmp_key to NULL.
3946
3947 2002-09-03  Marcus Brinkmann  <marcus@g10code.de>
3948
3949         * Makefile.am (assuan_libobjs): Remove @LTLIBOBJS@ as we link them
3950         into gpgme unconditionally.
3951         (libgpgme_la_LIBADD): Change @LIBOBJS@ into @LTLIBOBJS@.
3952
3953 2002-09-02  Marcus Brinkmann  <marcus@g10code.de>
3954
3955         * Makefile.am (assuan_libobjs): Use @LTLIBOBJS@ instead @LIBOBJS@.
3956
3957 2002-09-02  Marcus Brinkmann  <marcus@g10code.de>
3958
3959         * debug.c (_gpgme_debug_add): Test *LINE, not LINE.
3960         (_gpgme_debug_end): Likewise.
3961         Reported by Dr. Stefan Dalibor <Dr.Stefan.Dalibor@bfa.de>.
3962
3963 2002-09-02  Marcus Brinkmann  <marcus@g10code.de>
3964
3965         * posix-io.c (_gpgme_io_select): Don't use a non-constant struct
3966         initializer.
3967         * version.c (_gpgme_get_program_version): Likewise.
3968         Reported by Dr. Stefan Dalibor <Dr.Stefan.Dalibor@bfa.de>.
3969
3970 2002-09-02  Marcus Brinkmann  <marcus@g10code.de>
3971
3972         * conversion.c (_gpgme_decode_c_string): Set DESTP before
3973         modifying DEST.
3974
3975         * conversion.c (_gpgme_decode_c_string): Fix off by one error in
3976         last change.
3977         * rungpg.c (_gpgme_append_gpg_args_from_signers): Move before
3978         _gpgme_op_edit so its prototype is known early on.
3979
3980         * conversion.c: New file.
3981         * util.h: Add prototypes for _gpgme_decode_c_string and
3982         _gpgme_hextobyte.
3983         * keylist.c (keylist_colon_handler): Call _gpgme_decode_c_string
3984         on issuer name.
3985         * Makefile.am (libgpgme_la_SOURCES): Add conversion.c
3986         * key.c (_gpgme_key_append_name): Replace calls to hextobyte by
3987         calls to _gpgme_hextobyte.
3988         (hash_key): Likewise.
3989
3990 2002-09-01  Marcus Brinkmann  <marcus@g10code.de>
3991
3992         * op-support.c (_gpgme_op_reset): Set CTX->pending after calling
3993         _gpgme_engine_release, as this will reset pending to zero in the
3994         event done callback on cancelled operations.
3995
3996 2002-08-30  Marcus Brinkmann  <marcus@g10code.de>
3997
3998         * rungpg.c (_gpgme_gpg_op_edit): Add args from signers.
3999         Suggested by Miguel Coca <e970095@zipi.fi.upm.es>.
4000
4001         * rungpg.c (_gpgme_gpg_op_edit): Add bogus ctx argument.
4002         * rungpg.h: Also to prototype.
4003         * engine.c (_gpgme_engine_op_edit): Likewise.
4004         * engine.h: Likewise.
4005         * edit.c (_gpgme_op_edit_start): Likewise.
4006
4007 2002-08-29  Werner Koch  <wk@gnupg.org>
4008
4009         * engine-gpgsm.c (_gpgme_gpgsm_op_sign): Implement signer
4010         selection.
4011         * vasprintf.c (va_copy): Define macro if not yet defined.
4012
4013 2002-08-29  Marcus Brinkmann  <marcus@g10code.de>
4014
4015         * passphrase.c (_gpgme_passphrase_status_handler): Reset
4016         CTX->result.passphrase->no_passphrase if passphrase is given (good
4017         or bad).  Submitted by Jean DIRAISON <jean.diraison@free.fr>.
4018
4019 2002-08-28  Marcus Brinkmann  <marcus@g10code.de>
4020
4021         * posix-io.c (_gpgme_io_spawn): Use a double-fork approach.
4022         Return 0 on success, -1 on error.
4023         * version.c (_gpgme_get_program_version): Don't wait for the child.
4024         * engine.c (_gpgme_engine_housecleaning): Function removed.
4025         (do_reaping): Likewise.
4026         (_gpgme_engine_add_child_to_reap_list): Likewise.
4027         (struct reap_s): Removed.
4028         (reap_list): Likewise.
4029         (reap_list_lock): Likewise.
4030         * engine.h (_gpgme_engine_io_event): Remove prototypes for
4031         _gpgme_engine_housecleaning and
4032         _gpgme_engine_add_child_to_reap_list.
4033         * rungpg.c (_gpgme_gpg_release): Don't add child to reap list.
4034         (struct gpg_object_s): Remove PID member.
4035         (_gpgme_gpg_new): Don't initialize GPG->pid.
4036         (_gpgme_gpg_spawn): Don't set GPG->pid.
4037         * wait.c (run_idle): Removed.
4038         (gpgme_wait): Run idle_function directly.
4039
4040 2002-08-21  Marcus Brinkmann  <marcus@g10code.de>
4041
4042         * encrypt-sign.c (encrypt_sign_status_handler): Remove dead
4043         variables encrypt_info and encrypt_info_len.
4044         * trustlist.c (gpgme_op_trustlist_start): Set colon line handler.
4045         * posix-sema.c (sema_fatal): Remove function.
4046         All these reported by Stéphane Corthésy.
4047
4048 2002-08-23  Werner Koch  <wk@gnupg.org>
4049
4050         * gpgme-config.in: Made --prefix work for --libs. 
4051
4052 2002-08-21  Marcus Brinkmann  <marcus@g10code.de>
4053
4054         * ath.h: Update list of symbols that get a prefix: Rename the
4055         ath_mutex_*_available symbols to ath_*_available.
4056
4057 2002-08-21  Marcus Brinkmann  <marcus@g10code.de>
4058
4059         * stpcpy.c: New file from gnulib.
4060         * Makefile.am (assuan_libobjs): Remove jnlib.
4061
4062 2002-08-20  Marcus Brinkmann  <marcus@g10code.de>
4063
4064         * gpgme.h: Add prototype for gpgme_op_import_ext.
4065         * import.c (struct import_result_s): New member `nr_considered'.
4066         Rename `any_imported' to `nr_imported'.
4067         (import_status_handler): Increment nr_imported.  Set nr_considered
4068         if appropriate.
4069         (gpgme_op_import_ext): New function.
4070         (gpgme_op_import): Implement in terms of gpgme_op_import_ext.
4071
4072 2002-08-20  Werner Koch  <wk@gnupg.org>
4073
4074         * gpgme.m4: Replaced with a new and faster version.  This does not
4075         anymore try to build test programs.  If we really need test
4076         programs, we should add an option to gpgme-config to do so. 
4077
4078         * vasprintf.c (int_vasprintf): Hack to handle NULL passed for %s.
4079
4080 2002-08-20  Marcus Brinkmann  <marcus@g10code.de>
4081
4082         * gpgme.c (_gpgme_set_op_info): Append data on subsequent calls.
4083         * encrypt-sign.c (encrypt_sign_status_handler): Remove op_info
4084         handling.
4085
4086 2002-08-19  Werner Koch  <wk@gnupg.org>
4087
4088         * decrypt.c (is_token,skip_token): Duplicated from verify.c
4089         (gpgme_op_decrypt): Hack to properly return Decryption_Failed..
4090         (_gpgme_decrypt_status_handler): Create an operation info.
4091
4092 2002-08-14  Werner Koch  <wk@gnupg.org>
4093
4094         * key.h (struct certsig_s): New.  Use it in gpgme_key_s.
4095         * key.c (gpgme_key_release): Release it. We need to add more code
4096         of course.
4097         (_gpgme_key_append_name): Use memset to intialize the struct.
4098         * gpgme.h (GPGME_KEYLIST_MODE_SIGS): New.
4099         * rungpg.c (_gpgme_gpg_op_keylist): Include sigs in listing depending
4100         non the list mode.
4101         
4102         * key.c (gpgme_key_get_string_attr): Use GPGME_ATTR_TYPE to return
4103         information about the key type (PGP or X.509).
4104         (gpgme_key_get_ulong_attr): Likewise.
4105
4106         * keylist.c (keylist_colon_handler): Include 1 in the check for
4107         valid algorithms so that RSA is usable.  Store the issuer name and
4108         serial number also for "crs" records.  Parse the expire date for
4109         subkeys.
4110         (set_userid_flags): Put them onto the last appended key.
4111
4112 2002-07-29  Marcus Brinkmann  <marcus@g10code.de>
4113
4114         * rungpg.c (_gpgme_gpg_op_edit): Use --with-colons.
4115
4116 2002-07-28  Marcus Brinkmann  <marcus@g10code.de>
4117
4118         * data.c (gpgme_data_read): For GPGME_DATA_TYPE_NONE, return EOF
4119         instead an error.
4120
4121         The following changes make it possible to flush an inbound data
4122         pipe before invoking a command handler:
4123
4124         * posix-io.c (_gpgme_io_select): Accept new argument NONBLOCK to
4125         _gpgme_io_select.  Set timeout of 0 if this is set.
4126         * w32-io.c (_gpgme_io_select): Likewise.
4127         * io.h: Add new argument NONBLOCK to _gpgme_io_select prototype.
4128         * wait.c (do_select): Add new argument to _gpgme_io_select
4129         invocation.
4130         * rungpg.h (_gpgme_gpg_set_command_handler): Add new argument
4131         linked_data to prototype.
4132         * engine.h (_gpgme_engine_set_command_handler): Likewise.
4133         * engine.c (_gpgme_engine_set_command_handler): Likewise.
4134         * passphrase.c (_gpgme_passphrase_start): Pass NULL as linked_data
4135         argument to _gpgme_engine_set_command_handler.
4136         * rungpg.c (struct gpg_object_s): New members linked_data and
4137         linked_idx in CMD.
4138         (_gpgme_gpg_new): Initialize those new members.
4139         (_gpgme_gpg_set_command_handler): Accept new argument linked_data.
4140         (build_argv): Handle linked_data in the same hack as cb_data.
4141         (read_status): If linked_data is in use, flush the pipe before
4142         activating the command handler.
4143         * gpgme.h: Add prototypes for gpgme_op_edit_start and
4144         gpgme_op_edit.
4145
4146         The next changes export the status codes to the user:
4147
4148         * decrypt.c (_gpgme_decrypt_status_handler): Likewise, also prefix
4149         all STATUS_ with GPGME_.
4150         * delete.c (delete_status_handler): Likewise.
4151         * decrypt-verify.c (decrypt_verify_status_handler): Likewise.
4152         * encrypt.c (_gpgme_encrypt_status_handler): Likewise.
4153         (_gpgme_encrypt_sym_status_handler): Likewise.
4154         * encrypt-sign.c (encrypt_sign_status_handler): Likewise.
4155         * engine-gpgsm.c (parse_status): Likewise.
4156         (gpgsm_status_handler): Likewise.
4157         (gpgsm_set_recipients): Likewise.
4158         * export.c (export_status_handler): Likewise.
4159         * genkey.c (genkey_status_handler): Likewise.
4160         * import.c (append_xml_impinfo): Likewise.
4161         (import_status_handler): Likewise.
4162         * keylist.c (keylist_status_handler): Likewise.
4163         * passphrase.c (_gpgme_passphrase_status_handler): Likewise.
4164         (command_handler): Likewise.
4165         * progress.c (_gpgme_progress_status_handler): Likewise.
4166         * sign.c (_gpgme_sign_status_handler): Likewise.
4167         * trustlist.c (trustlist_status_handler): Likewise.
4168         * verify.c (_gpgme_verify_status_handler): Likewise.
4169         * gpgme.h (GpgmeEditCb): New type.
4170         * rungpg.h (GpgStatusCode): Rename and move to ...
4171         * gpgme.h (GpgmeStatusCode): ... this and here.
4172         * Makefile.am (status-table.h): Run mkstatus on gpgme.h, not rungpg.h.
4173         * mkstatus: Prefix STATUS with GPGME_.
4174         * rungpg.h (GpgStatusHandler, GpgCommandHandler): Change type
4175         accordingly.
4176         * ops.h (_gpgme_verify_status_handler,
4177         _gpgme_decrypt_status_handler, _gpgme_sign_status_handler,
4178         _gpgme_encrypt_status_handler, _gpgme_passphrase_status_handler,
4179         _gpgme_progress_status_handler): Likewise.
4180         * rungpg.c (struct gpg_object_s): Likewise for CMD.code.
4181
4182         These changes add an edit operation to GPGME:
4183         
4184         * context.h (struct gpgme_context_s): New member RESULT.edit.  *
4185         ops.h: Add prototype for _gpgme_release_edit_result and
4186         _gpgme_passphrase_command_handler.
4187         * passphrase.c (command_handler): Make non-static and rename to ...
4188         (_gpgme_passphrase_command_handler): ... this.
4189         (_gpgme_passphrase_start): Use new name for command handler.
4190         * types.h: Add EditResult type.
4191         * gpgme.c (_gpgme_release_result): Release EDIT result.
4192         * edit.c: New file.
4193         * Makefile.am (libgpgme_la_SOURCES): Add edit.c.
4194         (libgpgme_la_LDADD): Rename to libgpgme_la_LIBADD, and include
4195         assuan_libobjs.
4196         (assuan_libobjs): New variable, set this instead
4197         libgpgme_la_LIBADD.
4198         * engine.h (_gpgme_engine_op_edit): New prototype.
4199         * engine.c (_gpgme_engine_op_edit): New function.
4200         * rungpg.h (_gpgme_gpg_op_edit): New prototype.
4201         * rungpg.c (_gpgme_gpg_op_edit): New function.
4202
4203 2002-07-27  Marcus Brinkmann  <marcus@g10code.de>
4204
4205         * delete.c (delete_problem): New case ambigious specification.
4206         (delete_status_handler): Handle new case (poorly).
4207
4208 2002-07-25  Marcus Brinkmann  <marcus@g10code.de>
4209
4210         * engine-gpgsm.c (_gpgme_gpgsm_op_delete): Implement this.
4211
4212 2002-07-25  Marcus Brinkmann  <marcus@g10code.de>
4213
4214         * Makefile.am (libgpgme_la_LDADD): Add @LIBOBJS@ for vasprintf and
4215         fopencookie.
4216         * vasprintf.c: Update to more recent libiberty version.
4217         * debug.h: Replace #elsif with #elif.
4218
4219         Submitted by Stéphane Corthésy:
4220         * util.h (vasprintf): Correct prototype.
4221         * encrypt-sign.c: Include <stddef.h>.
4222         (encrypt_sign_status_handler): Change type of ENCRYPT_INFO_LEN to
4223         size_t.
4224         * ath-pthread.c: Include <stdlib.h>, not <malloc.h>.
4225         * ath-pth.c: Likewise.
4226
4227 2002-07-25  Marcus Brinkmann  <marcus@g10code.de>
4228
4229         * wait.c (fdt_global): Make static.  Reported by Stéphane
4230         Corthésy.
4231
4232         * rungpg.c (_gpgme_gpg_op_keylist_ext): Skip empty string
4233         patterns.  Reported by Stéphane Corthésy.
4234
4235         * key.c (gpgme_key_get_as_xml): Add OTRUST attribute.  Requested
4236         by Stéphane Corthésy.
4237         (gpgme_key_get_string_attr): Add GPGME_ATTR_SIG_SUMMARY case to
4238         silence gcc warning.
4239
4240         * rungpg.c (_gpgme_gpg_new): Always set utf8 as charset.
4241
4242 2002-07-03  Marcus Brinkmann  <marcus@g10code.de>
4243
4244         * gpgme.c (gpgme_set_io_cbs): Deal with CTX being NULL.
4245
4246         * gpgme.c (_gpgme_op_event_cb_user): New function.
4247         * op-support.c (_gpgme_op_reset): Support a new mode of operation
4248         for private or user event loop.  Use new user event callback
4249         wrapper.
4250         * trustlist.c (gpgme_op_trustlist_start): Use this new mode.
4251         * keylist.c (gpgme_op_keylist_start): Likewise.
4252
4253         * rungpg.c (_gpgme_gpg_io_event): New function.
4254         * rungpg.h (_gpgme_gpg_io_event): New prototype.
4255         * engine-gpgsm.c (_gpgme_gpg_io_event): New function.
4256         * engine-gpgsm.h (_gpgme_gpgsm_io_event): New prototype.
4257         * engine.c (_gpgme_engine_io_event): New function.
4258         * engine.h (_gpgme_engine_io_event): New prototype.
4259         * keylist.c (finish_key): Call _gpgme_engine_io_event, and move
4260         the real work for the default IO callback routines to ...
4261         (_gpgme_op_keylist_event_cb): ... here.  New function.
4262         * trustlist.c (trustlist_colon_handler): Signal
4263         GPGME_EVENT_NEXT_TRUSTITEM.  Move queue manipulation to ...
4264         (_gpgme_op_trustlist_event_cb): ... here.  New function.
4265         * gpgme.c (_gpgme_op_event_cb): Call _gpgme_op_keylist_event_cb
4266         and _gpgme_op_trustlist_event_cb when appropriate.
4267         * ops.h (_gpgme_op_keylist_event_cb): New prototype.
4268         (_gpgme_op_trustlist_event_cb): Likewise.
4269         * op-support.c (_gpgme_op_reset): Add comment why we don't use the
4270         user provided event handler directly.
4271         * gpgme.h (GpgmeRegisterIOCb): Return GpgmeError value, and TAG in
4272         a pointer argument.
4273         * wait.c (_gpgme_add_io_cb): Likewise.
4274         * wait.h (_gpgme_add_io_cb): Likewise for prototype.
4275         * rungpg.c (_gpgme_gpg_add_io_cb): Call IO_CBS->add with new
4276         argument.  Fix up error handling.
4277         * engine-gpgsm.c (_gpgme_gpgsm_add_io_cb): Call IO_CBS->add with
4278         new argument, fix up error handling.
4279
4280 2002-07-03  Werner Koch  <wk@gnupg.org>
4281
4282         * encrypt.c (status_handler_finish): New.
4283         (_gpgme_encrypt_status_handler): Moved some code out to the new
4284         function and call this function also in case we get into the
4285         status handler with an error which might happen due to a kludge in
4286         engine-gpgsm.c
4287
4288 2002-06-28  Marcus Brinkmann  <marcus@g10code.de>
4289
4290         * keylist.c (gpgme_op_keylist_ext_start): Always use our own FD
4291         table (eg use synchronous mode).
4292
4293 2002-06-28  Marcus Brinkmann  <marcus@g10code.de>
4294
4295         * ops.h (_gpgme_wait_on_condition): Remove HANG argument from
4296         prototype and change return type to GpgmeError.
4297         (_gpgme_wait_one): New prototype.
4298         * wait.c (gpgme_wait): Replace with the meat from
4299         _gpgme_wait_on_condition here, and remove the support for
4300         conditions.
4301         (_gpgme_wait_on_condition): Remove HANG argument from prototype
4302         and change return type to GpgmeError.  Replace with meat from
4303         _gpgme_wait_one and add support for conditions.
4304         (_gpgme_wait_one): Just call _gpgme_wait_on_condition without
4305         condition.
4306         * keylist.c (gpgme_op_keylist_ext_start): Always use our own FD
4307         table (eg use synchronous mode).
4308         (gpgme_op_keylist_next): Remove HANG argument from
4309         _gpgme_wait_on_condition.  Check its return value.
4310         * trustlist.c (gpgme_op_trustlist_start): Always use our own FD
4311         table (eg use synchronous mode).
4312         (gpgme_op_trustlist_next): Remove HANG argument from
4313         _gpgme_wait_on_condition.  Check its return value.
4314         
4315 2002-06-27  Marcus Brinkmann  <marcus@g10code.de>
4316
4317         * gpgme.h: Fix documentation of key attribute retrieval functions.
4318
4319 2002-06-26  Werner Koch  <wk@gnupg.org>
4320
4321         * engine-gpgsm.c (map_assuan_error): Map No_Data_Available to EOF.
4322
4323         * import.c (append_xml_impinfo): Kludge to print fingerprint
4324         instead of keyid for use with gpgsm.
4325         (import_status_handler): Set a flag to know whether any import
4326         occured.
4327         (gpgme_op_import): Reurn -1 if no certificate ewas imported.
4328
4329 2002-06-25  Werner Koch  <wk@gnupg.org>
4330
4331         * engine-gpgsm.c (_gpgme_gpgsm_set_io_cbs) [ENABLE_GPGSM]: Fixed
4332         function arguments.
4333
4334 2002-06-25  Marcus Brinkmann  <marcus@g10code.de>
4335
4336         * engine-gpgsm.c (_gpgme_gpgsm_op_export): Only export the keys
4337         listed in RECP.
4338         * export.c (gpgme_op_export): If no data was returned, return
4339         GPGME_No_Recipients.
4340
4341 2002-06-25  Marcus Brinkmann  <marcus@g10code.de>
4342
4343         * engine-gpgsm.c (_gpgme_gpgsm_op_export): Implement.
4344
4345 2002-06-21  Marcus Brinkmann  <marcus@g10code.de>
4346
4347         * engine-gpgsm.c (gpgsm_assuan_simple_command): Return ERR.
4348         (parse_status): New function.
4349         (gpgsm_status_handler): Use parse_status.
4350         (gpgsm_assuan_simple_command): Accept new arguments STATUS_FNC and
4351         STATUS_FNC_VALUE and process status messages.
4352         (gpgsm_set_recipients): Pass new arugments to gpgsm_assuan_simple_command.
4353         (gpgsm_set_fd): Likewise.
4354         (_gpgme_gpgsm_op_keylist): Likewise.
4355         (_gpgme_gpgsm_op_keylist_ext): Likewise.
4356         (_gpgme_gpgsm_op_sign): Likewise.
4357
4358 2002-06-21  Marcus Brinkmann  <marcus@g10code.de>
4359
4360         * wait.c (_gpgme_remove_io_cb): Unlock FDT->lock.
4361
4362 2002-06-20  Werner Koch  <wk@gnupg.org>
4363
4364         * rungpg.c (build_argv): Ignore GPG_AGENT_INFO if set but empty.
4365
4366         * verify.c (calc_sig_summary): Set bad policy for wrong key usage.
4367         (skip_token): New.
4368         (_gpgme_verify_status_handler): Watch out for wrong key usage.
4369         (gpgme_get_sig_string_attr): Hack to return info on the key
4370         usage.  Does now make use of the former RESERVED argument which
4371         has been renamed to WHATIDX.
4372         (gpgme_get_sig_ulong_attr): Renamed RESERVED to WHATIDX.
4373
4374 2002-06-14  Marcus Brinkmann  <marcus@g10code.de>
4375
4376         * wait.c (do_select): Return -1 on error, and 0 if nothing to run.
4377         (_gpgme_wait_one): Only set HANG to zero if do_select returned an
4378         error, or there are no more file descriptors to wait on.
4379         (_gpgme_wait_on_condition): Ignore return value from do_select for
4380         now.
4381
4382 2002-06-13  Werner Koch  <wk@gnupg.org>
4383
4384         * verify.c (gpgme_op_verify): Make sure that we never access an
4385         unitialized result structure.
4386
4387 2002-06-12  Werner Koch  <wk@gnupg.org>
4388
4389         * keylist.c (struct keylist_result_s): New.
4390         (_gpgme_release_keylist_result): Release it here 
4391         (keylist_status_handler): Handle truncated.
4392         (append_xml_keylistinfo): New.
4393         * gpgme.c (_gpgme_release_result): and use it here.
4394         * types.h: Declare the new type here.
4395         * context.h (struct gpgme_context_s): Use it here.
4396
4397 2002-06-11  Marcus Brinkmann  <marcus@g10code.de>
4398
4399         * engine-gpgsm.c (_gpgme_gpgsm_release): Close status_cb.fd.
4400         (_gpgme_gpgsm_new): Duplicate status file descriptor, so we can
4401         use our own close notification mechanism without interfering with
4402         assuan.
4403
4404 2002-06-11  Werner Koch  <wk@gnupg.org>
4405
4406         * gpgme.h: Add GPGME_ATTR_SIG_SUMMARY and the GPGME_SIGSUM_
4407         constants.
4408         * verify.c (calc_sig_summary): New.
4409         (gpgme_get_sig_ulong_attr): And use it here.
4410
4411 2002-06-10  Werner Koch  <wk@gnupg.org>
4412
4413         * rungpg.h: Add new status codes TRUNCATED and ERROR.
4414         * verify.c (is_token, copy_token): New.
4415         (_gpgme_verify_status_handler): Use copy_token, handle the new
4416         ERROR status and store the errorcode used withgpgsm and trust
4417         status codes.
4418         * gpgme.h: New attribute ERRTOK.
4419         * key.c (gpgme_key_get_string_attr): Add dummy case for it.
4420         (gpgme_get_sig_string_attr): Use it here to return the last error.
4421
4422 2002-06-10  Marcus Brinkmann  <marcus@g10code.de>
4423
4424         * engine-gpgsm.c (_gpgme_gpgsm_start): Move the code that sets the
4425         close notification for the status fd to ...
4426         (_gpgme_gpgsm_new): ... here.
4427         * wait.h: Include "sema.h".  Remove prototypes of
4428         _gpgme_remove_proc_from_wait_queue and
4429         _gpgme_register_pipe_handler.  Add prototypes of
4430         _gpgme_fd_table_init, _gpgme_fd_table_deinit, _gpgme_fd_table_put,
4431         _gpgme_add_io_cb, _gpgme_remove_io_cb, _gpgme_wait_event_cb and
4432         _gpgme_wait_one..
4433         * wait.c: Remove global variables PROC_QUEUE, PROC_QUEUE_LOCK,
4434         FD_TABLE_SIZE, FD_TABLE, FD_TABLE_LOCK.  New global variables
4435         FDT_GLOBAL, CTX_DONE_LIST, CTX_DONE_LIST_SIZE,
4436         CTX_DONE_LIST_LENGTH and CTX_DONE_LIST_LOCK.  Remove struct
4437         proc_s.  Replace struct wait_item_s.
4438         (_gpgme_fd_table_init): New function.
4439         (_gpgme_fd_table_deinit): Likewise.
4440         (_gpgme_fd_table_put): Likewise.
4441         (set_process_done): Remove function.
4442         (do_select): Take argument FDT.  Use that to decide which fds to
4443         select on.
4444         (_gpgme_remove_proc_from_wait_queue): Remove function.
4445         (_gpgme_wait_event_cb): New function.
4446         (_gpgme_wait_one): Likewise.
4447         (_gpgme_register_pipe_hanldler): Remove function.
4448         (_gpgme_add_io_cb): New function.
4449         (_gpgme_remove_io_cb): Likewise.
4450         (_gpgme_freeze_fd): Remove function.
4451         (_gpgme_thaw_fd): Remove function.
4452         * rungpg.c (struct fd_data_map_s): Add new member TAG.
4453         (struct gpg_object_s): Likewise for STATUS and COLON.  Add member
4454         IDX to CMD.  Add new member IO_CBS.
4455         (close_notify_handler): New variables POSSIBLY_DONE and NOT_DONE.
4456         For each I/O callback, check if it should be unregistered.  If all
4457         callbacks have been unregistered, trigger GPGME_EVENT_DONE.
4458         Remove member RUNNING.
4459         (_gpgme_gpg_new): Initialize new members.
4460         (_gpgme_gpg_release): Check PID not RUNNING.  Don't call
4461         _gpgme_remove_proc_from_wait_queue.  Close GPG->CMD.FD if set.
4462         (build_argv): Store away the index instead the file descriptor for
4463         CMD.
4464         (_gpgme_gpg_add_io_cb): New function.
4465         (_gpgme_gpg_spawn): Use _gpgme_gpg_add_io_cb to register IO
4466         callbacks.
4467         (gpg_status_handler): Change return type to void, remove PID
4468         argument, close filedescriptor if EOF or error occurs.
4469         (read_status): Use _gpgme_gpg_add_io_cb instead _gpgme_thaw_fd.
4470         Use IO_CBS->remove instead _gpgme_freeze_fd.
4471         (gpg_colon_line_handler): Change return type to void, remove PID
4472         argument, close filedescriptor if EOF or error occurs.
4473         (command_cb): Use IO_CBS->remove instead _gpgme_freeze_fd.
4474         (_gpgme_gpg_set_io_cbs): New function.
4475         * rungpg.h (_gpgme_gpg_set_io_cbs): Prototype for
4476         _gpgme_gpg_set_io_cbs.
4477         * gpgme.h (GpgmeIOCb): New type.
4478         (GpgmeRegisterIOCb): Likewise.
4479         (GpgmeRemoveIOCb): Likewise.
4480         (GpgmeEventIO): Likewise.
4481         (GpgmeEventIOCb): Likewise.
4482         (struct GpgmeIOCbs): New structure to hold I/O callbacks.
4483         (gpgme_set_op_io_cbs): New prototype.
4484         (gpgme_get_op_io_cbs): Likewise.
4485         * ops.h: New prototype for _gpgme_op_event_cb.  Remove prototypes
4486         for _gpgme_freeze_fd and _gpgme_thaw_fd.  Remove PID argument from
4487         _gpgme_data_inbound_handler and _gpgme_data_outbound_handler
4488         prototype.  Add prototype for _gpgme_op_reset.
4489         Add synchronous argument to _gpgme_decrypt_start prototype.
4490         * io.h: Beautification.
4491         * gpgme.c: Include "wait.h".
4492         (gpgme_new): Initialize FDT.
4493         (gpgme_set_io_cbs): New function.
4494         (gpgme_get_io_cbs): Likewise.
4495         (_gpgme_op_event_cb): Likewise.
4496         * data.c (_gpgme_data_inbound_handler): Change return type to
4497         void.  Drop PID argument.  Close FD on error and EOF.
4498         (write_mem_data): Don't close FD here ...
4499         (write_cb_data): ... or here ...
4500         (_gpgme_data_outbound_handler): ... but here.  Change return type
4501         to void.  Drop PID argument.
4502         * context.h: Include "wait.h".
4503         (struct gpgme_context_s): New members FDT and IO_CBS.
4504         * op-support.c: New file.
4505         * Makefile.am (libgpgme_la_SOURCES): Add op-support.c.
4506         * ops.h: Add prototype for _gpgme_op_reset().
4507         * decrypt.c (_gpgme_decrypt_start): New argument SYNCHRONOUS.  Use
4508         _gpgme_op_reset.
4509         (gpgme_op_decrypt_start): Add synchronous argument.
4510         (gpgme_op_decrypt): Likewise.  Use _gpgme_wait_one instead
4511         gpgme_wait.
4512         * delete.c (gpgme_op_delete_start): Rename to ...
4513         (_gpgme_op_delete_start): ... this.  New argument SYNCHRONOUS.
4514         Use _gpgme_op_reset.  Make function static.
4515         (gpgme_op_delete_start): Just a wrapper around
4516         _gpgme_op_delete_start now.
4517         (gpgme_op_delete): Add synchronous argument.  Use _gpgme_wait_one
4518         instead gpgme_wait.
4519         * encrypt.c: Include "wait.h".
4520         (ggpgme_op_encrypt_start): Rename to ...
4521         (_gpgme_op_encrypt_start): ... this.  New argument SYNCHRONOUS.
4522         Use _gpgme_op_reset.  Make function static.
4523         (gpgme_op_encrypt_start): Just a wrapper around
4524         _gpgme_op_encrypt_start now.
4525         (gpgme_op_encrypt): Add synchronous argument.  Use _gpgme_wait_one
4526         instead gpgme_wait.
4527         * encrypt_sign.c (gpgme_op_encrypt_sign_start): Rename to ...
4528         (_gpgme_op_encrypt_sign_start): ... this.  New argument
4529         SYNCHRONOUS.  Use _gpgme_op_reset.  Make function static.
4530         (gpgme_op_encrypt_sign_start): Just a wrapper around
4531         _gpgme_op_encrypt_sign_start now.
4532         (gpgme_op_encrypt_sign): Add synchronous argument.  Use
4533         _gpgme_wait_one instead gpgme_wait.
4534         * export.c (gpgme_op_export_start): Rename to ...
4535         (_gpgme_op_export_start): ... this.  New argument SYNCHRONOUS.
4536         Use _gpgme_op_reset.  Make function static.
4537         (gpgme_op_export_start): Just a wrapper around
4538         _gpgme_op_export_start now.
4539         (gpgme_op_export): Add synchronous argument.  Use _gpgme_wait_one
4540         instead gpgme_wait.
4541         * genkey.c (gpgme_op_genkey_start): Rename to ...
4542         (_gpgme_op_genkey_start): ... this.  New argument SYNCHRONOUS.
4543         Use _gpgme_op_reset.  Make function static.
4544         (gpgme_op_genkey_start): Just a wrapper around
4545         _gpgme_op_genkey_start now.
4546         (gpgme_op_genkey): Add synchronous argument.  Use _gpgme_wait_one
4547         instead gpgme_wait.
4548         * import.c (gpgme_op_import_start): Rename to ...
4549         (_gpgme_op_import_start): ... this.  New argument SYNCHRONOUS.
4550         Use _gpgme_op_reset.  Make function static.
4551         (gpgme_op_import_start): Just a wrapper around
4552         _gpgme_op_import_start now.
4553         (gpgme_op_import): Add synchronous argument.  Use _gpgme_wait_one
4554         instead gpgme_wait.
4555         * keylist.c (gpgme_op_keylist_start): Use _gpgme_op_reset.
4556         (gpgme_op_keylist_ext_start): Likewise.
4557         * sign.c (gpgme_op_sign_start): Rename to ...
4558         (_gpgme_op_sign_start): ... this.  New argument SYNCHRONOUS.  Use
4559         _gpgme_op_reset.  Make function static.
4560         (gpgme_op_sign_start): Just a wrapper around _gpgme_op_sign_start
4561         now.
4562         (gpgme_op_sign): Add synchronous argument.  Use _gpgme_wait_one
4563         instead gpgme_wait.
4564         * trustlist.c (gpgme_op_trustlist_start): Use _gpgme_op_reset.
4565         * verify.c (gpgme_op_verify_start): Rename to ...
4566         (_gpgme_op_verify_start): ... this.  New argument SYNCHRONOUS.
4567         Use _gpgme_op_reset.  Make function static.
4568         (gpgme_op_verify_start): Just a wrapper around
4569         _gpgme_op_verify_start now.
4570         (gpgme_op_verify): Add synchronous argument.  Use _gpgme_wait_one
4571         instead gpgme_wait.
4572         * engine-gpgsm.c (iocb_data_t): New type.
4573         (struct gpgsm_object_s): New member status_cb.  Replace input_fd
4574         and input_data with input_cb.  Replace output_fd and output_data
4575         with output_cb.  Replace message_fd and message_data with
4576         message_cb.  New member io_cbs.
4577         (_gpgme_gpgsm_new): Initialize all new members (and drop the old
4578         ones).
4579         (close_notify_handler): New variable POSSIBLY_DONE.  For each I/O
4580         callback, check if it should be unregistered.  If all callbacks
4581         have been unregistered, trigger GPGME_EVENT_DONE.
4582         (_gpgme_gpgsm_release): Remove variable PID.  Use new variable
4583         names to close the file descriptors.
4584         (_gpgme_gpgsm_op_decrypt): Use new variable names,
4585         (_gpgme_gpgsm_op_encrypt): Likewise.
4586         (_gpgme_gpgsm_op_genkey): Likewise.
4587         (_gpgme_gpgsm_op_import): Likewise.
4588         (_gpgme_gpgsm_op_keylist): Likewise.
4589         (_gpgme_gpgsm_op_keylist_ext): Likewise.
4590         (_gpgme_gpgsm_op_sign): Likewise.
4591         (_gpgme_gpgsm_op_verify): Likewise.
4592         (gpgsm_status_handler): Drop argument PID.  Change return type to
4593         void.  Close status pipe before returning because of EOF or error.
4594         (_gpgme_gpgsm_add_io_cb): New function.
4595         (_gpgme_gpgsm_start): Use _gpgme_gpgsm_add_io_cb to register
4596         callback function.
4597         (_gpgme_gpgsm_set_io_cbs): New function.
4598         * engine-gpgsm.h: New prototype for _gpgme_gpgsm_set_io_cbs.
4599         * engine.c (_gpgme_engine_set_io_cbs): New function.
4600         * engine.h: New prototype for _gpgme_engine_set_io_cbs.
4601
4602 2002-06-04  Marcus Brinkmann  <marcus@g10code.de>
4603
4604         * Makefile.am (libgpgme_la_SOURCES): Remove mutex.h.
4605
4606 2002-06-03  Marcus Brinkmann  <marcus@g10code.de>
4607
4608         * key.c: Include <ctype.h>.
4609         (_gpgme_key_append_name): Skip one more char when
4610         processing escaped char.  Submitted by Marc Mutz <mutz@kde.org>.
4611         Handle hexadecimal encodings.  Also reported by Marc.  Thanks!
4612
4613 2002-06-02  Marcus Brinkmann  <marcus@g10code.de>
4614
4615         * ath.h: Enable the _gpgme_ prefix.  Fix all those prefix macros.
4616         * posix-sema.c: Use that prefix here.
4617         * posix-io.c: Include "ath.h".
4618         (_gpgme_io_read): Use _gpgme_ath_read instead read.
4619         (_gpgme_io_write): Use _gpgme_ath_write instead write.
4620         (_gpgme_io_waitpid): Use _gpgme_ath_waitpid instead waitpid.
4621         (_gpgme_io_select): Use _gpgme_ath_select instead select.
4622
4623 2002-06-02  Marcus Brinkmann  <marcus@g10code.de>
4624
4625         * Makefile.am (ath_components): New variable.
4626         (ath_components_pthread): Likewise.
4627         (ath_components_pth): Likewise.
4628         (system_components): Add ath_componentes.
4629
4630         * ath.h: New file.
4631         * ath.c: Likewise.
4632         * ath-pthread.c: Likewise.
4633         * ath-pth.c: Likewise.
4634         * posix-sema.c (_gpgme_sema_cs_enter): Rework to use the ATH
4635         interface.
4636         * mutex.h: Remove file.
4637
4638 2002-05-30  Werner Koch  <wk@gnupg.org>
4639
4640         * key.c (gpgme_key_get_string_attr): Return NULL when asking for
4641         an issuer with IDX > 0.  We don't support altIssuerNames for now.
4642
4643 2002-05-22  Werner Koch  <wk@gnupg.org>
4644
4645         * engine-gpgsm.c (_gpgme_gpgsm_op_keylist_ext): Aehmm, added
4646         missing variable definition.  Oohh - Marcus was faster.
4647
4648 2002-05-22  Marcus Brinkmann  <marcus@gnu.org>
4649
4650         * engine-gpgsm.c (_gpgme_gpgsm_op_keylist_ext): Fix last change.
4651
4652 2002-05-21  Werner Koch  <wk@gnupg.org>
4653
4654         * engine-gpgsm.c (_gpgme_gpgsm_op_keylist)
4655         (_gpgme_gpgsm_op_keylist_ext):  Pass the keylist mode to gpgsm.
4656
4657 2002-05-10  Werner Koch  <wk@gnupg.org>
4658
4659         * key.h (gpgme_key_s): Add OTRUST.
4660         * keylist.c (set_ownertrust): New.
4661         (keylist_colon_handler): Get the ownertrust value
4662         * key.c (gpgme_key_get_string_attr,gpgme_key_get_ulong_attr):
4663         Return that value.
4664
4665 2002-05-08  Marcus Brinkmann  <marcus@g10code.de>
4666
4667         * w32-util.c: New static variable GET_PATH_LOCK.
4668         (_gpgme_get_gpg_path): Remove superfluous NULL initializer.
4669         Take lock while determining path.
4670         (_gpgme_get_gpgsm_path): Likewise.
4671         * version.c (do_subsystem_inits): Set DONE to 1 after
4672         initialization.
4673         (gpgme_get_engine_info): New variable ENGINE_INFO_LOCK.  Take lock
4674         while determining engine info.
4675         * rungpg.c (_gpgme_gpg_get_version): New variable
4676         GPG_VERSION_LOCK.  Take the lock while determining the program
4677         version.
4678         * posix-io.c: Include "sema.h".
4679         (_gpgme_io_spawn): New variable FIXED_SIGNALS_LOCK.  Take the lock
4680         while fixing the signals.
4681         (_gpgme_io_select): Make READFDS and WRITEFDS non-static.
4682         * key.c: Include "sema.h".  New globals KEY_CACHE_LOCK and
4683         KEY_REF_LOCK.
4684         (capabilities_to_string): Make STRINGS very const.
4685         (_gpgme_key_cache_add): Lock the key cache.
4686         (_gpgme_key_cache_get): Likewise.
4687         (gpgme_key_ref, gpgme_key_release): Lock the key_ref_lock.
4688         * import.c (append_xml_impinfo): Make IMPORTED_FIELDS and
4689         IMPORT_RES_FIELDS very const.  Make FIELD and FIELD_NAME a litle
4690         const.
4691         * engine.c (_gpgme_engine_get_info): New variable
4692         ENGINE_INFO_LOCK.  Take lock while determining engine info.
4693         * engine-gpgsm.c: Include "sema.h".
4694         (_gpgme_gpgsm_get_version): New variable GPGSM_VERSION_LOCK.  Take
4695         lock while getting program version.
4696
4697 2002-05-08  Marcus Brinkmann  <marcus@g10code.de>
4698
4699         * debug.h: New file.
4700         * Makefile.am (libgpgme_la_SOURCES): Add debug.h.
4701         * util.h: Removed all prototypes and declarations related to
4702         debugging.  Include "debug.h".
4703
4704         * debug.c (debug_level): Comment variable and remove superfluous
4705         zero initializer.
4706         (errfp): Likewise.
4707         (_gpgme_debug_enabled): Function removed.
4708         (struct debug_control_s): Definition removed.
4709         (_gpgme_debug_level): Function removed.
4710         (_gpgme_debug_begin): Rewritten to use vasprintf.  Accept a
4711         pritnf-style format specification and a variable number of
4712         arguments.
4713         (_gpgme_debug_add): Rewritten using vasprintf.  Expect that format
4714         starts out with "%s" for simplicity.
4715         (_gpgme_debug_end): Rewritten using vasprintf.  Do not accept a
4716         TEXT argument anymore.
4717
4718         * posix-io.c (_gpgme_io_select): Use new level argument for
4719         DEBUG_BEGIN instead explicit if construct.
4720
4721         * debug.c (debug_init): Remove superfluous zero initializer,
4722         remove volatile flag of INITIALIZED.  Do not use the
4723         double-checked locking algorithm, it is fundamentally flawed and
4724         will empty your fridge (on a more serious note, despite the
4725         volatile flag it doesn't give you the guarantee you would expect,
4726         for example on a DEC Alpha or an SMP machine.  The volatile only
4727         serializes accesses to the volatile variable, but not to the other
4728         variables).
4729
4730 2002-05-03  Werner Koch  <wk@gnupg.org>
4731
4732         * engine-gpgsm.c (_gpgme_gpgsm_new): Redirect any gpgsm error
4733         output to /dev/null.
4734
4735         * verify.c (gpgme_get_sig_key): Set the protocol of the listctx.
4736         * gpgme.c (gpgme_get_protocol): New.
4737
4738         * data.c (gpgme_data_write): Changed type of BUFFER to void*.
4739         (gpgme_data_read): Ditto.
4740
4741         * verify.c (_gpgme_verify_status_handler): Handle TRUST_* status
4742         lines so that a claim can be made without looking up the key.
4743         (gpgme_get_sig_string_attr): New. 
4744         (gpgme_get_sig_ulong_attr): New.
4745
4746         * gpgme.h (GpgmeAttr): Added GPGME_ATTR_SIG_STATUS.
4747
4748         * rungpg.h: Add new status codes from gpg 1.0.7 and formatted the
4749         list to align with the status.h file from gnupg.
4750
4751         * gpgme.h (GpgmeSigStat): Add _GOOD_EXP and _GOOD_EXPKEY.
4752         * verify.c (_gpgme_verify_status_handler, finish_sig): Handle
4753         these new status codes.  Store the expiration time 
4754
4755 2002-04-27  Werner Koch  <wk@gnupg.org>
4756
4757         * gpgme.h (GpgmeData_Encoding): New.
4758         * data.c (gpgme_data_get_encoding,gpgme_data_set_encoding): New.
4759         * engine-gpgsm.c (map_input_enc): New. Use it in all local
4760         functions where the INPUT command gets send.
4761
4762 2002-04-27  Marcus Brinkmann  <marcus@g10code.de>
4763
4764         * engine-gpgsm.c (_gpgme_gpgsm_op_verify): Close the output
4765         descriptor only when we don't need it anymore.  Close the message
4766         descriptor if we don't need it.
4767
4768 2002-04-26  Werner Koch  <wk@gnupg.org>
4769
4770         * Makefile.am (libgpgme_la_LIBADD): Use libtool libraries.
4771
4772 2002-04-25  Marcus Brinkmann  <marcus@g10code.de>
4773
4774         * rungpg.c (_gpgme_gpg_release): Call gpgme_data_release on
4775         GPG->cmd.cb_data, not xfree.
4776
4777 2002-04-25  Marcus Brinkmann  <marcus@g10code.de>
4778
4779         * engine-gpgsm.c (_gpgme_gpgsm_new): Set the display, ttyname,
4780         ttytype, lc_ctype and lc_messages options in the server.
4781
4782 2002-04-24  Marcus Brinkmann  <marcus@g10code.de>
4783
4784         * engine-gpgsm.c (map_assuan_error): Add new error codes.
4785
4786 2002-04-23  Werner Koch  <wk@gnupg.org>
4787
4788         * key.c (gpgme_key_get_ulong_attr): Swapped use of can_encrypt and
4789         can_certify to return the requested values.
4790
4791 2002-04-23  Marcus Brinkmann  <marcus@g10code.de>
4792
4793         * gpgme.c (gpgme_get_progress_cb): Allow either return parameter
4794         to be NULL.
4795         (gpgme_get_passphrase_cb): Likewise.
4796
4797 2002-04-22  Marcus Brinkmann  <marcus@g10code.de>
4798
4799         * gpgme.c (gpgme_get_passphrase_cb): New function.
4800         (gpgme_get_progress_cb): New function.
4801         * gpgme.h: Add new prototypes for gpgme_get_passphrase_cb and
4802         gpgme_get_progress_cb.
4803
4804 2002-03-28  Werner Koch  <wk@gnupg.org>
4805
4806         * gpgme.h (GpgmeAttr): Add values for issuer and chaining.
4807         * key.h (gpgme_key_s): Add issuer and chaining elements for X509.
4808         * keylist.c (keylist_colon_handler): Store them.
4809         * key.c (gpgme_key_release): Free them.
4810         (gpgme_key_get_as_xml,gpgme_key_get_string_attr): Print them.
4811
4812 2002-03-26  Werner Koch  <wk@gnupg.org>
4813
4814         * Makefile.am (libgpgme_la_SOURCES): Add mutex.h
4815
4816 2002-03-21  Werner Koch  <wk@gnupg.org>
4817
4818         * util.h [!HAVE_FOPENCOOKIE]: Make sure off_t and ssize_t are
4819         defined.
4820
4821 2002-03-18  Marcus Brinkmann  <marcus@g10code.de>
4822
4823         * Makefile.am (system_components): New variable, set depending on
4824         HAVE_DOSISH_SYSTEM.
4825         (libgpgme_la_SOURCES): Use system_components.  Remove `syshdr.h'.
4826         * syshdr.h: File removed.
4827
4828         * posix-io.c: Remove !HAVE_DOSISH_SYSTEM safeguard.  Clean up source.
4829         * posix-sema.c: Likewise.
4830         * posix-util.c: Likewise.
4831
4832         * w32-io.c: Remove HAVE_DOSISH_SYSTEM safeguard.
4833         * w32-sema.c: Likewise.
4834         * w32-util.c: Likewise.
4835
4836         * posix-io.c: Include `unistd.h', do not include `syshdr.h'.
4837         * posix-sema.c: Likewise.
4838         * w32-io.c: Include `io.h', do not include `syshdr.h'
4839         * w32-sema.c: Likewise.
4840         * w32-util.c: Likewise.
4841         * data.c: Do not include `syshdr.h'.
4842         * wait.c: Likewise.
4843         * wait.h: Code cleanup.
4844
4845         * mutex.h: New file.
4846         * posix-sema.c: Implement.
4847
4848 2002-03-08  Werner Koch  <wk@gnupg.org>
4849
4850         * util.h [!HAVE_FOPENCOOKIE]: Fixed type.  Thanks to Frank Heckenbach.
4851
4852 2002-03-07  Werner Koch  <wk@gnupg.org>
4853
4854         * gpgme.h (gpgme_op_keylist_ext_start): Add prototype.
4855
4856 2002-03-06  Marcus Brinkmann  <marcus@g10code.de>
4857
4858         * encrypt.c (_gpgme_encrypt_sym_status_handler): New function.
4859         (gpgme_op_encrypt_start): New variable SYMMETRIC, set it if RECP
4860         is null, and if it is set, use _gpgme_encrypt_sym_status_handler
4861         as status handler and run _gpgme_passphrase_start.
4862         * rungpg.c (_gpgme_gpg_op_encrypt): If RECP is zero, do symmetric
4863         encryption.
4864         * engine-gpgsm.c (_gpgme_gpgsm_op_encrypt): If RECP is zero,
4865         return error value.
4866
4867         * rungpg.c (_gpgme_gpg_op_verify): Add "--" argument.
4868
4869 2002-03-03  Marcus Brinkmann  <marcus@g10code.de>
4870
4871         * passphrase.c (_gpgme_passphrase_status_handler): Also set the
4872         error No_Passphrase if only a bad passphrase was provided.
4873
4874 2002-03-03  Marcus Brinkmann  <marcus@g10code.de>
4875
4876         * rungpg.c (_gpgme_gpg_op_verify): If TEXT is of mode
4877         GPGME_DATA_MODE_IN, construct a command line that stores the
4878         plaintext in TEXT.
4879         * verify.c (gpgme_op_verify_start): Accept TEXT being
4880         uninitialized, and in this case interpret SIG as a normal or
4881         cleartext signature and TEXT as a return data object.
4882         * engine-gpgsm.c (_gpgme_gpgsm_op_verify): Likewise.
4883
4884 2002-03-03  Marcus Brinkmann  <marcus@g10code.de>
4885
4886         * engine-gpgsm.c (_gpgme_gpgsm_op_keylist_ext) [!ENABLE_GPGSM]:
4887         Add stub function.
4888
4889 2002-02-28  Werner Koch  <wk@gnupg.org>
4890
4891         * key.h (subkey_s): New member expires_at.
4892         * keylist.c (keylist_colon_handler): Set it here
4893         * key.c (gpgme_key_get_as_xml,gpgme_key_get_ulong_attr): Return it.
4894
4895 2002-02-27  Marcus Brinkmann  <marcus@g10code.de>
4896
4897         * rungpg.h (_gpgme_gpg_op_keylist_ext): New prototype.
4898         * rungpg.c (_gpgme_gpg_op_keylist_ext): New function.
4899         * engine-gpgsm.h (_gpgme_gpgsm_op_keylist_ext): New prototype.
4900         * engine-gpgsm.c (_gpgme_gpgsm_op_keylist_ext): New function.
4901         * engine.h (_gpgme_engine_op_keylist_ext): New prototype.
4902         * engine.c (_gpgme_engine_op_keylist_ext): New function.
4903         * keylist.c (gpgme_op_keylist_ext_start): New function.
4904
4905 2002-02-27  Marcus Brinkmann  <marcus@g10code.de>
4906
4907         * gpgme.h: Add new error code GPGME_Invalid_Recipient.
4908         * encrypt.c (struct encrypt_result_s): New member invalid_recipients,
4909         rename no_recipients to no_valid_recipients.
4910         (_gpgme_encrypt_status_handler): Include error for invalid
4911         recipients.
4912         * engine-gpgsm.c (gpgsm_set_recipients): Change type of first
4913         argument to GpgsmObject.  Use that to report back the status about
4914         the recipients.
4915
4916 2002-02-26  Marcus Brinkmann  <marcus@g10code.de>
4917
4918         * verify.c (_gpgme_verify_status_handler): Fix the last change.
4919
4920 2002-02-25  Marcus Brinkmann  <marcus@g10code.de>
4921
4922         * engine.c (_gpgme_engine_op_encrypt_sign): New function.
4923         * engine.h (_gpgme_engine_op_encrypt_sign): New prototype.
4924         * rungpg.c (_gpgme_append_gpg_args_from_signers): New function.
4925         (_gpgme_gpg_op_sign): Use that new function.
4926         (_gpgme_gpg_op_encrypt_sign): New function.
4927         * rungpg.h (_gpgme_gpg_op_encrypt_sign): New prototype. 
4928         * gpgme.h (gpgme_op_encrypt_sign_start): New prototype.
4929         (gpgme_op_encrypt_sign): Likewise.
4930         * Makefile.am (libgpgme_la_SOURCES): Add encrypt-sign.c.
4931         * ops.h (_gpgme_encrypt_status_handler): Add prototype.
4932         (_gpgme_sign_status_handler): Add prototype.
4933         * sign.c (sign_status_handler): Rename to ...
4934         (_gpgme_sign_status_handler): ... this and make non-static.
4935         * encrypt.c (encrypt_status_handler): Rename to ...
4936         (_gpgme_encrypt_status_handler): ... this and make non-static.
4937         * encrypt.c (gpgme_op_encrypt_start): Use new status handler name.
4938         * sign.c (gpgme_op_sign_start): Likewise.
4939         
4940 2002-02-25  Marcus Brinkmann  <marcus@g10code.de>
4941
4942         * verify.c (_gpgme_verify_status_handler): Parse the args line to
4943         see if the problem is due to a missing key, and report that back
4944         to the user.
4945
4946 2002-02-25  Marcus Brinkmann  <marcus@g10code.de>
4947
4948         * context.h (struct gpgme_context_s): New member include_certs.
4949         * gpgme.h (gpgme_set_include_certs): Add prototype.
4950         (gpgme_get_include_certs): Likewise.
4951         * gpgme.c (gpgme_set_include_certs): New function.
4952         (gpgme_get_include_certs): Likewise.
4953         (gpgme_new): Set include_certs to 1 (the default).
4954         * engine.c (_gpgme_engine_op_sign): Accept new argument include_certs,
4955         and pass it to _gpgme_gpgsm_op_sign.
4956         * engine.h (_gpgme_engine_op_sign): Likewise for prototype.
4957         * engine-gpgsm.c (_gpgme_gpgsm_op_sign): Accept new argument
4958         include_certs and handle it.
4959         * engine-gpgsm.h (_gpgme_gpgsm_start): Add new argument include_certs.
4960         * sign.c (gpgme_op_sign_start): Add new argument to
4961         _gpgme_engine_op_sign call.
4962
4963 2002-02-14  Werner Koch  <wk@gnupg.org>
4964
4965         * keylist.c (gpgme_op_keylist_start): Do not use a verbose listing.
4966
4967 2002-02-13  Werner Koch  <wk@gnupg.org>
4968
4969         * vasprintf.c, fopencookie.c: Add replacement functions.
4970         * util.h: Add prototypes for them.
4971
4972 2002-02-09  Marcus Brinkmann  <marcus@g10code.de>
4973
4974         * engine-gpgsm.c (gpgsm_assuan_simple_command): Return 0 if we
4975         reach the end of the function.
4976
4977 2002-02-09  Marcus Brinkmann  <marcus@g10code.de>
4978
4979         * genkey.c (gpgme_op_genkey_start): Fix logic in validity check.
4980         (gpgme_op_genkey_start): Skip newlines after opening tag.
4981
4982         * engine-gpgsm.c (_gpgme_gpgsm_start): Remove cruft.
4983
4984 2002-02-08  Marcus Brinkmann  <marcus@g10code.de>
4985
4986         * genkey.c (gpgme_op_genkey_start): Allow PUBKEY and SECKEY to be
4987         set, and pass them down to the crypto engine.
4988         * engine-gpgsm.h (_gpgme_gpgsm_start): New arguments PUBKEY and SECKEY.
4989         * engine.h: Likewise.
4990         * rungpg.h (_gpgme_gpg_spawn): Likewise.
4991         * engine.c (_gpgme_engine_op_genkey): Likewise.  Use those
4992         arguments.
4993         * rungpg.c (_gpgme_gpg_op_genkey): Likewise.  Complain if those
4994         arguments are set.
4995         * engine-gpgsm.c (_gpgme_gpgsm_op_genkey): Likewise.  Implement
4996         function.
4997
4998         * engine-gpgsm.c (_gpgme_gpgsm_op_keylist): Beautify comment.
4999
5000 2002-02-06  Marcus Brinkmann  <marcus@g10code.de>
5001
5002         * rungpg.c (_gpgme_gpg_op_keylist): Remove handling of keylist
5003         mode (for now).
5004
5005 2002-02-06  Marcus Brinkmann  <marcus@g10code.de>
5006
5007         * wait.c (gpgme_wait): Add new argument STATUS, in which the
5008         status of the returned context is returned.
5009         (_gpgme_wait_on_condition): Rework the function a bit, to make it
5010         aware of cancelled processes, and to allow to use gpgme_wait with
5011         CTX being NULL (as documented in the source).
5012         (struct proc_s): New member REPORTED.
5013         * gpgme.h: Fix prototype.
5014         * verify.c (gpgme_op_verify): Fix use of gpgme_wait.
5015         * sign.c (gpgme_op_sign): Likewise.
5016         * import.c (gpgme_op_import): Likewise.
5017         * genkey.c (gpgme_op_genkey): Likewise.
5018         * export.c (gpgme_op_export): Likewise.
5019         * encrypt.c (gpgme_op_encrypt): Likewise.
5020         * delete.c (gpgme_op_delete): Likewise.
5021         * decrypt-verify.c (gpgme_op_decrypt_verify): Likewise.
5022
5023 2002-02-06  Marcus Brinkmann  <marcus@g10code.de>
5024
5025         * gpgme.c (gpgme_set_keylist_mode): Possibly return an error
5026         value.
5027         (gpgme_get_keylist_mode): New function.
5028         (gpgme_new): Set the default for keylist_mode member of CTX.
5029
5030         * gpgme.h (gpgme_set_keylist_mode): Fix prototype.
5031         (gpgme_get_keylist_mode): New prototype.
5032         (GPGME_KEYLIST_MODE_LOCAL): New macro.
5033         (GPGME_KEYLIST_MODE_EXTERN): Likewise..
5034
5035 2002-02-02  Marcus Brinkmann  <marcus@g10code.de>
5036
5037         This patch has gotten a bit large... mmh.  The main thing that
5038         happens here is that error values are now not determined in the
5039         operation function after gpgme_wait completed, but in the status
5040         handler when EOF is received.  It should always be the case that
5041         either an error is flagged or EOF is received, so that after a
5042         gpgme_wait you should never have the situation that no error is
5043         flagged and EOF is not received.  One problem is that the engine
5044         status handlers don't have access to the context, a horrible
5045         kludge works around this for now.  All errors that happen during a
5046         pending operation should be catched and reported in ctx->error,
5047         including out-of-core and cancellation.  This rounds up neatly a
5048         couple of loose ends, and makes it possible to pass up any errors
5049         in the communication with the backend as well.  As a bonus, there
5050         will be a function to access gpgme->wait, so that the operations
5051         can truly be implemented with their _start function.
5052
5053         * engine-gpgsm.c (gpgsm_status_handler): Horrible kludge to report
5054         error back to the context.
5055         * rungpg.c (gpg_status_handler): Same horrible kludge applied here.
5056
5057         * engine-gpgsm.c (gpgsm_assuan_simple_command): Add error checking.
5058
5059         * wait.c (_gpgme_wait_on_condition): If canceled, set CTX->error
5060         to a value indication that.
5061
5062         * verify.c (add_notation): Set error, not out_of_core.
5063         (finish_sig): Likewise.
5064         (gpgme_op_verify_start): Don't clear out_of_core.
5065         (_gpgme_verify_status_handler): At EOF, clean up the notation data.
5066         (gpgme_op_verify): And don't do it here.
5067
5068         * trustlist.c (trustlist_status_handler): Check error, not out_of_core.
5069         (gpgme_op_trustlist_start): Don't clear out_of_core.
5070         (gpgme_op_trustlist_next): Check error, not out_of_core.
5071         (gpgme_op_trustlist_end): Likewise.
5072
5073         * ops.h (test_and_allocate_result): New macro.
5074         (_gpgme_passphrase_result): Remove prototype.
5075         * delete.c (gpgme_op_delete): Return error from context.
5076         (delete_status_handler): Use macro test_and_allocate_result.
5077         Perform error checking at EOF.
5078         (gpgme_op_delete_start): Release result.
5079         * passphrase.c (_gpgme_passphrase_status_handler): Use macro
5080         test_and_allocate_result, and perform error checking here.
5081         (_gpgme_passphrase_result): Function removed.
5082         * sign.c (gpgme_op_sign_start): Do not set out_of_core to zero.
5083         (gpgme_op_sign): Just return the error value from the context.
5084         (sign_status_handler): Only progress if no error is set yet.  If
5085         we process an EOF, set the resulting error value (if any).
5086         * decrypt.c (_gpgme_decrypt_result): Function removed.
5087         (create_result_struct): Function removed.
5088         (_gpgme_decrypt_status_handler): Use macro test_and_allocate_result,
5089         caclulate error on EOF, do not progress with errors.
5090         (_gpgme_decrypt_start): Do not set out_of_core to zero.
5091         (gpgme_op_decrypt): Just return the error value from the context.
5092         * encrypt.c (encrypt_status_handler): Perform the error checking
5093         here.
5094         (gpgme_op_encrypt_start): Do not clear out_of_core.
5095         * export.c (export_status_handler): Return if error is set in context.
5096         (gpgme_op_export_start): Release result.
5097         (gpgme_op_export): Return error from context.
5098         * decrypt-verify.c (gpgme_op_decrypt_verify): Return the error in
5099         the context.
5100         * genkey.c (genkey_status_handler): Use macro
5101         test_and_allocate_result.  Perform error checking at EOF.
5102         (gpgme_op_genkey): Just return the error from context.
5103         * import.c (gpgme_op_import): Return the error from context.
5104         (import_status_handler): Use macro test_and_allocate_result.
5105         * keylist.c (gpgme_op_keylist_start): Do not clear out_of_core.
5106         (gpgme_op_keylist_next): Return error of context.
5107         (keylist_colon_handler): Set error instead out_of_code.
5108         (finish_key): Likewise.
5109
5110         * context.h: Remove member out_of_core, add member error.
5111         * gpgme.c (_gpgme_release_result): Clear error flag.
5112
5113         * engine.h (_gpgme_engine_get_error): New prototype.
5114         * engine.c (_gpgme_engine_get_error): New function.
5115         * engine-gpgsm.c (_gpgme_gpgsm_get_error): New function.
5116
5117         * engine-gpgsm.c (map_assuan_error): New function.
5118         (gpgsm_assuan_simple_command): Change return type to GpgmeError,
5119         use the new function to map error values.
5120         (gpgsm_set_fd): Change return type tp GpgmeError.
5121         (_gpgme_gpgsm_op_decrypt): Change type of ERR to GpgmeError.
5122         (gpgsm_set_recipients): Likewise.  Change type of return value
5123         equivalently.  Adjust error values.
5124         (_gpgme_gpgsm_op_import): Likewise.
5125         (_gpgme_gpgsm_op_sign): Likewise.
5126         (struct gpgsm_object_s): New member error.
5127         (gpgsm_status_handler): Set error if error occurs.  Determine
5128         error number from ERR line received.  If assuan_read_line fails,
5129         terminate the connection.
5130
5131 2002-02-01  Marcus Brinkmann  <marcus@g10code.de>
5132
5133         * Makefile.am (MOSTLYCLEANFILES): New variable.
5134
5135 2002-02-01  Marcus Brinkmann  <marcus@g10code.de>
5136
5137         * engine-gpgsm.c (gpgsm_status_handler): At error, terminate the
5138         connection to the server.
5139
5140 2002-01-31  Marcus Brinkmann  <marcus@g10code.de>
5141
5142         * rungpg.h: Add STATUS_KEY_CREATED.
5143
5144         * progress.c: New file.
5145         * Makefile.am (libgpgme_la_SOURCES): Add progress.c.
5146
5147         * genkey.c (genkey_status_handler): Use
5148         _gpgme_progress_status_handler.  Add check for status.
5149         (struct genkey_result_s): New structure.
5150         (_gpgme_release_genkey_result): New function.
5151         (gpgme_op_genkey): Check for error.
5152         * gpgme.c (_gpgme_release_result): Call
5153         _gpgme_release_genkey_result.
5154         * ops.h (_gpgme_release_genkey_result): Add prototype.
5155         * types.h (GenKeyResult): New type.
5156         * context.h (gpgme_context_s): Add GenKeyResult to member result.
5157
5158 2002-01-30  Marcus Brinkmann  <marcus@g10code.de>
5159
5160         * gpgme.c (_gpgme_release_result): Call
5161         _gpgme_release_delete_result.
5162         * ops.h (_gpgme_release_delete_result): Add prototype.
5163         * types.h (DeleteResult): New type.
5164         * context.h (gpgme_context_s): Add DeleteResult to member result.
5165
5166         * delete.c (enum delete_problem): New type.
5167         (struct delete_result_s): New structure.
5168         (_gpgme_release_delete_result): New function.
5169         (delete_status_handler): Implement more status codes.
5170         (gpgme_op_delete): Return error on failure.
5171
5172         * import.c (MAX_IMPORTED_FIELDS): Bump up to 14.
5173
5174 2002-01-30  Marcus Brinkmann  <marcus@g10code.de>
5175
5176         * import.c (struct import_result_s): New structure.
5177         (_gpgme_release_import_result): New function.
5178         (append_xml_impinfo): Likewise.
5179         (import_status_handler): Implement.
5180         * gpgme.c (_gpgme_release_result): Add call to
5181         _gpgme_release_import_result.
5182         * ops.h (_gpgme_release_import_result): Add prototype.
5183         * types.h (ImportResult): New type.
5184         * context.h (gpgme_context_s): Add ImportResult to member result.
5185
5186         * encrypt.c (gpgme_op_encrypt): Code clean up.
5187
5188 2002-01-30  Marcus Brinkmann  <marcus@g10code.de>
5189
5190         * gpgme.h: Add lots of comment and fix the formatting.  Add
5191         gpgme_trustlist_end prototype.
5192
5193 2002-01-29  Marcus Brinkmann  <marcus@g10code.de>
5194
5195         * gpgme.h: Add new type GpgmeIdleFunc.  Change type of
5196         gpgme_register_idle to return and accept this type.
5197         * wait.c (gpgme_register_idle): Fix type.
5198         Save and return old value of idle_function.
5199
5200 2002-01-29  Werner Koch  <wk@gnupg.org>
5201
5202         * engine-gpgsm.c (_gpgme_gpgsm_op_keylist): Implement secret only mode.
5203
5204         * keylist.c (keylist_colon_handler): Add support for the new "crs"
5205         record type.
5206
5207 2002-01-22  Marcus Brinkmann  <marcus@g10code.de>
5208
5209         * engine-gpgsm.c (_gpgme_gpgsm_release): Call assuan_disconnect,
5210         not assuan_pipe_disconnect.
5211
5212         * Makefile.am (libgpgme_la_LIBADD): Change to link assuan and
5213         jnlib (needed by assuan) statically into libgpgme.  Linking a
5214         static library into a shared library this way is not portable.
5215
5216 2002-01-22  Marcus Brinkmann  <marcus@g10code.de>
5217
5218         * gpgme.h (GpgmePassphraseCb): Change type of R_HD from void* to
5219         void**.
5220
5221 2002-01-22  Marcus Brinkmann  <marcus@g10code.de>
5222
5223         * data.c (gpgme_data_new_from_filepart): Change type of LENGTH
5224         from off_t to size_t.
5225         * gpgme.h: Likewise.
5226
5227 2002-01-22  Marcus Brinkmann  <marcus@g10code.de>
5228
5229         * wait.c (_gpgme_wait_on_condition): If the process finished,
5230         reset the pending flag.  Also if the operation was cancelled.
5231
5232         (struct proc_s): Rename READY to DONE.
5233         (wait_item_s): Likewise.
5234         (set_process_ready): Rename to ...
5235         (set_process_done): ... this.
5236         (_gpgme_remove_proc_from_wait_queue): Call set_process_done
5237         instead set_process_ready.
5238         (_gpgme_wait_on_condition): Likewise.
5239         (do_select): Rename READY to DONE.
5240
5241         * verify.c (gpgme_op_verify): Do not set pending to zero here.
5242         * sign.c (gpgme_op_sign): Likewise.
5243         * import.c (gpgme_op_import): Likewise.
5244         * genkey.c (gpgme_op_genkey): Likewise.
5245         * export.c (gpgme_op_export): Likewise.
5246         * encrypt.c (gpgme_op_encrypt): Likewise.
5247         * delete.c (gpgme_op_delete): Likewise.
5248         * decrypt-verify.c (gpgme_op_decrypt_verify): Likewise.
5249         * decrypt.c (gpgme_op_decrypt): Likewise.
5250
5251 2002-01-22  Marcus Brinkmann  <marcus@g10code.de>
5252
5253         * export.c: Cleanup.
5254
5255 2002-01-15  Marcus Brinkmann  <marcus@g10code.de>
5256
5257         * trustlist.c: Various source clean ups.
5258         (my_isdigit): Removed.
5259         (gpgme_op_trustlist_end): New function.
5260
5261 2002-01-13  Marcus Brinkmann  <marcus@g10code.de>
5262
5263         * gpgme.c: Various source clean ups, like renaming C to CTX where
5264         appropriate.
5265         (gpgme_new): Clear R_CTX before starting the work.
5266         (my_isdigit): Removed.
5267         (my_isxdigit): Likewise.
5268
5269         * data.c: Various source clean ups.
5270         (gpgme_data_new_from_mem): Check BUFFER after clearing R_DH.
5271         (gpgme_data_new_with_read_cb): Similar for READ_CB.
5272         (gpgme_data_new_from_file): Loop over fread while EINTR.
5273         (gpgme_data_new_from_filepart): Rediddled a bit.  Allow LENGTH to
5274         be zero.  Loop over fread while EINTR.
5275
5276         (my_isdigit): Removed.
5277         (my_isxdigit): Likewise.
5278
5279 2001-12-21  Marcus Brinkmann  <marcus@g10code.de>
5280
5281         * engine-gpgsm.c (_gpgme_gpgsm_new): Replace General_Error with
5282         Pipe_Error where appropriate.
5283
5284 2001-12-19  Marcus Brinkmann  <marcus@g10code.de>
5285
5286         * engine.c: Include `string.h'.  Reported by Stéphane Corthésy.
5287
5288         * version.c (get_engine_info): Remove prototype.
5289
5290 2001-12-19  Marcus Brinkmann  <marcus@g10code.de>
5291
5292         * engine-gpgsm.c (_gpgme_gpgsm_new): New variable CHILD_FDS.
5293         Fill it with the servers fds, and pass it to assuan_pipe_connect.
5294
5295 2001-12-18  Marcus Brinkmann  <marcus@g10code.de>
5296
5297         * keylist.c (gpgme_op_keylist_end): New function.
5298         * gpgme.h (gpgme_op_keylist_end): New prototype.
5299
5300         * engine.h (gpgme_engine_check_version): Move prototype to ...
5301         * gpgme.h (gpgme_engine_check_version): ... here.
5302
5303         * genkey.c (gpgme_op_genkey_start): Remove unused variable.
5304
5305 2001-12-18  Marcus Brinkmann  <marcus@g10code.de>
5306
5307         * version.c (gpgme_get_engine_info): Reimplemented.
5308         (gpgme_check_engine): Reimplemented.
5309         (_gpgme_compare_versions): Return NULL if MY_VERSION is NULL.
5310
5311         * engine.c: Include `io.h'.
5312         (gpgme_engine_get_info): New function.
5313         * engine.h (gpgme_engine_check_version, _gpgme_engine_get_info):
5314         Add prototype.
5315
5316 2001-12-18  Marcus Brinkmann  <marcus@g10code.de>
5317
5318         * rungpg.c (struct reap_s, reap_list, reap_list_lock): Moved to ...
5319         * engine.c (struct reap_s, reap_list, reap_list_lock): ... here.
5320         Include `time.h', `sys/types.h', `assert.h', and `sema.h'.
5321
5322         * rungpg.c (_gpgme_engine_add_child_to_reap_list): New function.
5323         (do_reaping, _gpgme_gpg_housecleaning): Moved to ...
5324         * engine.c (do_reaping, _gpgme_engine_housecleaning): ... here.
5325         * rungpg.c (_gpgme_gpg_release): Replace code that is now in its
5326         own function by call to _gpgme_engine_add_child_to_reap_list().
5327
5328         * wait.c: Include `engine.h'.
5329         (run_idle): Call _gpgme_engine_housecleaning(), not
5330         _gpgme_gpg_housecleaning().
5331         
5332 2001-12-18  Marcus Brinkmann  <marcus@g10code.de>
5333
5334         * key.c (_gpgme_key_append_name): Append, not prepend, the uid.
5335         Initialize the next field of the uid structure.
5336         (gpgme_key_get_as_xml): Do not list last uid first.
5337
5338 2001-12-17  Marcus Brinkmann  <marcus@g10code.de>
5339
5340         * engine-gpgsm.c (_gpgme_gpgsm_set_colon_line_handler): New
5341         function [!ENABLE_GPGSM].
5342
5343 2001-12-14  Marcus Brinkmann  <marcus@g10code.de>
5344
5345         * engine-gpgsm.c (_gpgme_gpgsm_op_verify): Put TEXT into
5346         message_data, not SIG.
5347         (_gpgme_gpgsm_op_sign): Use `--detached', not `--detach'.
5348
5349         * sign.c (sign_status_handler): Call
5350         _gpgme_passphrase_status_handler early.
5351
5352 2001-12-14  Marcus Brinkmann  <marcus@g10code.de>
5353
5354         * engine-gpgsm.c: Revert last change.
5355
5356 2001-12-14  Marcus Brinkmann  <marcus@g10code.de>
5357
5358         * engine-gpgsm.c (gpgsm_status_handler): Freeze the output file
5359         handler when ending this operation, otherwise the wait function
5360         will sit on it.
5361
5362 2001-12-14  Marcus Brinkmann  <marcus@g10code.de>
5363
5364         * engine-gpgsm.c (struct gpgsm_object_s): New member colon.attic.
5365         (_gpgme_gpgsm_new): Initialize some more members.
5366         (_gpgme_gpgsm_release): Free the colon line handler's attic line.
5367         (gpgsm_status_handler): Rework the inline-data processing.
5368
5369 2001-12-13  Marcus Brinkmann  <marcus@g10code.de>
5370
5371         * rungpg.c (_gpgme_gpg_spawn): Do not add the fds to the child
5372         list that are not dup'ed, for those the close-on-exec flag is set
5373         now.
5374         * version.c (_gpgme_get_program_version): Remove first entry in
5375         CFD, as the close-on-exec flag is now set for this fd.
5376
5377 2001-12-13  Marcus Brinkmann  <marcus@g10code.de>
5378
5379         * engine-gpgsm.c (_gpgme_gpgsm_op_encrypt): Do not add `armor'
5380         option to `ENCRYPT'.
5381         * engine-gpgsm.c (gpgsm_set_recipients): Free LINE when returning
5382         successfully.
5383
5384 2001-12-13  Marcus Brinkmann  <marcus@g10code.de>
5385
5386         * engine-gpgsm.c (close_notify_handler): New function.
5387         (_gpgme_gpgsm_new): Manage the file descriptors a
5388         bit differently.  Do not set close-on-exec flags.
5389         (_gpgme_gpgsm_op_decrypt): Do not set message_fd
5390         to -1, this is done by the close handler.
5391         (_gpgme_gpgsm_op_encrypt): Likewise.
5392         (_gpgme_gpgsm_op_import): Likewise (also for output_fd).
5393         (_gpgme_gpgsm_op_keylist): Likewise (also for input_fd and output_fd).
5394         (_gpgme_gpgsm_op_sign): Likewise.
5395         (_gpgme_gpgsm_op_verify): Likewise, but for output_fd.
5396
5397         * posix-io.c (_gpgme_io_pipe): Set the close-on-exec flag for the
5398         non-inherited file descriptor index of the pipe.
5399
5400 2001-12-13  Werner Koch  <wk@gnupg.org>
5401
5402         * engine-gpgsm.c (_gpgme_gpgsm_set_colon_line_handler): New.
5403         (gpgsm_status_handler): Pass datalines to a colon handler
5404         * engine.c (_gpgme_engine_set_colon_line_handler): Set the colon
5405         handler for gpgsm.
5406
5407         * engine-gpgsm.c (_gpgme_gpgsm_op_keylist): Allow NULL for
5408         pattern.
5409         (gpgsm_assuan_simple_command): Removed underscore from
5410         assuan_write_line.
5411         (_gpgme_gpgsm_start): Ditto.
5412         (gpgsm_assuan_simple_command): Replaced interal Assuan read
5413         function by the new assuan_read_line.  Removed the use of the
5414         internal header.
5415         (gpgsm_status_handler): Ditto. Use the new assuan_pending_line.
5416         (_gpgme_gpgsm_start): Use the documented way to get an fd from
5417         assuan.
5418
5419         * keylist.c (keylist_colon_handler): Handle "crt" records
5420         * key.h (gpgme_key_s): Add an x509 flag.
5421         * key.c (parse_x509_user_id): New.
5422         (_gpgme_key_append_name): Handle x.509 names.
5423
5424 2001-12-05  Marcus Brinkmann  <marcus@g10code.de>
5425
5426         * engine-gpgsm.c (gpgsm_status_handler): Make it work with current
5427         version of assuan.
5428
5429 2001-12-05  Marcus Brinkmann  <marcus@g10code.de>
5430
5431         * engine-gpgsm.c (gpgsm_set_fd): Accept one more argument OPT.
5432         (_gpgme_gpgsm_op_encrypt): Pass armor argument to gpgsm_set_fd for
5433         output descriptor.
5434         (_gpgme_gpgsm_op_sign): Likewise.
5435
5436 2001-12-05  Marcus Brinkmann  <marcus@g10code.de>
5437
5438         * keylist.c (gpgme_op_keylist_next): Set pending to 0 if EOF
5439         occurs.
5440
5441 2001-11-26  Marcus Brinkmann  <marcus@g10code.de>
5442
5443         * engine-gpgsm.c (_gpgme_gpgsm_op_sign): Fix stupid typo.
5444
5445 2001-11-24  Marcus Brinkmann  <marcus@g10code.de>
5446
5447         * engine-gpgsm.c (gpgsm_status_handler): Don't break if bsearch fails.
5448         Deal with assuan read line returning more than one line (for now).
5449
5450 2001-11-23  Marcus Brinkmann  <marcus@g10code.de>
5451
5452         * engine-gpgsm.c (_gpgme_gpgsm_op_sign): Implement it according to
5453         the current protocol definition.
5454
5455 2001-11-23  Marcus Brinkmann  <marcus@g10code.de>
5456
5457         * engine-gpgsm.c (_gpgme_gpgsm_new): Set CLOEXEC flag for parent
5458         ends of the pipe.
5459
5460 2001-11-22  Marcus Brinkmann  <marcus@g10code.de>
5461
5462         * engine-gpgsm.c: Include stdlib.h and string.h.  Also include,
5463         for now, rungpg.h and status-table.h.
5464         (gpgsm_status_handler): Implement more of the status handler.
5465
5466 2001-11-22  Marcus Brinkmann  <marcus@g10code.de>
5467
5468         * engine.c (_gpgme_engine_op_decrypt): Implement CMS case.
5469         (_gpgme_engine_op_delete): Likewise.
5470         (_gpgme_engine_op_encrypt): Likewise.
5471         (_gpgme_engine_op_export): Likewise.
5472         (_gpgme_engine_op_genkey): Likewise.
5473         (_gpgme_engine_op_keylist): Likewise.
5474         (_gpgme_engine_op_sign): Likewise.
5475         (_gpgme_engine_op_trustlist): Likewise.
5476
5477         * engine-gpgsm.c (_gpgme_gpgsm_op_encrypt): New function.
5478         (gpgsm_assuan_simple_command): Likewise.
5479         (gpgsm_set_recipients): Likewise.
5480         (gpgsm_set_fd): Reimplement using gpgsm_assuan_simple_command.
5481         (_gpgme_gpgsm_op_delete): New function.
5482         (_gpgme_gpgsm_op_export): Likewise.
5483         (_gpgme_gpgsm_op_genkey): Likewise.
5484         (_gpgme_gpgsm_op_sign): Likewise.
5485         (_gpgme_gpgsm_op_keylist): Likewise.
5486         (_gpgme_gpgsm_op_trustlist): Likewise.
5487         (_gpgme_gpgsm_release): Release command.
5488         (_gpgme_gpgsm_op_decrypt): Allocate command.
5489         (_gpgme_gpgsm_op_import): Likewise.
5490         (gpgsm_status_handler): Also treat `ERR' strings as EOF.
5491
5492 2001-11-22  Marcus Brinkmann  <marcus@g10code.de>
5493
5494         * gpgme.h (gpgme_set_protocol): New prototype.
5495
5496 2001-11-22  Marcus Brinkmann  <marcus@g10code.de>
5497
5498         * engine-gpgsm.c (_gpgme_gpgsm_op_decrypt): New function.
5499         (_gpgme_gpgsm_op_import): Likewise.
5500
5501 2001-11-22  Marcus Brinkmann  <marcus@g10code.de>
5502
5503         * engine-gpgsm.c: Shuffle around header inclusion a bit, to still
5504         keep them seperate.
5505         (_gpgme_set_status_handler) [!ENABLE_GPGSM]: New function.
5506
5507 2001-11-22  Werner Koch  <wk@gnupg.org>
5508
5509         * engine-gpgsm.c: Include more headers so that NULL and mk_error
5510         is defined even with an undefined GPGSM_PATH.
5511
5512 2001-11-22  Marcus Brinkmann  <marcus@g10code.de>
5513
5514         * rungpg.c (gpg_inbound_handler, write_mem_data, write_cb_data,
5515         gpg_outbound_handler): Moved to ...
5516         * data.c (_gpgme_data_inbound_handler, write_mem_data,
5517         write_cb_data, _gpgme_data_outbound_handler): ... here.  Make the
5518         _gpgme_* ones non-static.
5519         * data.c: Include io.h.
5520
5521         * ops.h (_gpgme_data_inbound_handler): New prototype.
5522         (_gpgme_data_outbound_handler): Likewise.
5523         (_gpgme_gpg_spawn): Use these new functions.
5524
5525         * engine-gpgsm.h (_gpgme_gpgsm_op_decrypt, _gpgme_gpgsm_op_delete,
5526         _gpgme_gpgsm_op_encrypt, _gpgme_gpgsm_op_export,
5527         _gpgme_gpgsm_op_genkey, _gpgme_gpgsm_op_import,
5528         _gpgme_gpgsm_op_keylist, _gpgme_gpgsm_op_sign,
5529         _gpgme_gpgsm_op_trustlist, _gpgme_gpgsm_op_verify,
5530         _gpgme_gpgsm_start, _gpgme_gpgsm_set_status_handler): New prototype.
5531         Include <rungpg.h> for status handler function.
5532
5533         * engine-gpgsm.c (struct gpgsm_object_s): New members input_fd,
5534         input_data, output_fd, output_data, message_fd, message_data, command
5535         and status.
5536         (_gpgme_gpgsm_new): Open input, output and message pipes before
5537         connecting to the client.  Close server's ends afterwards.
5538         (_gpgme_gpgsm_release): Close open file descriptors.  Remove
5539         server process from wait queue.
5540         (_gpgme_gpgsm_op_verify, _gpgme_gpgsm_start,
5541         _gpgme_gpgsm_set_status_handler, gpgms_status_handler): New function.
5542         
5543         * engine.c (_gpgme_engine_start): Implement for GPGME_PROTOCOL_CMS.
5544         (_gpgme_engine_set_status_handler): Likewise.
5545         (_gpgme_engine_op_verify): Likewise.
5546
5547 2001-11-21  Marcus Brinkmann  <marcus@g10code.de>
5548
5549         * context.h: Do not include rungpg.h, but engine.h.
5550         (struct gpgme_context_s): Replace member gpg with engine.
5551         * gpgme.c (gpgme_release): Release engine, not gpg.
5552
5553         * recipient.c (_gpgme_append_gpg_args_from_recifgpients): Function
5554         moved ...
5555         * rungpg.c (_gpgme_append_gpg_args_from_recipients): ... here.
5556         Make static, change order of arguments, and return an error value.
5557         * ops.h (_gpgme_append_gpg_args_from_recipients): Removed prototype.
5558
5559         * rungpg.h (_gpgme_gpg_op_verify): Add prototype.
5560         (_gpgme_gpg_op_encrypt): Likewise.
5561         (_gpgme_gpg_op_decrypt): Likewise.
5562         (_gpgme_gpg_op_delete): Likewise.
5563         (_gpgme_gpg_op_export): Likewise.
5564         (_gpgme_gpg_op_genkey): Likewise.
5565         (_gpgme_gpg_op_import): Likewise.
5566         (_gpgme_gpg_op_keylist): Likewise.
5567         (_gpgme_gpg_op_sign): Likewise.
5568         (_gpgme_gpg_op_trustlist): Likewise.
5569         * rungpg.c (_gpgme_gpg_op_verify): New function.
5570         (_gpgme_gpg_op_encrypt): Likewise.
5571         (_gpgme_gpg_op_decrypt): Likewise.
5572         (_gpgme_gpg_op_delete): Likewise.
5573         (_gpgme_gpg_op_export): Likewise.
5574         (_gpgme_gpg_op_genkey): Likewise.
5575         (_gpgme_gpg_op_import): Likewise.
5576         (_gpgme_gpg_op_keylist): Likewise.
5577         (_gpgme_gpg_op_sign): Likewise.
5578         (_gpgme_gpg_op_trustlist): Likewise.
5579
5580         * engine.h (_gpgme_engine_set_status_handler): Add prototype.
5581         (_gpgme_engine_set_command_handler): Likewise.
5582         (_gpgme_engine_set_colon_line_handler): Likewise.
5583         (_gpgme_engine_op_decrypt): Likewise.
5584         (_gpgme_engine_op_delete): Likewise.
5585         (_gpgme_engine_op_encrypt): Likewise.
5586         (_gpgme_engine_op_export): Likewise.
5587         (_gpgme_engine_op_genkey): Likewise.
5588         (_gpgme_engine_op_import): Likewise.
5589         (_gpgme_engine_op_keylist): Likewise.
5590         (_gpgme_engine_op_sign): Likewise.
5591         (_gpgme_engine_op_trustlist): Likewise.
5592         (_gpgme_engine_op_verify): Likewise.
5593         (_gpgme_engine_start): Likewise.
5594         * engine.c (_gpgme_engine_set_status_handler): New function.
5595         (_gpgme_engine_set_command_handler): Likewise.
5596         (_gpgme_engine_set_colon_line_handler): Likewise.
5597         (_gpgme_engine_op_decrypt): Likewise.
5598         (_gpgme_engine_op_delete): Likewise.
5599         (_gpgme_engine_op_encrypt): Likewise.
5600         (_gpgme_engine_op_export): Likewise.
5601         (_gpgme_engine_op_genkey): Likewise.
5602         (_gpgme_engine_op_import): Likewise.
5603         (_gpgme_engine_op_keylist): Likewise.
5604         (_gpgme_engine_op_sign): Likewise.
5605         (_gpgme_engine_op_trustlist): Likewise.
5606         (_gpgme_engine_op_verify): Likewise.
5607         (_gpgme_engine_start): Likewise.
5608
5609         * verify.c (gpgme_op_verify_start): Reimplement in terms of above
5610         functions.
5611         * encrypt.c (gpgme_op_encrypt_start): Likewise.
5612         * decrypt.c (_gpgme_decrypt_start): Likewise.
5613         * passphrase.c (_gpgme_passphrase_start): Likewise.
5614         * keylist.c (gpgme_op_keylist_start): Likewise.
5615
5616 2001-11-20  Marcus Brinkmann  <marcus@g10code.de>
5617
5618         * types.h: Add types EngineObject and GpgsmObject.
5619
5620         * Makefile.am (libgpgme_la_SOURCES): Add engine-gpgsm.h,
5621         engine-gpgsm.c, engine.h and engine.c.
5622         * engine.h: New file.
5623         * engine.c: Likewise.
5624         * engine-gpgsm.h: Likewise.
5625         * engine-gpgsm.c: Likewise.
5626         
5627         * rungpg.c (_gpgme_gpg_get_version): New function.
5628         (_gpgme_gpg_check_version): Likewise.
5629         * rungpg.h: Add prototypes for _gpgme_gpg_get_version and
5630         _gpgme_gpg_check_version.
5631
5632         * version.c (compare_versions): Rename to ...
5633         (_gpgme_compare_versions): ... this.  Make non-static.
5634         (gpgme_check_version): Use _gpgme_compare_versions rather than
5635         compare_versions.
5636         (gpgme_check_engine): Likewise.
5637         * ops.h (_gpgme_get_program_version): Add prototype.
5638
5639 2001-11-20  Marcus Brinkmann  <marcus@g10code.de>
5640
5641         * Makefile.am (libgpgme_la_INCLUDES): Remove obsolete directive.
5642         (AM_CPPFLAGS): New directive [BUILD_ASSUAN].
5643         (libgpgme_la_LIBADD): Likewise.
5644
5645 2001-11-20  Marcus Brinkmann  <marcus@g10code.de>
5646
5647         * version.c: Remove global variables lineno and
5648         tmp_engine_version.
5649         (version_handler): Removed.
5650         (_gpgme_get_program_version): New function.
5651         (get_engine_info): Don't use context and version_handler,
5652         but _gpgme_get_program_version.
5653         * ops.h (_gpgme_get_program_version): Add prototype for
5654         _gpgme_get_program_version (we expect to use it elsewhere soon).
5655
5656 2001-11-18  Marcus Brinkmann  <marcus@g10code.de>
5657
5658         * version.c (get_engine_info): If GnuPG is not available, return
5659         an error message.
5660         * posix-util.c (_gpgme_get_gpg_path): Allow GPG_PATH to be
5661         undefined.
5662         (_gpgme_get_gpgsm_path): New function.
5663         * w32-util.c (find_program_in_registry): New static function.
5664         (_gpgme_get_gpg_path): Allow GPG_PATH to be undefined.  Rework
5665         to use find_program_in_registry.
5666         (_gpgme_get_gpgsm_path): New function.
5667         (util.h): Prototype _gpgme_get_gpgsm_path).
5668         * rungpg.c (_gpgme_gpg_spawn): Verify that _gpgme_get_gpg_path()
5669         returns non-null.
5670
5671 2001-11-16  Marcus Brinkmann  <marcus@g10code.de>
5672
5673         * decrypt-verify.c: New file.
5674         * Makefile.am (libgpgme_la_SOURCES): Add decrypt-verify.c.
5675         * types.h: Add decrypt-verify types.
5676         * ops.h: Likewise.
5677         * context.h: Add result type for decrypt-verify.
5678         * gpgme.h: Add decrypt-verify prototypes.
5679
5680         * decrypt.c (decrypt_status_handler): Renamed to ...
5681         (_gpgme_decrypt_status_handler): ... this.  Make non-static.
5682         (_gpgme_decrypt_start): New function, derived from
5683         gpgme_op_decrypt_start.
5684         (gpgme_op_decrypt_start): Reimplement in terms of
5685         _gpgme_decrypt_start.
5686         (_gpgme_decrypt_result): New function to retrieve error value.
5687         (gpgme_op_decrypt): Use _gpgme_decrypt_result.
5688         * ops.h: Add prototypes for new functions.
5689
5690         * verify.c (verify_status_handler): Renamed to ...
5691         (_gpgme_verify_status_handler): ... this.  Make non-static.
5692         (gpgme_op_verify_start): Use new function name.
5693         (intersect_stati): Renamed to ...
5694         (_gpgme_intersect_stati): ... this.  Make non-static.
5695         (gpgme_op_verify): Use new name.
5696         * ops.h: Add prototypes for new functions.
5697
5698 2001-11-16  Marcus Brinkmann  <marcus@g10code.de>
5699
5700         * passphrase.c: New file.
5701         * Makefile.am (libgpgme_la_SOURCES): Add passphrase.c.
5702         * ops.h (_gpgme_passphrase_result): Add prototypes from
5703         passphrase.c.
5704         * types.h: Likewise.
5705         * context.h: Add member passphrase to result.
5706         * gpgme.c (_gpgme_release_result): Release passphrase member.
5707
5708         * decrypt.c: Some formatting and variable name changes (like
5709         CTX instead C).
5710         (struct decrypt_result_s): Remove members now found in
5711         passphrase result.
5712         (_gpgme_release_decrypt_result): Don't release removed members.
5713         (decrypt_status_handler): Call _gpgme_passphrase_status_handler,
5714         and don't handle the cases catched there.
5715         (command_handler): Removed.
5716         (gpgme_op_decrypt_start): Don't set command handler, but invoke
5717         _gpgme_passphrase_start which does it.
5718         (gpgme_op_decrypt): Invoke _gpgme_passphrase_result and drop the
5719         cases covered by it.
5720
5721         * sign.c Some formatting and variable name changes (like
5722         CTX instead C).
5723         (struct sign_result_s): Remove members now found in
5724         passphrase result.
5725         (_gpgme_release_sign_result): Don't release removed members.
5726         (sign_status_handler): Call _gpgme_passphrase_status_handler,
5727         and don't handle the cases catched there.
5728         (command_handler): Removed.
5729         (gpgme_op_sign_start): Don't set command handler, but invoke
5730         _gpgme_passphrase_start which does it.
5731         (gpgme_op_sign): Invoke _gpgme_passphrase_result and drop the
5732         cases covered by it.
5733
5734 2001-11-15  Marcus Brinkmann  <marcus@g10code.de>
5735
5736         * decrypt.c (command_handler): Fix last change.
5737
5738 2001-11-15  Marcus Brinkmann  <marcus@g10code.de>
5739
5740         * verify.c (_gpgme_release_verify_result): Rename RES to RESULT.
5741         Rename R2 to NEXT_RESULT.
5742         (intersect_stati): Rename RES to RESULT.
5743         (gpgme_get_sig_status): Likewise.  Do not check return_type, but
5744         the member verify of result.
5745         (gpgme_get_sig_key): Likewise.
5746
5747         * sign.c (_gpgme_release_sign_result): Rename RES to RESULT.  If
5748         RESULT is zero, return.
5749         (sign_status_handler, command_handler): Do not check return_type,
5750         but the member sign of result.
5751         (gpgme_op_sign): Likewise.  Drop assertion.
5752
5753         * encrypt.c (_gpgme_release_encrypt_result): Rename RES to RESULT.
5754         If RESULT is zero, return.
5755         (encrypt_status_handler): Do not check return_type, but the member
5756         encrypt of result.
5757         (gpgme_op_encrypt): Likewise.  Drop assertion.
5758
5759         * decrypt.c (_gpgme_release_decrypt_result): Rename RES to RESULT.
5760         (create_result_struct): Do not set result_type.
5761         (command_handler, decrypt_status_handler): Do not check
5762         return_type, but the member decrypt of result.
5763         (gpgme_op_decrypt): Likewise.  Drop assertion.
5764
5765         * context.h (enum ResultType): Removed.
5766         (struct gpgme_context_s): Remove member result_type.
5767         (struct result): Replaces union result.
5768         * gpgme.c: Include string.h.
5769         (_gpgme_release_result): Release all members of c->result, which
5770         is now a struct.  Zero out all members of the struct afterwards.
5771
5772 2001-11-11  Marcus Brinkmann  <marcus@g10code.de>
5773
5774         * rungpg.c (_gpgme_gpg_release): Release GPG->cmd.cb_data.
5775         Release all members of the list GPG->arglist.
5776         Reported by Michael Schmidt <mschmidt@cs.uni-sb.de>.
5777
5778 2001-11-02  Marcus Brinkmann  <marcus@g10code.de>
5779
5780         * rungpg.c (pipemode_copy): Change type of NBYTES to size_t.
5781
5782         * key.c: Include string.h.
5783         * data.c: Likewise.
5784         * recipient.c: Likewise.
5785
5786 2001-10-29  Marcus Brinkmann  <marcus@g10code.de>
5787
5788         * context.h: New member signers_len.
5789         * signers.c (gpgme_signers_clear): Require that signers are
5790         non-NULL with assertion.  Use signers_len to determine how much
5791         keys to release.  Add documentation.
5792         (gpgme_signers_add): Use signers_len to determine if the buffer is
5793         large enough.  Use xtryrealloc rather than xtrymalloc and copying.
5794         Add documentation.
5795         (gpgme_signers_enum): Use signers_len to determine if key is
5796         available.  Add documentation.
5797
5798 2001-10-22  Marcus Brinkmann  <marcus@g10code.de>
5799
5800         * data.c (_gpgme_data_append): Check if LENGTH is smaller than
5801         ALLOC_CHUNK, not DH->length.
5802
5803 2001-10-17  Marcus Brinkmann  <marcus@g10code.de>
5804
5805         * gpgme.c (gpgme_set_protocol): Fix last change.
5806
5807 2001-10-15  Werner Koch  <wk@gnupg.org>
5808
5809         * gpgme.h (GpgmeProtocol): New.
5810         * gpgme.c (gpgme_set_protocol): New.
5811
5812 2001-09-26  Werner Koch  <wk@gnupg.org>
5813
5814         * gpgme.c (gpgme_set_passphrase_cb): Ignore a NULL context.
5815         (gpgme_set_progress_cb): Ditto. Suggested by Mark Mutz.
5816
5817 2001-09-17  Werner Koch  <wk@gnupg.org>
5818
5819         * keylist.c (finish_key): Shortcut for no tmp_key.  Changed all
5820         callers to use this function without a check for tmp_key.
5821         
5822         * keylist.c (gpgme_op_keylist_next): Reset the key_cond after
5823         emptying the queue.  Bug reported by Stéphane Corthésy.
5824
5825 2001-09-12  Werner Koch  <wk@gnupg.org>
5826
5827         * data.c (gpgme_data_rewind): Allow rewind for callbacks.
5828
5829 2001-09-07  Werner Koch  <wk@gnupg.org>
5830
5831         * rungpg.h: Add NO_RECP.
5832         * encrypt.c (encrypt_status_handler): Take on No_RECP.
5833         (gpgme_op_encrypt): Better error return.
5834
5835         * verify.c (verify_status_handler): Take on NODATA.
5836
5837 2001-09-03  Werner Koch  <wk@gnupg.org>
5838
5839         * rungpg.h: Added STATUS_INV_RECP.
5840         * gpgme.c (_gpgme_release_result): Add support for new
5841         EncryptResult object.
5842         * encrypt.c (append_xml_encinfo): New.
5843         (encrypt_status_handler): Add some status parsing.
5844         (_gpgme_release_encrypt_result): New.
5845
5846 2001-08-29  Werner Koch  <wk@gnupg.org>
5847
5848         * recipient.c (gpgme_recipients_release): Free the list.  By Timo.
5849
5850         * keylist.c (keylist_colon_handler): Do a finish key if we receive
5851         an EOF here.  This is probably the reason for a lot of bugs
5852         related to keylisting.  It is so obvious.  Kudos to Enno Cramer
5853         for pointing that out. 
5854
5855 2001-08-28  Werner Koch  <wk@gnupg.org>
5856
5857         * gpgme.c, gpgme.h (gpgme_get_op_info): New.
5858         (_gpgme_set_op_info): New. 
5859         (_gpgme_release_result): Reset the op_info here.
5860         * sign.c (append_xml_siginfo): New.
5861         (sign_status_handler): Store the sig create information.
5862
5863 2001-07-31  Werner Koch  <wk@gnupg.org>
5864
5865         * encrypt.c (gpgme_op_encrypt): Hack to detect no valid recipients.
5866
5867 2001-07-30  Werner Koch  <wk@gnupg.org>
5868
5869         * gpgme.c (gpgme_get_armor,gpgme_get_textmode): New.
5870
5871         * rungpg.c (build_argv): Disable armor comments
5872         * w32-io.c (build_commandline): Need to add quotes here
5873
5874 2001-07-24  Werner Koch  <wk@gnupg.org>
5875
5876         * data.c (gpgme_data_read): Add a a way to return the available bytes.
5877
5878 2001-07-23  Werner Koch  <wk@gnupg.org>
5879
5880         * util.c: Removed stpcpy() because we use the version from jnlib.
5881
5882 2001-07-19  Werner Koch  <wk@gnupg.org>
5883
5884         * mkstatus: Define the collating sequence for sort.
5885
5886 2001-06-26  Werner Koch  <wk@gnupg.org>
5887
5888         * rungpg.h: Add STATUS_UNEXPECTED as suggested by Timo.
5889
5890 2001-06-15  Werner Koch  <wk@gnupg.org>
5891
5892         * keylist.c (set_userid_flags): Fixed the assigned values. Kudos
5893         to Timo for pointing this out.
5894
5895 2001-06-01  Werner Koch  <wk@gnupg.org>
5896
5897         * debug.c (_gpgme_debug_begin): Fixed a /tmp race.  Noted by
5898         Johannes Poehlmann.
5899
5900 2001-05-28  Werner Koch  <wk@gnupg.org>
5901
5902         * version.c (gpgme_check_engine): Stop version number parsing at
5903         the opening angle and not the closing one.  By Tommy Reynolds.
5904
5905 2001-05-01  José Carlos García Sogo <jose@jaimedelamo.eu.org>
5906
5907         * encrypt.c (gpgme_op_encrypt_start): Deleted the assert ( !c->gpg )
5908         line, because it gave an error if another operation had been made 
5909         before using the same context.
5910         
5911         * decrypt.c (gpgme_op_decrypt_start): The same as above. Also added 
5912         one line to release the gpg object in the context (if any).
5913         
5914 2001-04-26  Werner Koch  <wk@gnupg.org>
5915
5916         * key.c, key.h (_gpgme_key_cache_init): New.
5917         (_gpgme_key_cache_add): New.
5918         (_gpgme_key_cache_get): New.
5919         * version.c (do_subsystem_inits): Init the cache.
5920         * keylist.c (finish_key): Put key into the cache
5921         * verify.c (gpgme_get_sig_key): First look into the cache.
5922
5923 2001-04-19  Werner Koch  <wk@gnupg.org>
5924
5925         * keylist.c (parse_timestamp): Adjusted for the changed
5926         --fixed-list-mode of gpg 1.0.4h.
5927
5928 2001-04-05  Werner Koch  <wk@gnupg.org>
5929
5930         * verify.c (gpgme_op_verify_start): Enabled pipemode for detached sigs.
5931
5932 2001-04-04  Werner Koch  <wk@gnupg.org>
5933
5934         * w32-io.c (_gpgme_io_select): Don't select on the writer if there
5935         are still bytes pending.  Timo found this not easy to track down
5936         race condition. 
5937
5938 2001-04-02  Werner Koch  <wk@gnupg.org>
5939
5940         * gpgme.h: Add GPGME_ATTR_KEY_{EXPIRED,DISABLED}.
5941         * key.c (gpgme_key_get_ulong_attr): And return those attribs.
5942
5943         * verify.c (gpgme_get_sig_key): Set keyliosting mode depending on 
5944         the mode set in the current context.  Suggested by Timo.
5945
5946         * key.c (gpgme_key_get_ulong_attr): Return can_certify and not
5947         can_encrypt. By Timo.
5948
5949 2001-03-30  Werner Koch  <wk@gnupg.org>
5950
5951         * debug.c (debug_init): Allow to specify a debug file.
5952         (_gpgme_debug_level): New.
5953
5954         * posix-io.c (_gpgme_io_read, _gpgme_io_write): Print output.
5955         (_gpgme_io_select): Debug only with level > 2.
5956
5957 2001-03-15  Werner Koch  <wk@gnupg.org>
5958
5959         * rungpg.c: Included time.h.
5960
5961         * key.h: New keyflags for capabilities.
5962         * keylist.c (set_mainkey_capability, set_subkey_capability): New.
5963         (keylist_colon_handler): Parse them.
5964         * gpgme.h: New attribute values for capabilties.
5965         * key.c (gpgme_key_get_string_attr): Return them.
5966         (capabilities_to_string): New.
5967         (gpgme_key_get_ulong_attr): Return the global caps.
5968
5969 2001-03-14  Werner Koch  <wk@gnupg.org>
5970
5971         * w32-io.c (destroy_reader,destroy_writer): Fixed syntax error. 
5972         Thanks to Jan Oliver Wagner.
5973
5974 2001-03-13  Werner Koch  <wk@gnupg.org>
5975
5976         * context.h: Add invalid and revoke flags to user_id structure.
5977         * keylist.c (gpgme_op_keylist_start): Use --fixed-list-mode.
5978         (keylist_colon_handler): Adjust for that.
5979         (set_userid_flags): New. 
5980         (set_mainkey_trust_info): Handle new key invalid flag
5981         (set_subkey_trust_info): Ditto.
5982         * gpgme.h: Add new attributes for key and user ID flags.
5983         * key.c (_gpgme_key_append_name): Init these flags
5984         (gpgme_key_get_as_xml): Print them.
5985         (one_uid_as_xml): New helper for above.
5986         (gpgme_key_get_string_attr, gpgme_key_get_ulong_attr):
5987         Return the new attributes.  Enhanced, so that subkey information
5988         can be returned now.
5989
5990 2001-02-28  Werner Koch  <wk@gnupg.org>
5991
5992         * w32-io.c (destroy_reader): Set stop_me flag.
5993         (writer,create_writer,destroy_writer,find_writer,kill_writer): New.
5994         (_gpgme_io_write): Use a writer thread to avaoid blocking.
5995         (_gpgme_io_close): Cleanup a writer thread
5996         (_gpgme_io_select): Repalce tthe faked wait on writing by a real
5997         waiting which is now possible due to the use of a writer thread.
5998
5999 2001-02-20  Werner Koch  <wk@gnupg.org>
6000
6001         * w32-io.c (destroy_reader,kill_reader): New. 
6002         (create_reader, reader): Add a new event to stop the thread.
6003         (_gpgme_io_close): Kill the reader thread.
6004
6005         * posix-io.c (_gpgme_io_select): Handle frozen fds here. 
6006         * 32-io.c (_gpgme_io_select): Ditto. Removed a bunch of unused code.
6007
6008         * wait.c: Reworked the whole thing.
6009         * rungpg.c (_gpgme_gpg_new): Init pid to -1.
6010         (_gpgme_gpg_release): Remove the process from the wait queue.
6011
6012 2001-02-19  Werner Koch  <wk@gnupg.org>
6013
6014         * w32-io.c (_gpgme_io_set_close_notify): New.
6015         (_gpgme_io_close): Do the notification.
6016
6017         * posix-io.c (_gpgme_io_select): Use a 1 sec timeout and not 200
6018         microseconds.
6019
6020         * wait.c (remove_process): Don't close the fd here.
6021         (do_select): Set the fd to -1 and remove the is_closed flag everywhere.
6022         (_gpgme_wait_on_condition): Remove the assert on the queue and
6023         break out if we could not find the queue.  The whole thing should
6024         be reworked.
6025
6026         * posix-io.c (_gpgme_io_set_close_notify): New.
6027         (_gpgme_io_close): Do the notification.
6028
6029         * rungpg.c (close_notify_handler): New. 
6030         (_gpgme_gpg_new): Register a callback for the fd.
6031         (_gpgme_gpg_set_colon_line_handler): Ditto.
6032         (build_argv): Ditto
6033
6034 2001-02-13  Werner Koch  <wk@gnupg.org>
6035
6036         * rungpg.c (struct reap_s): Replaced pid_t by int.
6037
6038         * types.h: Add ulong typedef.
6039
6040         * rungpg.c (do_reaping,_gpgme_gpg_housecleaning): New.
6041         (_gpgme_gpg_release): Reap children.
6042         * io.h, posix-io.c (_gpgme_io_kill): New.
6043         * w32-io.c (_gpgme_io_kill): New (dummy).
6044
6045         * keylist.c (gpgme_op_keylist_start): Cancel a pending request.
6046
6047         * posix-io.c (_gpgme_io_read): Add some debug output. 
6048         (_gpgme_io_write): Ditto.
6049         (_gpgme_io_select): Increased the timeout.
6050
6051 2001-02-12  Werner Koch  <wk@gnupg.org>
6052
6053         Enhanced the signature verification, so that it can how handle
6054         more than one signature and is able to return more information on 
6055         the signatures.
6056         * verify.c (gpgme_get_sig_key): New.
6057         (gpgme_get_sig_status): New.
6058
6059         * gpgme.h: Add stdio.h. 
6060         (GpgmeSigStat): New status DIFF.
6061
6062 2001-02-01  Werner Koch  <wk@gnupg.org>
6063
6064         * w32-io.c (set_synchronize): Add EVENT_MODIFY_STATE.  Add Debug
6065         code to all Set/ResetEvent().
6066
6067         * rungpg.c (read_status): Check for end of stream only if we have
6068         an r.  By Timo.
6069
6070 2001-01-31  Werner Koch  <wk@gnupg.org>
6071
6072         * wait.c (_gpgme_wait_on_condition): Removed all exit code processing.
6073         (propagate_term_results,clear_active_fds): Removed.
6074         (count_active_fds): Renamed to .. 
6075         (count_active_and_thawed_fds): .. this and count only thawed fds. 
6076
6077         * rungpg.c (gpg_colon_line_handler): Return colon.eof and not
6078         status.eof ;-)
6079
6080 2001-01-30  Werner Koch  <wk@gnupg.org>
6081
6082         * w32-io.c (_gpgme_io_spawn): Use the supplied path arg.
6083
6084         * version.c (get_engine_info): Return better error information.
6085
6086         * posix-util.c, w32-util.c: New.
6087         (_gpgme_get_gpg_path): New, suggested by Jan-Oliver.
6088         * rungpg.c (_gpgme_gpg_spawn): Use new function to get GPG's path.
6089
6090         * signers.c (gpgme_signers_add): Ooops, one should test code and
6091         not just write it; the newarr was not assigned.  Thanks to José
6092         for pointing this out.  Hmmm, still not tested, why should a coder
6093         test his fix :-)
6094
6095         * w32-io.c: Does now use reader threads, so that we can use
6096         WaitForMultipleObjects. 
6097         * sema.h, posix-sema.c, w32-sema.c: Support for Critcial sections.
6098         Does currently only work for W32.
6099
6100         * debug.c, util.h : New. Changed all fprintfs to use this new
6101         set of debugging functions.
6102
6103 2001-01-23  Werner Koch  <wk@gnupg.org>
6104
6105         * data.c (_gpgme_data_release_and_return_string): Fixed string
6106         termination.
6107
6108 2001-01-22  Werner Koch  <wk@gnupg.org>
6109
6110         * delete.c: New.
6111
6112         * signers.c: New.
6113         * key.c (gpgme_key_ref, gpgme_key_unref): New.
6114         * sign.c (gpgme_op_sign_start): Allow the use of other keys.
6115
6116         * version.c (gpgme_get_engine_info,gpgme_check_engine): New.
6117         * rungpg.c (_gpgme_gpg_set_simple_line_handler): New.
6118
6119 2001-01-05  Werner Koch  <wk@gnupg.org>
6120
6121         * data.c (gpgme_data_rewind): Allow to rewind data_type_none.
6122
6123
6124  Copyright 2001,2002,2003,2004,2005,2006,2007,2008,2009 g10 Code GmbH
6125
6126  This file is free software; as a special exception the author gives
6127  unlimited permission to copy and/or distribute it, with or without
6128  modifications, as long as this notice is preserved.
6129
6130  This file is distributed in the hope that it will be useful, but
6131  WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
6132  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.