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