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