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