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