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