1 2010-11-02 Werner Koch <wk@g10code.com>
3 * data-fd.c (read, write, lseek) [W32CE && ! __MINGW32CE__]: New.
4 Taken from Pedro Alves Public Domain code.
6 * w32-ce.h (SHGetSpecialFolderPath): Remove our defines and
7 prototypes. We use the system provided prototypes now.
8 * w32-ce.c: Include shlobj.h
9 (_WIN32_IE): Define to 0x0400
11 * w32-util.c: Explicitly include windows headers before util.h.
12 (_gpgme_w32ce_get_debug_envvar): Do not use wchar_t strings for
13 read_w32_registry_string.
14 (mkstemp): Use CreateFile instead of open.
16 * w32-io.c (handle_to_fd, fd_tohandle): Add. We need them for W32.
17 * w32-util.c (_WIN32_IE): Define to 0x0400.
19 * util.h [W32]: Include windows.h.
20 * w32-sema.c: Do not include windows.h directly.
21 * ath.c (ssize_t, pid_t)[_MSC_VER]: Add new types.
22 * gpgme.c (gpgme_result_ref, gpgme_result_unref): Do not use a
23 void pointer in pointer arithmetic.
24 * w32-util.c: Include util.h prior to ath.h. Don't include
26 (F_OK): Define if not defined.
27 * w32-ce.c: Include string.h.
28 (RegQueryValueExA): Use WINAPI modifier to match the declaration.
29 * vfs-create.c: Include string.h because under W32CE with MSC we
30 get a warning related to our strerror replacement.
31 * encrypt-sign.c: Include stdlib.h, string.h and errno.h.
32 * priv-io.h [W32CE]: Include w32-ce.h
33 * w32-ce.h: Include winsock2.h and ws2tcpip.h.
34 (_MSV_VER): Remove useless macro.
37 Guard all includes of unistd.h and sys/time.h.
39 2010-10-28 Marcus Brinkmann <marcus@g10code.com>
41 * opassuan.c (gpgme_op_assuan_transact_ext): Fix uninitialized
42 value use. Reported by Marc Mutz.
44 2010-10-07 Werner Koch <wk@g10code.com>
46 * gpgme-tool.c (ARGP_ERR_UNKNOWN): Use EDEADLK if available.
48 * w32-util.c (_gpgme_w32ce_get_debug_envvar) [W32CE]: New.
49 * debug.c (debug_init) [W32CE]: Use new function.
51 2010-09-16 Werner Koch <wk@g10code.com>
53 * import.c: Include "util.h".
54 (parse_import): Return GPG_ERR_MISSING_ISSUER_CERT.
56 * util.h: Add fallback define for GPG_ERR_MISSING_ISSUER_CERT.
57 * op-support.c: Include "util.h".
58 (_gpgme_parse_inv_recp): Handle new code 12.
60 2010-09-02 Marcus Brinkmann <marcus@g10code.de>
62 * error.c (gpgme_err_code_to_errno): Fix cut and paste bug (thanks
65 2010-09-01 Marcus Brinkmann <marcus@g10code.de>
67 * w32-io.c: Revert change from 2009-06-18, as it created a race
70 2010-08-18 Marcus Brinkmann <marcus@g10code.de>
72 * gpgme.def: Add gpgme_err_code_from_syserror and gpgme_err_set_errno.
73 * libgpgme.vers: Likewise.
74 * gpgme.h.in (gpgme_error_from_errno): Fix return type to
76 (gpgme_err_code_from_syserror, gpgme_err_set_errno): New prototype.
77 (gpgme_error_from_syserror): New inline function (why are
78 gpgme_err_make_from_errno and gpgme_error_from_errno not inline
80 * error.c (gpgme_error_from_errno): Fix return type to gpgme_error_t.
81 (gpgme_err_set_errno, gpgme_err_code_from_syserror): New functions.
83 2010-08-03 Marcus Brinkmann <marcus@g10code.de>
85 * gpgme-tool.c (result_encrypt_to_xml, result_sign_to_xml)
86 (result_verify_to_xml, result_import_to_xml)
87 (result_genkey_to_xml): Check vigorously for null pointers.
89 * w32-io.c (GPGCEDEV_IOCTL_ASSIGN_RVID): New macro.
90 (_gpgme_io_spawn): Use ASSIGN_RVID.
92 2010-06-11 Marcus Brinkmann <marcus@g10code.de>
94 * w32-io.c (_gpgme_io_spawn): Remove debug printf.
96 2010-06-10 Marcus Brinkmann <marcus@g10code.de>
98 * gpgme-tool.c (gpgme_server): Use special hack for Windows CE to
99 get at stdin and stdout.
101 * engine-gpgsm.c (gpgsm_new): Translate returned achild_fds back
104 * debug.h (TRACE_SUC6): New macro.
105 * w32-io.c (MAX_SLAFD): New macro.
106 (fd_table): New static variable.
107 (new_fd, release_fd): New functions.
108 (fd_to_handle, handle_to_fd, handle_to_socket): Remove macros.
109 (MAX_READERS, MAX_WRITERS): Increase to 64.
110 (notify_table): Increase to MAX_SLAFD.
111 (struct reader_context_s, struct writer_context_s): Add member
113 (reader, writer): Use file_hd vs file_sock to decide if socket
114 operations to use. Remove auto-detect mode.
115 (create_reader, create_writer): Set file_sock. Unblock pending
116 thread only if this is a pipe fd.
117 (_gpgme_io_pipe): Allocate fds from table and return slot indices
118 instead of windows handles. This allows to properly handle RVIDs.
119 (_gpgme_io_close): Handle dup'ed file descriptors.
120 (build_commandline) [HAVE_W32_SYSTEM]: Use RVID from fd table now.
121 (_gpgme_io_spawn): Use fd table now.
122 (_gpgme_io_fd2str): Use RVID from fd table now.
123 (_gpgme_io_dup): Implement using fd table.
124 (_gpgme_io_socket): Allocate fds from table.
125 (_gpgme_io_connect): Use fd from table.
127 * w32-glib-io.c (find_channel): Check that the slot is used.
129 2010-06-09 Marcus Brinkmann <marcus@g10code.de>
131 * w32-io.c [HAVE_W32CE_SYSTEM]: Include assuan.h and winioctl.h.
132 (GPGCEDEV_IOCTL_UNBLOCK) [HAVE_W32CE_SYSTEM]: Define.
133 (set_synchronize) [HAVE_W32CE_SYSTEM]: Stub it out.
134 (is_socket): Allow to return -1 for auto-detect (old behaviour).
135 (is_socket) [HAVE_W32CE_SYSTEM]: Return -1.
136 (reader): Handle auto-detect case. Handle ctx->stop_me before
138 (destroy_reader) [HAVE_W32CE_SYSTEM]: Unblock a pending reader.
139 (writer): Handle auto-detect case. Handle ctx->stop_me with
141 (destroy_writer) [HAVE_W32CE_SYSTEM]: Unblock a pending writer.
142 (_gpgme_io_pipe) [HAVE_W32CE_SYSTEM]: Implement in terms of a
144 (build_commandline) [HAVE_W32CE_SYSTEM]: New function.
145 (_gpgme_io_spawn) [HAVE_W32CE_SYSTEM]: Implement it differently
147 (_gpgme_io_fd2str) [HAVE_W32CE_SYSTEM]: Implement it for RVIDs.
148 (_gpgme_io_dup) [HAVE_W32CE_SYSTEM]: Stub it out.
150 * gpgme-tool.c (result_add_timestamp): Add missing NULL argument.
151 (result_sign_to_xml): Protect against NULL fingerprint.
152 (struct server): New members input_fd, input_filename,
153 input_stream output_fd, output_filename, output_stream,
154 message_filename, message_stream.
155 (server_reset_fds): Deallocate those.
156 (server_parse_fd): New function.
157 (server_data_obj): Take optional filename argument and direction
158 argument. Also take new argument to return a filestream that
159 needs to be closed after destroying the data object.
160 Change all callers, too.
161 (input_notify, output_notify): Removed.
162 (cmd_input, cmd_output): New functions.
163 (gpgme_server): Do not register input and output notifier.
164 (register_commands): Use cmd_input and cmd_output.
165 (cmd_message): Rewritten to use server_parse_fd.
166 (cmd_delete, cmd_keylist): Fix inverted option check.
167 (main) [HAVE_W32CE_SYSTEM]: Sleep a bit to work around bug in ssh.
169 * genkey.c (gpgme_op_genkey): Return err with TRACE_ERR.
171 2010-05-12 Marcus Brinkmann <marcus@g10code.de>
173 * conversion.c (_gpgme_timegm) [HAVE_W32_SYSTEM]: New static
175 (_gpgme_parse_timestamp) [HAVE_W32_SYSTEM]: Use it.
177 * gpgme-tool.c (main): Protect call to setlocale with
180 * Makefile.am (system_components): Remove custom cppflags from
181 RCCOMPILE (because gpg-error adds -idirafter that makes RC bail.
182 [HAVE_W32CE_SYSTEM]: Add w32-ce.h and w32-ce.c, clear
184 * w32-ce.h, w32-ce.c: New files.
186 * priv-io.h: Include <sys/types.h>
189 2010-05-11 Marcus Brinkmann <marcus@g10code.de>
191 * w32-util.c: Include ath.h
192 (HAVE_ALLOW_SET_FOREGROUND_WINDOW) [!HAVE_W32CE_SYSTEM]: Define
194 (RTLD_LAZY, dlopen, dlsym,
195 dlclose) [!HAVE_ALLOW_SET_FORGROUND_WINDOW]: Don't define anymore.
196 (_gpgme_allow_set_foreground_window) [!HAVE_ALLOW_SET_FOREGROUND_WINDOW]:
198 (read_w32_registry_string): Use FooA variants of Windows functions
199 instead of Foo (which dispatches depending on UNICODE).
200 [!HAVE_W32CE_SYSTEM]: Don't check environment.
201 (w32_shgetfolderpath): Remove.
202 (find_program_at_standard_place): Call
203 SHGetSpecialFolderPath (which is available on all Windows systems
204 and also Windows CE).
205 (mkstemp): Use ath_self instead of getpid.
206 (_gpgme_mkstemp): Use GetTempPathA instead of GetTempPath.
208 * gpgme.h.in: Use _WIN32 instead of _MSC_VER. Include time.h for
211 2010-05-07 Marcus Brinkmann <marcus@g10code.de>
213 * engine-g13.c, gpgme.c, engine-gpgsm.c, engine-gpg.c,
214 op-support.c, engine-assuan.c, gpgme-tool.c: Include <locale.h>
215 only if available with HAVE_LOCALE_H and conditionalize use of
216 LC_CTYPE on its definition.
217 * engine-gpgconf.c: Do not include <locale.h>.
219 * engine-gpgsm.c (gpgsm_new, start): Cast between int and
221 * assuan-support.c (my_pipe, my_close, my_read, my_write): Likewise.
222 * gpgme-tool.c (server_data_obj, server_reset_fds, gpgme_server),
223 (my_recvmsg, my_sendmsg, my_spawn): Likewise.
224 * engine-assuan.c (start): Likewise.
225 * engine-g13.c (start): Likewise.
227 2010-05-06 Marcus Brinkmann <marcus@g10code.de>
229 * w32-glib-io.c, w32-io.c, w32-qt-io.cpp, w32-sema.c, w32-util.c:
230 Do not include <signal.h>.
232 * sign.c, data-user.c, conversion.c, debug.c, verify.c, data.c,
233 decrypt.c, delete.c, assuan-support.c, import.c, engine-gpgsm.c,
234 data-mem.c, op-support.c, w32-io.c, w32-util.c, data-compat.c: Use
235 gpg_error_from_syserror instead gpg_error_from_errno, and use
236 gpg_err_set_errno to set error number.
237 * setenv.c: Include <gpg-error.h> and define __set_errno to use
239 * gpgme-tool.c (ARGP_ERR_UNKNOWN): Define to EDEADLOCK (which is
240 mapped in Windows CE) instead of E2BIG (which is not).
241 (gt_import_keys): Initialize err.
243 2010-04-19 Marcus Brinkmann <marcus@g10code.de>
245 * assuan-support.c (my_spawn): Cast to avoid warning.
246 * engine-g13.c (g13_new): Make ARGV array of pointer to const
248 (g13_assuan_simple_command) [!USE_DESCRIPTOR_FUNCTION]: Don't define.
249 * ops.h (_gpgme_key_append_name): Same in prototype.
250 * key.c (_gpgme_key_append_name): Make SRC argument pointer to
252 * posix-util.c (_gpgme_get_uiserver_socket_path): Make HOMEDIR
254 * vfs-mount.c (gpgme_op_vfs_transact_start): Never define this
255 potentially useful but currently unused function.
256 * vfs-create.c (gpgme_op_vfs_transact_start): Likewise.
258 2010-04-16 Werner Koch <wk@g10code.com>
260 * w32-io.c (is_socket): New.
261 (reader, writer): Use it to figure out the API to use.
263 2010-03-15 Werner Koch <wk@g10code.com>
265 * gpgme.h.in: Add autoconf template to set generated file to
266 read-only in an emacs buffer.
268 2010-03-12 Werner Koch <wk@g10code.com>
270 * gpgme.h.in (GPGME_STATUS_SUCCESS): Use the right file for the
273 * passwd.c (op_data_t): New.
274 (passwd_start): Setup OPD.
275 (passwd_status_handler): Return GPG_ERR_NOT_SUPPORTED if needed.
276 * context.h (OPDATA_PASSWD): New.
277 * gpgme.h (GPGME_STATUS_SUCCESS): New.
279 2010-03-09 Werner Koch <wk@g10code.com>
281 * engine-gpgsm.c (gpgsm_keylist): Try to start the agent.
283 2010-02-17 Werner Koch <wk@g10code.com>
285 * posix-io.c (notify_table): Change implementation.
286 (notify_table_item_t, notify_table_size, notify_table_lock): New.
287 (_gpgme_io_close, _gpgme_io_set_close_notify): Adjust for new
290 2010-02-16 Werner Koch <wk@g10code.com>
292 * gpgme-tool.c (spacep, has_option, skip_options): New.
293 (cmd_export): Implement option --minimal.
295 * gpgme.h.in (GPGME_EXPORT_MODE_MINIMAL): New.
296 * export.c (export_start, export_ext_start): Implement it.
297 * engine-gpg.c (export_common): Ditto.
299 2010-01-25 Werner Koch <wk@g10code.com>
301 * w32-io.c (_gpgme_io_connect): Fix return code check to make it work.
303 * version.c (do_subsystem_inits): Remove superfluous second
306 2010-01-22 Werner Koch <wk@g10code.com>
308 * w32-io.c (writer): Try to use send first.
309 (reader): Try to use recv first.
311 2010-01-08 Werner Koch <wk@g10code.com>
313 * engine-gpg.c (gpg_passwd): New.
314 (_gpgme_engine_ops_gpg): Register.
315 * passwd.c (parse_error): New.
316 (passwd_status_handler): Use it.
318 2010-01-07 Marcus Brinkmann <marcus@g10code.de>
320 * gpgme-tool.c (result_xml_write_cb_t, struct result_xml_state):
322 (MAX_TAGS): New macro.
323 (result_init, result_xml_indent, result_xml_tag_start)
324 (result_xml_tag_data, result_xml_tag_end, result_add_error)
325 (result_add_pubkey_algo, result_add_hash_algo, result_add_keyid)
326 (result_add_fpr, result_add_timestamp, result_add_sig_mode)
327 (result_add_value, result_add_string, result_encrypt_to_xml)
328 (result_decrypt_to_xml, result_sign_to_xml)
329 (result_verify_to_xml, result_import_to_xml)
330 (result_genkey_to_xml, result_keylist_to_xml)
331 (result_vfs_mount_to_xml): New functions.
332 (gt_result): Rewritten.
334 2010-01-05 Werner Koch <wk@g10code.com>
336 * gpgme-tool.c (gt_passwd, cmd_passwd): New.
337 (register_commands): Register.
339 * gpgme.h.in (gpgme_op_passwd_start, gpgme_op_passwd): New.
340 * libgpgme.vers, gpgme.def: Add new functions.
342 * Makefile.am (main_sources): Add passwd.c
343 * engine.c, engine.h (_gpgme_engine_op_passwd): New.
344 * engine-backend.h (struct engine_ops): Add PASSWD.
345 * engine-gpgsm.c (gpgsm_passwd): New.
346 (_gpgme_engine_ops_gpgsm): Register.
347 (gpgsm_reset): Reset only if we have a conenction.
349 * gpgme.h.in (GPGME_PK_ECDSA, GPGME_PK_ECDH): New.
350 * gpgme.c (gpgme_pubkey_algo_name): Add them.
352 2009-12-22 Marcus Brinkmann <marcus@g10code.de>
354 * debug.c: Test for TLS, not __GNUC__
356 2009-12-15 Marcus Brinkmann <marcus@g10code.de>
358 * assuan-support.c (my_spawn): Calloc, not malloc, the fd_items.
360 2009-12-10 Werner Koch <wk@g10code.com>
362 * debug.c (debug_init): Test on sgid process.
364 2009-12-08 Marcus Brinkmann <marcus@g10code.de>
366 * Makefile.am (LTRCCOMPILE): Refactor with ...
367 (RCCOMPILE): ... this new macro.
369 (gpgme_res_ldflag): Removed.
370 (gpgme_res): Use libtool object file name here.
371 (libgpgme_la_LDFLAGS): Remove gpgme_res_ldflag usage.
372 (libgpgme_la_LIBADD): Add gpgme_res.
374 * ath.c (ath_self) [HAVE_W32_SYSTEM]: Fix typo.
376 2009-12-02 Werner Koch <wk@g10code.com>
378 * gpgconf.c (gpgme_conf_arg_release): No return in a function
379 returning void. Reported by Wyllys Ingersoll.
381 2009-12-01 Werner Koch <wk@g10code.com>
383 * gpgme-tool.c (cmd_getauditlog): Add flag --html.
384 (hlp_getauditlog): New.
386 * gpgme-tool.c (GT_GCC_A_SENTINEL, GT_GCC_A_PRINTF): New.
387 (gt_write_status): Use sentinel.
388 (argp_error, log_error): Use printf attribute.
389 (argp_parse): Remove extra argument to argp_error.
390 (_gt_progress_cb, gt_get_engine_info, gt_get_keylist_mode)
391 (gt_result): Add NULL arg.
393 2009-11-26 Marcus Brinkmann <marcus@g10code.de>
395 * opassuan.c (opassuan_start): Allocate result structure before
398 2009-11-25 Marcus Brinkmann <marcus@g10code.de>
400 * gpgme-tool.c (gpgme_server): Use assuan_fd_t and assuan_fdopen
403 2009-11-13 <wk@g10code.com>
405 * sign.c (_gpgme_sign_status_handler): Handle SIG_CREATED_SEEN.
406 * engine-uiserver.c (uiserver_sign): Make sending SENDER optional.
408 2009-11-10 Marcus Brinkmann <marcus@g10code.de>
410 * op-support.c (_gpgme_op_reset): Instead of last change, only set
411 sub protocol if it is not the default.
413 2009-11-10 Werner Koch <wk@g10code.com>
415 * op-support.c (_gpgme_op_reset): Ignore GPG_ERR_NOT_IMPLEMENTED
416 while setting the sub protocol.
418 * engine-uiserver.c (uiserver_new): Pass fdpassing flag to
419 assuan_socket_connect.
420 (set_recipients): Replace fingerprint by user id.
422 * engine-gpgsm.c (set_recipients): Fix non-terminating loop in
423 case of a missing key.
425 2009-11-10 Marcus Brinkmann <marcus@g10code.de>
427 * gpgme.c (gpgme_new): Set default sub protocol.
428 * gpgme-tool.c: Implement get sub protocol.
430 * gpgme.h.in (gpgme_get_sub_protocol): Add prototype.
431 * gpgme.def, libgpgme.vers: Add gpgme_get_sub_protocol.
432 * context.h (struct gpgme_context): New member sub_protocol.
433 * gpgme.c (gpgme_set_sub_protocol): Set CTX->sub_protocol.
434 (gpgme_get_sub_protocol): New function.
435 * op-support.c (_gpgme_op_reset): Set sub protocol.
437 * Makefile.am (uiserver_components): New variable.
438 (main_sources): Add it.
439 * ops.h, key.c (_gpgme_key_append_name): Take CONVERT argument,
440 implement it. Adjust callers.
441 (gpgme_key_from_uid): New function.
442 * gpgme.h.in (gpgme_protocol_t): Add GPGME_PROTOCOL_DEFAULT.
443 (gpgme_encrypt_flags_t): Add GPGME_ENCRYPT_PREPARE,
444 GPGME_ENCRYPT_EXPECT_SIGN.
445 (gpgme_set_sub_protocol, gpgme_key_from_uid): New functions.
446 * libgpgme.vers, gpgme.def: Add new functions.
447 * gpgme.c (gpgme_set_protocol): Add UIServer protocol.
448 (gpgme_set_sub_protocol): New function.
449 (gpgme_get_protocol_name): Add UIServer and default protocol.
450 * assuan-support.c: Return correct error values, implement
451 socketpair for POSIX.
452 * priv-io.h, posix-io.c, w32-io.c, w32-glib-io.c,
453 w32-qt-io.cpp (_gpgme_io_spawn): Add ATFORK and ATFORKVALUE
454 arguments. Implement it for POSIX. Adjust all callers.
455 * engine.h, engine-backend.h (_gpgme_engine_set_protocol)
456 (_gpgme_engine_op_decrypt_verify): New prototypes. Adjust all
458 * engine.c (engine_ops, gpgme_get_engine_info): Add UIServer
460 (_gpgme_engine_set_protocol, _gpgme_engine_op_decrypt_verify): New
462 * decrypt-verify.c (decrypt_verify_start): Call
463 _gpgme_engine_op_decrypt_verify.
464 * util.h, posix-util.c,
465 w32-util.c (_gpgme_get_uiserver_socket_path): New function.
466 * engine-gpgsm.c (gpgsm_set_fd): Fix _gpgme_io_pipe invocation.
467 * gpgme-tool.c: Some support for UIServer protocol.
468 * engine-uiserver.c: New file.
470 2009-11-09 Marcus Brinkmann <marcus@g10code.de>
472 * engine-gpgsm.c (gpgsm_new): Close server side FDs.
474 2009-11-06 Marcus Brinkmann <marcus@g10code.de>
476 * gpgme-tool.c (struct gpgme_tool): New members write_data and
478 (gt_write_data): New function.
479 (gt_result): Output vfs_mount result.
480 (server_write_data): New function.
481 (gpgme_server): Initialize write_data members.
483 2009-11-05 Marcus Brinkmann <marcus@g10code.de>
485 * engine-g13.c (struct engine_g13): Remove members RESULT_CB and
487 (g13_assuan_simple_command, status_handler): Don't use those anymore.
488 (g13_transact): Remove them from argument list, too.
489 * vfs-mount.c (_gpgme_vfs_mount_status_handler): New function.
490 (_gpgme_op_vfs_mount): Pass it to transact.
492 * engine-assuan.c (llass_new): Update use of assuan_socket_connect.
493 * engine-gpgsm.c (gpgsm_new): Update use of assuan_pipe_connect.
494 * engine-g13.c (g13_new): Likewise.
496 * priv-io.h (IOSPAWN_FLAG_NOCLOSE): New flag.
497 * w32-io.c (_gpgme_io_spawn): Implement this flag.
498 * posix-io.c (_gpgme_io_spawn): Likewise.
499 * w32-glib-io.c (_gpgme_io_spawn): Likewise.
500 * assuan-support.c (my_spawn): Set this flag.
502 * decrypt.c (gpgme_op_decrypt_start): Fix use of debug macro.
503 * decrypt-verify.c (gpgme_op_decrypt_verify_start): Likewise.
504 * delete.c (gpgme_op_delete_start): Likewise.
505 * edit.c (gpgme_op_edit_start, gpgme_op_card_edit_start):
507 * encrypt.c (gpgme_op_encrypt_start): Likewise.
508 * encrypt-sign.c (gpgme_op_encrypt_sign_start): Likewise.
509 * export.c (gpgme_op_export_start, gpgme_op_export_ext_start)
510 (gpgme_op_export_keys_start, gpgme_op_export_keys): Likewise.
511 * genkey.c (gpgme_op_genkey_start): Likewise.
512 * getauditlog.c (gpgme_op_getauditlog_start): Likewise.
513 * import.c (gpgme_op_import_start, gpgme_op_import_keys_start):
515 * opassuan.c (gpgme_op_assuan_transact_start): Likewise.
516 * sign.c (gpgme_op_sign_start): Likewise.
517 * verify.c (gpgme_op_verify_start): Likewise.
518 * vfs-create.c (gpgme_op_vfs_create): Likewise.
519 * vfs-mount.c (gpgme_op_vfs_mount): Likewise.
521 2009-11-04 Marcus Brinkmann <marcus@g10code.de>
523 * ath.h (ath_self): New prototype. Include <stdint.h>
524 * ath.c, ath-pth.c, ath-pthread.c (ath_self): New function.
525 * debug.h: Rewrite most macros to beautify debug output.
526 (_gpgme_debug_buffer): Remove tagname and tag argument.
527 (_gpgme_debug_frame_begin, _gpgme_debug_frame_end): New prototypes.
528 * debug.c: Include <time.h>. Don't include assuan.h.
529 (frame_nr, FRAME_NR): New thread-specific variable and macro.
530 (debug_init): Do not initialize assuan. Call _gpgme_debug after
531 initialization instead using printf directly.
532 (_gpgme_debug): Do not call debug_init (we now ensure proper
533 initialization by user). Add timestamp and thread/process ID.
534 (_gpgme_debug_buffer): Do not take tagname and tag argument.
535 (_gpgme_debug_frame_begin, _gpgme_debug_frame_end): New functions.
536 * version.c (gpgme_check_version_internal, gpgme_check_version):
537 Fix debug string. Do not initialize assuan.
538 * posix-io.c (get_max_fds): Use 0 not NULL (nicer debug output).
540 2009-11-04 Werner Koch <wk@g10code.com>
542 * gpgme-tool.c (register_commands): Add HELP feature.
544 2009-11-03 Werner Koch <wk@g10code.com>
546 * gpgme.h.in (GPGME_PROTOCOL_UISERVER): New.
548 2009-11-03 Marcus Brinkmann <marcus@g10code.de>
550 * Makefile.am (main_sources): Change g13.c to vfs-mount.c. Add
552 * vfs-create.c: New file.
553 * g13.c: Renamed to ...
554 * vfs-mount.c: ... this new file.
555 * gpgme.h.in (gpgme_op_vfs_create): New prototype.
556 * gpgme.def, libgpgme.vers: Add gpgme_op_vfs_create.
557 * gpgme-tool.c (gt_vfs_create, cmd_vfs_create): New functions.
558 (register_commands): Add VFS_CREATE and CREAET.
560 2009-11-02 Marcus Brinkmann <marcus@g10code.de>
562 * debug.h (_gpgme_debug_buffer): Make TAG argument const const.
563 * debug.c (_gpgme_debug_buffer): Likewise.
564 * gpgme-tool.c (input_notify, output_notify): Adjust type to new
566 * decrypt.c (gpgme_op_decrypt_result): Remove unused variable.
567 * opassuan.c (gpgme_op_assuan_transact): Fix return value.
569 2009-10-30 Marcus Brinkmann <marcus@g10code.de>
571 * Makefile.am (noinst_PROGRAMS): New target gpgme-tool.
572 (gpgme_tool_LDADD): New variable.
573 * gpgme-tool.c: New file.
574 * ops.h (_gpgme_sig_notation_clearm _gpgme_signers_clear): New
576 * gpgme.c (gpgme_set_protocol): Allow GPGME_PROTOCOL_GPGCONF (when
577 had that gone missing?).
578 (_gpgme_sig_notation_clear): New function without debug output.
579 (gpgme_release): Call it and _gpgme_signers_clear.
580 * signers.c (_gpgme_signers_clear): New function without debug output.
581 * g13.c (gpgme_op_vfs_mount): Add debug output.
582 * assuan-support.c (my_spawn): Allow fd_child_list to be NULL.
583 * conversion.c (_gpgme_encode_percent_string): Fix infinite loop.
584 * debug.h: Put tag in front of debug lines, should make for nicer
586 * engine-assuan.c (llass_new): Use our new system hooks for libassuan.
587 * engine-g13.c (g13_new): Remove redundant assuan context allocation.
588 * version.c (gpgme_check_version_internal): Delay debug output
589 until after gpgme_check_version was called.
591 2009-10-28 Marcus Brinkmann <marcus@g10code.de>
593 * signers.c, encrypt-sign.c, encrypt.c, delete.c, keylist.c,
594 edit.c, import.c, export.c: Fix last change in debug output.
596 2009-10-27 Marcus Brinkmann <marcus@g10code.de>
598 * edit.c (gpgme_op_edit_start, gpgme_op_edit)
599 (gpgme_op_card_edit_start, gpgme_op_card_edit): Add debug output.
600 * encrypt-sign.c (gpgme_op_encrypt_sign_start)
601 (gpgme_op_encrypt_sign): Likewise.
602 * encrypt.c (gpgme_op_encrypt_start, gpgme_op_encrypt)
603 (gpgme_op_encrypt_result): Likewise.
604 * export.c (gpgme_op_export_start, gpgme_op_export)
605 (gpgme_op_export_ext_start, gpgme_op_export_ext)
606 (gpgme_op_export_keys_start, gpgme_op_export_keys): Likewise.
607 * genkey.c (gpgme_op_genkey_start, gpgme_op_genkey)
608 (gpgme_op_genkey_result): Likewise.
609 * getauditlog.c (gpgme_op_getauditlog_start)
610 (gpgme_op_getauditlog): Likewise.
611 * import.c (gpgme_op_import_result, gpgme_op_import_start)
612 (gpgme_op_import): Likewise.
613 * keylist.c (gpgme_op_keylist_result, keylist_colon_handler)
614 (gpgme_op_keylist_start, gpgme_op_keylist_ext_start)
615 (gpgme_op_keylist_next, gpgme_op_keylist_end, gpgme_get_key): Likewise.
616 * opassuan.c (gpgme_op_assuan_transact_start)
617 (gpgme_op_assuan_transact_ext, gpgme_op_assuan_result)
618 (gpgme_op_assuan_transact): Likewise.
619 * signers.c (gpgme_signers_add, gpgme_signers_clear): Likewise.
620 * trustlist.c (gpgme_op_trustlist_start)
621 (gpgme_op_trustlist_next, gpgme_op_trustlist_end): Likewise.
622 * verify.c (gpgme_op_verify_start, gpgme_op_verify)
623 (gpgme_op_verify_result): Likewise.
625 2009-10-26 Marcus Brinkmann <marcus@g10code.de>
627 * gpgme.h.in (struct gpgme_io_event_done_data)
628 (gpgme_io_event_done_data_t): New types.
629 (struct _gpgme_op_assuan_result): Deprecate the err member.
630 (gpgme_op_assuan_result): Deprecate (for now).
631 (gpgme_op_assuan_transact_ext): New prototype.
632 (gpgme_op_assuan_transact): Deprecate.
633 (struct _gpgme_op_g13_result): Replace with ...
634 (struct _gpgme_op_vfs_mount_result): ... this.
635 (gpgme_op_g13_mount): Replace with ...
636 (gpgme_op_vfs_mount): ... this.
637 * gpgme.def (gpgme_op_assuan_transact_ext, gpgme_wait_ext)
638 (gpgme_op_vfs_mount_result, gpgme_op_vfs_mount): New.
639 (gpgme_op_g13_mount): Remove.
640 * libgpgme.vers: Likewise.
641 * engine-backend.h (struct engine_ops): Remove RESULT_CB and
642 RESULT_CB_VALUE args in opassuan_transact member. Add CANCEL_OP
644 * ops.h (_gpgme_cancel_with_err, _gpgme_wait_on_condition): Add
646 (_gpgme_wait_one_ext): New prototype.
647 * context.h (ctx_op_data_id_t): Add OPDATA_VFS_MOUNT.
648 * engine-g13.c (g13_cancel_op): New function.
649 (parse_status): Remove declaration.
650 (g13_assuan_simple_command): Do nothing with status lines for now.
651 (status_handler): Update opaque value access.
652 (_gpgme_engine_ops_g13): Add new cancel_op member.
653 * gpgme.c (_gpgme_cancel_with_err): Add new parameter OP_ERR.
654 Handle operational errors.
655 (gpgme_cancel, gpgme_io_read, gpgme_io_write): Add debug output.
656 * data.c (_gpgme_data_inbound_handler)
657 (_gpgme_data_outbound_handler): Adjust opaque value access.
658 * engine-gpg.c (command_handler, status_handler)
659 (colon_line_handler): Likewise.
660 * engine-gpgsm.c (status_handler): Likewise.
661 * engine-gpg.c (_gpgme_engine_ops_gpg): Add cancel_op member.
662 * engine-gpgsm.c (_gpgme_engine_ops_gpgsm): Likewise.
663 * g13.c: Rewritten (and will be rewritten again).
664 * engine.h (_gpgme_engine_op_assuan_transact): Remove result_cb
665 and result_cb_value parameters from prototype.
666 (_gpgme_engine_cancel_op): New prototype.
667 * engine.c (engine_ops) [! ENABLE_ASSUAN]: Add missing comma.
668 (_gpgme_engine_op_assuan_transact): Remove result_cb and
669 result_cb_value parameter.
670 (_gpgme_engine_cancel_op): New function.
671 * wait.h (_gpgme_run_io_cb): Add new argument OP_ERR.
672 (struct io_cb_data): New struct to pass opaque data and get a
673 op_err return value. Needed because we can't modify I/O callback
674 handler signature because it is exposed to the user.
675 * wait.c (_gpgme_run_io_cb): Add OP_ERR parameter. Handle
677 * wait-user.c (_gpgme_user_io_cb_handler): Handle operational
679 * wait-private.c (_gpgme_wait_on_condition): New argument to
680 retrieve the operational result. Handle operational errors in
681 session based protocols.
682 (_gpgme_wait_one_ext): New function.
683 (_gpgme_wait_one): Pass argument in invocation of
684 _gpgme_wait_on_condition.
685 * wait-global.c (struct ctx_list_item): Add member OP_ERR.
686 (ctx_done): New argument OP_ERR.
687 (ctx_wait): New argument OP_ERR.
688 (gpgme_wait_ext): New function based on gpgme_wait but handling
690 (gpgme_wait): Implement in term of gpgme_wait_ext.
691 * keylist.c (gpgme_op_keylist_next): Pass argument in invocation
692 of _gpgme_wait_on_condition.
693 * trustlist.c (gpgme_op_trustlist_next): Pass argument in
694 invocation of _gpgme_wait_on_condition.
695 * engine-assuan.c (struct engine_llass): Replace members RESULT_CB
696 and RESULT_CB_VALUE by LAST_OP_ERR.
697 (_gpgme_engine_assuan_last_op_err): Add this hack function.
698 (llass_cancel_op): New function.
699 (_gpgme_engine_llass_ops): Add cancel_op member.
700 (llass_status_handler): Update opaque value access.
701 (llass_transact): Remove RESULT_CB and RESULT_CB_VALUE arguments.
702 * opassuan.c: Move compat hacks to the end of file.
703 (opassuan_start): Do not set OPD->result.err.
704 Do not pass RESULT_Cb and CTX to _gpgme_engine_op_assuan_transact.
705 (gpgme_op_assuan_transact_ext): New function.
707 * debug.h (DEBUG_GLOBAL): New debug level.
708 * conversion.c (gnupg_errors, _gpgme_map_gnupg_error): Removed.
709 * data-user.c (gpgme_data_new_from_cbs): Add debug output.
710 * data-fd.c (gpgme_data_new_from_fd): Likewise.
711 * data-stream.c (gpgme_data_new_from_stream): Likewise.
712 * decrypt.c (gpgme_op_decrypt_result, gpgme_op_decrypt_start)
713 (gpgme_op_decrypt): Likewise.
714 * delete.c (gpgme_op_delete_start, gpgme_op_delete): Likewise.
715 * decrypt-verify.c (gpgme_op_decrypt_verify_start)
716 (gpgme_op_decrypt_verify): Likewise.
717 * sign.c (gpgme_op_sign_result): Fix debug message.
718 * data-mem.c (gpgme_data_new): Improve debug output.
719 * verify.c (parse_trust): Use atoi instead of
720 _gpgme_map_gnupg_error.
721 * decrypt.c (_gpgme_decrypt_status_handler): Likewise.
723 2009-10-22 Marcus Brinkmann <marcus@g10code.de>
725 * Makefile.am: Remove @NETLIBS@ from LIBADDs.
726 (g13_components): New variable.
727 (main_sources): Add $(g13_components).
728 * g13.c, engine-g13.c: New files.
729 * engine.c (engine_ops): Check for assuan for assuan engine, add
731 * util.h (_gpgme_get_g13_path, _gpgme_encode_percent_string): New
733 * conversion.c (_gpgme_encode_percent_string): New function.
734 * gpgme.h.in (gpgme_protocol_t): Add GPGME_PROTOCOL_G13.
735 (struct _gpgme_op_g13_result, gpgme_g13_result_t): New types.
736 (gpgme_op_g13_mount): New function.
737 * gpgme.def, libgpgme.vers: Add gpgme_op_g13_mount.
738 * gpgme.c (gpgme_set_protocol): Allow GPGME_PROTOCOL_G13.
739 (gpgme_get_protocol_name): Add GPGME_PROTOCOL_G13.
740 * posix-util.c (_gpgme_get_g13_path): New function.
741 * w32-util.c (_gpgme_get_g13_path): New function.
742 * engine-backend.h (_gpgme_engine_ops_g13): New declaration.
744 2009-10-20 Marcus Brinkmann <marcus@g10code.de>
746 * gpgme-config.in (netlibs): Remove.
747 (assuan_cflags, assuan_libs): Add.
749 * Makefile.am (assuan_cppflags, assuan_libobjs): Removed.
750 (gpgsm_components): Move engine-assuan.c to ...
751 (assuan_components): ... this new variable.
752 (main_sources): Add this new variable.
753 (AM_CPPFLAGS): Remove $(assuan_cppflags).
754 (AM_CFLAGS): Add @LIBASSUAN_CFLAGS@.
755 (libgpgme_la_DEPENDENCIES, libgpgme_pth_la_DEPENDENCIES)
756 (libgpgme_glib_la_DEPENDENCIES, libgpgme_qt_la_DEPENDENCIES)
757 (libgpgme_pthread_la_DEPENDENCIES): Remove $(assuan_libobjs).
758 (libgpgme_la_LIBADD, libgpgme_pth_la_LIBADD)
759 (libgpgme_glib_la_LIBADD, libgpgme_qt_la_LIBADD))
760 (libgpgme_pthread_la_LIBADD): Replace $(assuan_libobjs) by
762 * priv-io.h [!HAVE_W32_SYSTEM]: Declare _gpgme_io_recvmsg,
763 _gpgme_io_sendmsg, _gpgme_io_waitpid.
764 * engine-backend.h: Define with [ENABLE_ASSUAN] instead
766 * posix-io.c (_gpgme_io_waitpid): Make non-static.
767 * util.h (ENABLE_ASSUAN): Declar _gpgme_assuan_system_hooks,
768 _gpgme_assuan_malloc_hooks, _gpgme_assuan_log_cb.
769 * engine-gpgsm.c: Don't map assuan error codes. Use
770 assuan_release instead of assuan_disconnect.
771 (map_assuan_error): Remove function.
772 (gpgsm_new): Use new assuan context interface.
773 * engine-assuan.c: Use assuan_release instead of
775 (llass_new): Use new assuan context interface.
777 2009-10-07 <wk@g10code.com>
779 * priv-io.h [W32]: Include windows.h instead of sys/socket.h.
781 2009-08-06 Werner Koch <wk@g10code.com>
783 * op-support.c (_gpgme_parse_inv_recp): Allow for no fingerprint.
785 * engine-gpgsm.c (gpgsm_sign): Hook up the status func for the
787 * gpgme.h.in (GPGME_STATUS_INV_SGNR, GPGME_STATUS_NO_SGNR): New.
788 * sign.c (op_data_t): Add fields IGNORE_INV_RECP and INV_SGNR_SEEN.
789 (_gpgme_op_sign_init_result): Factor code out to ...
790 (sign_init_result): .. new. Init new fields.
791 (sign_start): Use sign_init_result.
792 (_gpgme_sign_status_handler): Take care of the new INV_SGNR.
793 Return an error if no signature has been created.
795 2009-07-07 Werner Koch <wk@g10code.com>
797 * engine-gpgsm.c (struct engine_gpgsm): Add fields
798 input_helper_data and input_helper_memory.
799 (close_notify_handler): Release these new fields.
800 (gpgsm_import): Implement the keyarray feature.
802 * engine-gpg.c (gpg_import): Actually return GPG_ERR_INV_VALUE.
804 * engine-gpgsm.c (gpgsm_import): Return an error for unknown data
807 2009-06-22 Marcus Brinkmann <marcus@g10code.de>
809 * debug.h: Everywhere, use %p instead of 0x%x to print pointer.
810 [HAVE_STDINT_H]: Include <stdint.h>.
811 (_TRACE, TRACE, TRACE0, TRACE1, TRACE2, TRACE3, TRACE6): Cast tag
812 to (uintptr_t) before casting it to (void*) to silence GCC
815 * gpgme.h.in (_GPGME_DEPRECATED_OUTSIDE_GPGME): New macro.
816 * sign.c (_GPGME_IN_GPGME): Define it.
817 * keylist.c (_GPGME_IN_GPGME): Define it.
819 * debug.c (_gpgme_debug_begin, _gpgme_debug_add): Handle error in
820 vasprintf and asprintf.
822 * priv-io.h: Include <sys/socket.h>. Declare _gpgme_io_connect.
824 2009-06-18 Marcus Brinkmann <marcus@g10code.de>
826 * gpgme.h.in (GPGME_CONF_PATHNAME): Revert last change, it's
827 back! (GPA still uses it...).
829 * gpgme.def: Fix stupid typo.
830 * w32-io.c (_gpgme_io_pipe): Add missing declaration.
832 * gpgme.h.in (GPGME_CONF_PATHNAME): Remove obsolete macro.
834 * w32-io.c (_gpgme_io_pipe): Allocate reader/writer thread right
836 (_gpgme_io_read, _gpgme_io_write, _gpgme_io_select)
837 (_gpgme_io_dup): Never allocate threads here.
838 (find_writer, find_reader): Check return value of thread creation
841 * context.h (CTX_OP_DATA_MAGIC): New macro.
842 (struct ctx_op_data): New member MAGIC.
843 * op-support.c (_gpgme_op_data_lookup): Initialize magic.
844 * gpgme.c (gpgme_result_unref, gpgme_result_ref): Check magic.
846 2009-06-16 Marcus Brinkmann <marcus@g10code.de>
848 * gpgme.c (gpgme_result_unref): Hot fix to release a lock.
850 * gpgme.c (result_ref_lock): New global variable.
851 (gpgme_result_ref, gpgme_result_unref): use it.
853 2009-06-16 Werner Koch <wk@g10code.com>
855 * version.c: Include stdlib.h.
857 * gpgme.h.in (gpgme_data_encoding_t): Add GPGME_DATA_ENCODING_URL,
858 GPGME_DATA_ENCODING_URLESC, GPGME_DATA_ENCODING_URL0.
859 * data.c (gpgme_data_set_encoding): Adjust for new values.
860 * engine-gpg.c (string_from_data): New.
861 (gpg_import): Implement --fetch-key feature.
863 * gpgme.h.in (gpgme_op_export_keys_start, gpgme_op_export_keys): New.
864 * gpgme.def, libgpgme.vers: Add them.
865 * export.c (gpgme_op_export_keys_start, gpgme_op_export_keys): New.
866 (export_keys_start): New.
868 * gpgme.h.in (gpgme_export_mode_t, GPGME_EXPORT_MODE_EXTERN): New.
869 (gpgme_op_export_start, gpgme_op_export, gpgme_op_export_ext_start)
870 (gpgme_op_export_ext): Change arg RESERVED to MODE of new
872 * export.c (gpgme_export_ext_start, gpgme_op_export)
873 (gpgme_op_export_ext_start, gpgme_op_export_ext): Ditto.
874 (export_start): Ditto.
875 * engine.c (_gpgme_engine_op_export): Ditto.
876 * engine-backend.h (struct engine_ops): Ditto.
877 * engine-gpgsm.c (gpgsm_export, gpgsm_export_ext): Ditto.
878 * engine-gpg.c (gpg_export, gpg_export_ext): Ditto. Implement
880 (gpg_export, gpg_export_ext): Factor common code out to ..
881 (export_common): .. this.
883 * gpgme.h.in (gpgme_op_import_keys_start, gpgme_op_import_keys): New.
884 * gpgme.def, libgpgme.vers: Add them.
885 * import.c (gpgme_op_import_keys_start, gpgme_op_import_keys): New.
886 (_gpgme_op_import_keys_start): New.
887 * engine.c (_gpgme_engine_op_import): Add arg KEYARRAY.
888 * engine-backend.h (struct engine_ops): Ditto.
889 * engine-gpgsm.c (gpgsm_import): Ditto. Not functional.
890 * engine-gpg.c (gpg_import): Ditto. Implement it.
892 2009-06-15 Marcus Brinkmann <marcus@g10code.de>
894 * gpgme.h.in (gpgme_result_ref, gpgme_result_unref): Add
896 * gpgme.def, libgpgme.vers (gpgme_result_ref, gpgme_result_unref):
898 * context.h (struct ctx_op_data): Add member "references".
899 * gpgme.c (gpgme_result_ref, gpgme_result_unref): New functions.
900 (_gpgme_release_result): Use gpgme_result_unref.
901 * op-support.c (_gpgme_op_data_lookup): Initialize references.
903 2009-06-12 Werner Koch <wk@g10code.com>
905 * gpgme-w32spawn.c (translate_get_from_file): Parse optional spawn
906 flags. Add new arg R_FLAGS. Fix segv on file w/o LF.
907 (translate_handles): Add new arg R_FLAGS. Avoid possible segv.
908 (main): Pass flags for my_spawn.
909 (my_spawn): Add arg FLAGS and implement AllowSetForegroundWindow.
911 * priv-io.h (IOSPAWN_FLAG_ALLOW_SET_FG): New.
912 * w32-io.c (_gpgme_io_spawn): Add arg FLAGS and implement it.
913 * w32-glib-io.c (_gpgme_io_spawn): Ditto.
914 * w32-qt-io.cpp (_gpgme_io_spawn): Ditto.
915 * posix-io.c (_gpgme_io_spawn): Add dummy arg FLAGS.
916 * engine-gpg.c (start): Call spawn with new flag.
918 * w32-util.c (_gpgme_allow_set_foregound_window): Rename to
919 _gpgme_allow_set_foreground_window. Change all callers.
920 * posix-util.c (_gpgme_allow_set_foreground_window): Ditto.
922 2009-06-10 Werner Koch <wk@g10code.com>
924 * w32-util.c (_gpgme_allow_set_foregound_window): Add trace support.
926 2009-06-09 Werner Koch <wk@g10code.com>
928 * engine-gpg.c (gpg_io_event): Test for cmd.fd.
930 * version.c (gpgme_check_version_internal): Make result const.
932 * gpgme.c: Include priv-io.h.
933 (gpgme_io_read, gpgme_io_write): New.
934 * libgpgme.vers (GPGME_1.1): Add them.
937 * Makefile.am (main_sources): Remove gpgme.h.
938 (include_HEADERS): Rename to nodist_include_HEADERS so that a
939 VPATH build won't use the distributed one.
941 * util.h (GPG_ERR_NOT_OPERATIONAL): Define.
943 2009-05-28 Marcus Brinkmann <marcus@g10code.de>
945 * gpgme.h.in (gpgme_check_version_internal): New prototype.
946 (gpgme_check_version): New macro, overriding function of the same
948 * libgpgme.vers, gpgme.def: Add gpgme_check_version_internal.o
949 * context.h (_gpgme_selftest): New variable declaration.
950 * version.c: Include "context.h".
951 (gpgme_check_version): Set _gpgme_selftest on success.
952 (gpgme_check_version_internal): New function.
953 * gpgme.c (_gpgme_selftest): Define it.
954 (gpgme_new): Check the selftest result.
956 2009-05-18 Marcus Brinkmann <marcus@g10code.de>
958 * gpgme.h.in (gpgme_encrypt_flags_t): Add
959 GPGME_ENCRYPT_NO_ENCRYPT_TO.
960 * engine-gpg.c (gpg_encrypt): Pass --no-encrypt-to to gpg if
961 GPGME_ENCRYPT_NO_ENCRYPT_TO flag is set.
963 2009-05-14 Werner Koch <wk@g10code.com>
965 * gpgme.h.in (gpgme_status_code_t): Explicitly initialize for
966 better maintainability and to help debugging.
968 2009-05-05 Marcus Brinkmann <marcus@g10code.de>
970 * gpgme.h.in: Add compile time check for _FILE_OFFSET_BITS.
972 2009-04-15 Marcus Brinkmann <marcus@g10code.de>
974 * posix-io.c (_gpgme_io_socket, _gpgme_io_connect): New functions.
975 * w32-io.c (_gpgme_io_connect): Fix stupid error.
977 2009-04-08 Marcus Brinkmann <marcus@g10code.de>
979 * w32-glib-io.c (giochannel_table): New members used, fd, socket.
980 (find_channel): Drop CREATE argument.
981 (new_dummy_channel_from_fd, new_channel_from_fd)
982 (new_channel_from_socket): New functions.
983 (_gpgm_io_fd2str): Implement for sockets.
984 (_gpgme_io_write, _gpgme_io_read): Translate EAGAIN errors
986 (_gpgme_io_pipe): Fix for new channel bookkeeping.
987 (_gpgme_io_close, _gpgme_io_dup): Likewise.
988 (wsa2errno, _gpgme_io_socket, _gpgme_io_connect): New.
989 * w32-io.c (MAX_READERS, MAX_WRITERS): Bump up to 40.
990 (wsa2errno, _gpgme_io_socket, _gpgme_io_connect): New.
991 * w32-qt-io.cpp (_gpgme_io_socket, _gpgme_io_connect): New stubs.
992 * version.c [HAVE_W32_SYSTEM]: Include "windows.h.
993 (do_subsystem_inits) [HAVE_W32_SYSTEM]: Call WSAStartup.
994 * engine-assuan.c (llass_status_handler): Ignore EAGAIN errors.
996 2009-03-18 Werner Koch <wk@g10code.com>
998 * gpgme.h.in (GPGME_KEYLIST_MODE_EPHEMERAL): New.
999 * engine-gpgsm.c (gpgsm_keylist): Send new option.
1001 2009-03-13 Werner Koch <wk@g10code.com>
1003 * gpgme-config.in: Make sure locale is set to C.
1005 2009-02-24 Werner Koch <wk@g10code.com>
1007 * gpgme.h.in (struct _gpgme_op_assuan_result): New.
1008 (gpgme_assuan_result_t): New.
1009 (gpgme_op_assuan_result): Change return type.
1010 (struct _gpgme_assuan_sendfnc_ctx)
1011 (gpgme_assuan_sendfnc_ctx_t, gpgme_assuan_sendfnc_t):Remove.
1012 (gpgme_assuan_inquire_cb_t): Changed.
1013 * opassuan.c (op_data_t): Make use of a result structure.
1014 (gpgme_op_assuan_result): Change return type.
1015 (opassuan_start): Use result structure.
1017 * engine-assuan.c (struct _gpgme_assuan_sendfnc_ctx): Remove.
1018 (inquire_cb_sendfnc): Remove.
1019 (inquire_cb): Change for new callback scheme. Not yet finished.
1020 (llass_status_handler): Allow sending a CANCEL from the inquire CB.
1022 2009-02-04 Werner Koch <wk@g10code.com>
1024 * w32-glib-io.c (_gpgme_io_spawn): Make ARGV argument const to
1026 * w32-qt-io.cpp (_gpgme_io_spawn): Ditto.
1028 2009-02-03 Werner Koch <wk@g10code.com>
1030 * gpgme.h.in (struct _gpgme_subkey): Add fields IS_CARDKEY and
1032 * key.c (gpgme_key_unref): Release field CARD_NUMBER.
1033 * keylist.c (keylist_colon_handler): Factor common code out to ...
1034 (parse_sec_field15): New. Set card number.
1036 2009-01-26 Werner Koch <wk@g10code.com>
1038 * opassuan.c, dirinfo.c, engine-assuan.c: New.
1039 * Makefile.am: Add them.
1040 * engine-backend.h: Add _gpgme_engine_ops_assuan.
1041 (struct engine_ops): Add field OPASSUAN_TRANSACT. Update all
1043 * Makefile.am (gpgsm_components): Add engine-assuan.c.
1044 * gpgme.h.in (gpgme_protocol_t): Add GPGME_PROTOCOL_ASSUAN.
1045 (gpgme_assuan_data_cb_t, gpgme_assuan_sendfnc_ctx_t)
1046 (gpgme_assuan_inquire_cb_t, gpgme_assuan_status_cb_t): New.
1047 (gpgme_op_assuan_transact_start, gpgme_op_assuan_transact): New.
1048 * gpgme.c (gpgme_get_protocol_name): Ditto.
1049 (gpgme_set_protocol): Support it.
1050 * engine.c (gpgme_get_engine_info): Ditto.
1051 (engine_ops): Register it.
1052 (_gpgme_engine_op_assuan_transact): New.
1053 * libgpgme.vers (gpgme_op_assuan_transact_start)
1054 (gpgme_op_assuan_transact): New.
1055 * gpgme.def (gpgme_op_assuan_transact_start)
1056 (gpgme_op_assuan_transact): New.
1057 * engine-backend.h (struct engine_ops): Add GET_HOME_DIR and
1058 initialize to NULL for all engines.
1059 * engine.c (engine_get_home_dir): New.
1060 (gpgme_get_engine_info): Use it.
1061 (_gpgme_set_engine_info): Use it.
1062 * engine.h (engine_assuan_result_cb_t): New.
1063 * context.h (ctx_op_data_id_t): Add OPDATA_ASSUAN.
1065 * util.h (GPG_ERR_UNFINISHED): Define if not yet defined.
1067 * version.c (gpgme_check_version): Protect trace arg against NULL.
1069 2009-01-19 Werner Koch <wk@g10code.com>
1071 * rungpg.c: Rename to engine-gpg.c
1072 * Makefile.am (main_sources): Ditto.
1074 2008-12-03 Marcus Brinkmann <marcus@g10code.de>
1076 * Makefile.am (status-table.h): Use $(builddir) to find gpgme.h.
1078 2008-11-18 Werner Koch <wk@g10code.com>
1080 * version.c (do_subsystem_inits): Always initialize I/O
1081 subsystem. Fixes regression from 2007-08-02.
1083 * decrypt.c (_gpgme_decrypt_status_handler): Use
1084 _gpgme_map_gnupg_error to parse the error code for decrypt.algorithm.
1086 2008-10-30 Marcus Brinkmann <marcus@g10code.de>
1088 * wait-private.c (_gpgme_wait_on_condition): Remove unused
1090 * wait-global.c: Include ops.h to silence gcc warning.
1091 (_gpgme_wait_global_event_cb): Pass error value directly.
1092 * wait-user.c: Include ops.h to silence gcc warning.
1094 * posix-io.c (_gpgme_io_spawn): Make ARGV argument const to
1095 silence gcc warning. Cast argument to execv to silence warning.
1096 * w32-io.c (_gpgme_io_spawn): Likewise.
1097 * priv-io.h (_gpgme_io_spawn): Likewise for prototype.
1099 2008-10-24 Werner Koch <wk@g10code.com>
1101 * rungpg.c (gpg_keylist_preprocess): Escape backslashes too.
1103 2008-10-23 Marcus Brinkmann <marcus@g10code.de>
1105 * rungpg.c (gpg_keylist_preprocess): Convert percent escaped
1106 string to C coded string.
1108 2008-10-20 Werner Koch <wk@g10code.com>
1110 * Makefile.am (EXTRA_DIST): Add gpgme.h.in.
1112 * gpgme.h: Rename to gpgme.h.in.
1113 * gpgme.h.in (GPGME_VERSION): Use autoconf substitution.
1115 * posix-io.c: Include sys/uio.h. Fixes bug #818.
1117 2008-10-18 Marcus Brinkmann <marcus@g10code.com>
1119 * w32-util.c (find_program_in_registry): Don't define.
1120 (_gpgme_get_gpg_path, _gpgme_get_gpgsm_path)
1121 (_gpgme_get_gpgconf_path): Do not check for fooProgram in the
1122 registry anymore. It is now no longer possible to overwrite the
1123 default location in that way.
1125 2008-10-17 Werner Koch <wk@g10code.com>
1127 * w32-glib-io.c (_gpgme_io_fd2str): Use "%d" and not "%ld" to work
1128 around a bug in mingw32.
1130 2008-09-23 Marcus Brinkmann <marcus@g10code.com>
1132 * gpgme.c (gpgme_sig_notation_clear): Clear CTX->sig_notations.
1133 Submitted by "Daniel Mueller" <daniel@danm.de>
1135 2008-09-16 Marcus Brinkmann <marcus@g10code.com>
1137 * rungpg.c (gpg_new): Don't use errno with ttyname_r.
1139 2008-08-11 Marcus Brinkmann <marcus@g10code.com>
1141 * rungpg.c (gpg_cancel): Remove cmd fd before status fd.
1142 * gpgme.c (_gpgme_cancel_with_err): New function.
1143 (gpgme_cancel): Reimplement in terms of _gpgme_cancel_with_err.
1144 * wait-private.c (_gpgme_wait_on_condition): Use
1145 _gpgme_cancel_with_err.
1146 * wait-user.c (_gpgme_user_io_cb_handler): Likewise.
1147 * wait-global.c (_gpgme_wait_global_event_cb, gpgme_wait): Likewise.
1149 2008-08-08 Marcus Brinkmann <marcus@g10code.com>
1151 * rungpg.c (command_handler): Remove I/O callback on error, too.
1153 2008-06-29 Marcus Brinkmann <marcus@g10code.com>
1155 * gpgme.c (gpgme_cancel_async): Remove unused variable.
1157 2008-06-27 Marcus Brinkmann <marcus@g10code.de>
1159 * libgpgme.vers: Add gpgme_cancel_async.
1160 * gpgme.def: Likewise.
1162 * context.h: Include "sema.h".
1163 (struct gpgme_context): New members lock and canceled.
1164 * gpgme.c (gpgme_new): Initialize lock.
1165 (gpgme_release): Destroy lock.
1166 (gpgme_cancel_async): New function.
1167 * op-support.c (_gpgme_op_reset): Reset the canceled flag.
1168 * wait-global.c (gpgme_wait): Check cancel flag before processing
1170 * wait-private.c (_gpgme_wait_on_condition): Likewise.
1171 * wait-user.c (_gpgme_user_io_cb_handler): Likewise.
1173 2008-06-26 Werner Koch <wk@g10code.com>
1175 * w32-util.c (_gpgme_mkstemp): Replace sprint by stpcpy.
1176 (mkstemp): Need to use GetSystemTimeAsFileTime for better
1179 2008-06-25 Marcus Brinkmann <marcus@g10code.de>
1181 * gpgme-w32spawn.c: New file.
1182 * Makefile.am (libexec_PROGRAMS) [HAVE_W32_SYSTEM]: New variable
1183 with gpgme-w32spawn.
1184 * engine-gpgsm.c (gpgsm_new): Use server translated handles.
1185 (gpgsm_set_locale): Return early if locale value is NULL.
1186 * util.h (_gpgme_mkstemp)
1187 (_gpgme_get_w32spawn_path) [HAVE_W32_SYSTEM]: New function
1189 * w32-util.c: Include <stdint.h>, <sys/stat.h> and <unistd.h>.
1190 (letters, mkstemp, _gpgme_mkstemp, _gpgme_get_w32spawn_path): New
1192 * rungpg.c (gpg_decrypt, gpg_encrypt, gpg_encrypt_sign)
1193 (gpg_genkey, gpg_import, gpg_verify, gpg_sign): Pass data over
1194 special filename FD rather than stdin.
1195 (struct arg_and_data_s): Add member ARG_LOCP.
1196 (struct fd_data_map_s): Add member ARG_LOC.
1197 (struct engine_gpg): Add member ARG_LOC to status and colon.
1198 (_add_arg, add_arg_with_locp): New function.
1199 (add_arg_ext): Reimplement in terms of _add_arg.
1200 (gpg_new): Remember argument location for status FD.
1201 (build_argv): Set argument location if requested. Also set
1202 argument location of fd_data_map for data items.
1203 (start): Adjust caller of _gpgme_io_spawn.
1204 * priv-io.h (struct spawn_fd_item_s): Add members peer_name and
1206 (_gpgme_io_spawn): Remove parent fd list argument.
1207 * posix-io.c (get_max_fds): New function.
1208 (_gpgme_io_dup): Add tracing.
1209 (_gpgme_io_spawn): Remove parent fd list. Change meaning of child
1210 fd list to contain all child fds that should be inherited. Close
1211 all other file descriptors after fork.
1212 * w32-io.c, w32-glib-io.c, w32-qt-io.c(_gpgme_io_spawn): Remove
1213 parent fd list. Change meaning of child fd list to contain all
1214 child fds that should be inherited. Do not inherit any file
1215 descriptors, but DuplicateHandle them. Spawn process through
1216 wrapper process. Provide wrapper process with a temporary file
1217 containing handle translation data. Return translated handle
1219 * w32-io.c (reader): Add more tracing output.
1220 (_gpgme_io_read): Likewise.
1221 * engine-gpgconf.c (gpgconf_read): Adjust caller of
1223 * version.c (_gpgme_get_program_version): Likewise.
1225 2008-06-20 Werner Koch <wk@g10code.com>
1227 * engine-gpgconf.c (gpgconf_read): Change ARGV initialization for
1228 compatibility with old compilers. Fix amount of memmove. Fix
1231 2008-06-19 Werner Koch <wk@g10code.com>
1233 * gpgme.h (GPGME_CONF_PATHNAME): Replace by GPGME_CONF_FILENAME,
1234 change all callers and provide compatibilty macro.
1235 (gpgme_conf_type_t): Add complex types 34..37.
1236 * engine-gpgconf.c (gpgconf_parse_option, arg_to_data)
1237 (_gpgme_conf_arg_new, _gpgme_conf_arg_release): Add new types.
1239 2008-06-19 Marcus Brinkmann <marcus@g10code.de>
1241 * engine-gpgconf.c (gpgconf_parse_option): Fix comma detection.
1243 2008-05-09 Werner Koch <wk@g10code.com>
1245 * engine-gpgconf.c (gpgconf_read): Do not pass empty lines to the
1248 2008-05-07 Werner Koch <wk@g10code.com>
1250 * engine-gpgconf.c (gpgconf_write): Change argv[0] to a
1251 self-explaining string. Needs a proper fix, though.
1253 * rungpg.c (gpg_keylist, gpg_keylist_ext): Factor common code out
1255 (gpg_build_keylist_options): .. new. Allow combination of extern
1257 (gpg_new): DFT_TTYNAME is an array, thus check the first character.
1259 2008-05-06 Werner Koch <wk@g10code.com>
1261 * version.c (extract_version_string): New.
1262 (_gpgme_get_program_version): Use it to allow for suffixes in the
1265 2008-04-28 Werner Koch <wk@g10code.com>
1267 * engine-gpgconf.c (gpgconf_read): Fixed segv. Avoid memmove for
1270 2008-04-22 Marcus Brinkmann <marcus@g10code.de>
1272 * w32-qt-io.cpp, kdpipeiodevice.cpp: New versions from Frank
1273 Osterfeld, implement blocking select.
1275 2008-03-11 Marcus Brinkmann <marcus@g10code.de>
1277 * data.c (gpgme_data_read, gpgme_data_write): Retry on EINTR.
1279 2008-03-06 Marcus Brinkmann <marcus@g10code.de>
1281 * key.c (_gpgme_key_add_sig): Terminate UID in case SRC is NULL.
1282 Reported by Marc Mutz.
1284 2008-03-05 Marcus Brinkmann <marcus@g10code.de>
1286 * decrypt.c (release_op_data): Release OPD->result.recipients.
1287 * encrypt.c (release_op_data): Release invalid_recipient.
1289 2008-02-15 Marcus Brinkmann <marcus@g10code.de>
1291 * engine-gpgconf.c (gpgconf_read): Fix end-of-line handline.
1293 2008-02-14 Werner Koch <wk@g10code.com>
1295 * w32-io.c (_gpgme_io_spawn): Add arg R_PID to return the pid.
1296 * posix-io.c (_gpgme_io_spawn): Ditto.
1297 * w32-glib-io.c (_gpgme_io_spawn): Ditto.
1298 * w32-qt-io.cpp (_gpgme_io_spawn): Ditto.
1299 * priv-io.h (_gpgme_io_spawn): Adjust prototyp and change all callers.
1300 * rungpg.c (start): Call _gpgme_allow_set_foregound_window.
1302 * w32-util.c (_gpgme_allow_set_foregound_window): New.
1303 * posix-util.c (_gpgme_allow_set_foregound_window): New.
1304 * engine-gpgsm.c (default_inq_cb): New.
1305 (gpgsm_new) [W32]: Enable pinentry notifications.
1306 (status_handler): Handle inquiries.
1308 2008-01-30 Marcus Brinkmann <marcus@g10code.de>
1310 * kdpipeiodevice.cpp: New version by Frank Osterfeld, fixes race
1313 2008-01-28 Marcus Brinkmann <marcus@g10code.de>
1315 * engine-gpgsm.c (map_input_enc): Rename to ...
1316 (map_data_enc): ... this. Also change all callers.
1317 (gpgsm_encrypt, gpgsm_export, gpgsm_export_ext, gpgsm_genkey)
1318 (gpgsm_sign): Set encoding for output.
1320 2008-01-28 Werner Koch <wk@g10code.com>
1322 * keylist.c (gpgme_get_key): Skip duplicated keys. Fixes bug 876.
1324 2008-01-14 Marcus Brinkmann <marcus@g10code.de>
1326 * engine-gpgconf.c (gpgconf_config_load_cb): Fix program_name
1329 2008-01-10 Marcus Brinkmann <marcus@g10code.de>
1331 * kdpipeiodevice.cpp: New version from Frank Osterfeld.
1333 * engine-gpgconf.c (gpgconf_config_load_cb2): Handle the flag
1336 2008-01-04 Marcus Brinkmann <marcus@g10code.de>
1338 * Makefile.am (gpgconf_components): New variable.
1339 (main_sources): Add gpgconf.c.
1340 * gpgme.h (gpgme_protocol_t): New protocol GPGME_PROTOCOL_GPGCONF.
1341 (gpgme_conf_level_t, gpgme_conf_type_t, gpgme_conf_arg_t)
1342 (gpgme_conf_opt_t, gpgme_conf_comp_t, gpgme_conf_arg_new)
1343 (gpgme_conf_arg_release, gpgme_conf_opt_change)
1344 (gpgme_conf_release, gpgme_op_conf_load, gpgme_op_conf_save): New
1346 * gpgconf.c, engine-gpgconf.c: New files.
1347 * engine.h: (_gpgme_engine_op_conf_load,
1348 (_gpgme_engine_op_conf_save): New prototypes.
1349 * op-support.c (_gpgme_op_reset): Ignore not implemented locale
1351 * posix-util.c (_gpgme_get_gpgconf_path): New function.
1352 * w32-util.c (_gpgme_get_gpgconf_path): New function.
1354 (_gpgme_engine_ops_gpgsm): Add stubs for conf_load and conf_save.
1356 (_gpgme_engine_ops_gpg): Add stubs for conf_load and conf_save.
1357 * gpgme.def: Add new gpgconf related interfaces.
1358 * libgpgme.vers: Likewise.
1359 * util.h (_gpgme_get_gpgconf_path): New prototype.
1360 * gpgme.h (gpgme_protocol_t): Add GPGME_PROTOCOL_GPGCONF.
1361 * engine-backend.h (_gpgme_engine_ops_gpgconf): New prototype.
1362 (struct engine_ops): Add members for conf_load and conf_save.
1363 * engine.c (engine_ops): Add _gpgme_engine_ops_gpgconf.
1364 (_gpgme_engine_op_conf_load,
1365 (_gpgme_engine_op_conf_save): New functions.
1366 (gpgme_get_engine_info): Allow protocol GPGME_PROTOCOL_GPGCONF.
1368 2007-11-28 Marcus Brinkmann <marcus@g10code.de>
1370 * w32-util.c (_gpgme_get_gpg_path, _gpgme_get_gpgsm_path): Search
1371 for installation directory. Remove old fallback default.
1372 (find_program_in_inst_dir): New function.
1374 2007-11-26 Werner Koch <wk@g10code.com>
1376 * engine-gpgsm.c (struct engine_gpgsm): Add field INLINE_DATA and
1377 always reset it before calling start.
1378 (gpgsm_new): Clear it.
1379 (status_handler): Implement it.
1380 (gpgsm_getauditlog) [USE_DESCRIPTOR_PASSING]: Use INLINE_DATA.
1382 2007-11-23 Werner Koch <wk@g10code.com>
1384 * op-support.c (_gpgme_op_reset): Implement a no-reset flag.
1385 * getauditlog.c (getauditlog_start): Use that flag.
1387 2007-11-22 Werner Koch <wk@g10code.com>
1389 * gpgme.h (gpgme_op_getauditlog_start, gpgme_op_getauditlog): New.
1390 * libgpgme.vers: Ditto.
1392 * getauditlog.c: New.
1393 * engine-backend.h (struct engine_ops): Add member GETAUDITLOG.
1394 * engine-gpgsm.c (gpgsm_getauditlog): New.
1395 (_gpgme_engine_ops_gpgsm): Insert new function.
1396 (gpgsm_new): Try to enable audit log support.
1397 * rungpg.c (_gpgme_engine_ops_gpg): Insert dummy entry.
1399 2007-11-20 Werner Koch <wk@g10code.com>
1401 * op-support.c (_gpgme_parse_inv_recp): Add new reason code 11.
1403 2007-11-12 Marcus Brinkmann <marcus@g10code.de>
1405 * kdpipeiodevice.cpp: New version from Frank Osterfeld.
1407 2007-10-11 Marcus Brinkmann <marcus@g10code.de>
1409 * kdpipeiodevice.cpp: New version from Frank Osterfeld.
1411 2007-10-09 Marcus Brinkmann <marcus@g10code.de>
1413 * kdpipeiodevice.cpp: New version from Frank Osterfeld and Marc
1416 2007-10-05 Marcus Brinkmann <marcus@g10code.de>
1418 * kdpipeiodevice.cpp, w32-qt-io.cpp: New versions from Frank
1421 2007-10-04 Marcus Brinkmann <marcus@g10code.de>
1423 * kdpipeiodevice.h, kdpipeiodevice.cpp, kdpipeiodevice.moc,
1424 w32-qt-io.cpp: New versions from Frank Osterfeld.
1426 2007-10-02 Marcus Brinkmann <marcus@g10code.de>
1428 * kdpipeiodevice.cpp, kdpipeiodevice.moc: New versions.
1429 * w32-qt-io.cpp (_gpgme_io_fd2str): Print actual_fd if available.
1430 (_gpgme_io_dup): Only acquire a reference, do not actually dup.
1431 Submitted by Frank Osterfeld.
1433 * priv-io.h, engine-gpgsm.c: Add comments.
1434 * w32-qt-io.cpp (_gpgme_io_select): Remove code handling frozen FDs.
1435 * w32-glib-io.c (_gpgme_io_close): Always dereference the channel,
1436 even if not primary.
1437 (_gpgme_io_dup): Acquire a reference. Replace unused
1438 implementation by assertion.
1440 2007-09-28 Werner Koch <wk@g10code.com>
1442 * engine-gpgsm.c (iocb_data_t): Add SERVER_FD_STR.
1443 (gpgsm_new): Set it.
1444 (gpgsm_set_fd): Use it.
1446 * w32-glib-io.c (find_channel): Add a new primary flag.
1447 (_gpgme_io_close): Close channel only if primary.
1448 (_gpgme_io_dup): Put newfd into the table as shallow copy.
1450 * priv-io.h (struct io_select_fd_s): Remove member FROZEN.
1451 * w32-io.c (_gpgme_io_select): Ditto.
1452 * w32-glib-io.c (_gpgme_io_select): Ditto.
1454 * posix-io.c (_gpgme_io_select): Ditto.
1455 * rungpg.c (read_status): Ditto.
1456 * wait.c (fd_table_put): Ditto.
1458 * rungpg.c (gpg_io_event): Add tracing.
1459 (start): Use gpg_io_event for sending the start event.
1460 * engine-gpgsm.c (gpgsm_io_event): Add tracing.
1461 (start): Use gpgsm_io_event for sending the start event.
1462 * wait.c (_gpgme_add_io_cb, _gpgme_run_io_cb): Add tracing.
1464 2007-09-28 Marcus Brinkmann <marcus@g10code.de>
1466 * kdpipeiodevice.moc, w32-qt-io.cpp, kdpipeiodevice.cpp: New
1467 versions from Frank Osterfeld.
1469 2007-09-27 Marcus Brinkmann <marcus@g10code.de>
1471 * w32-glib-io.c (_gpgme_io_spawn),
1472 w32-qt-io.cpp (_gpgme_io_spawn), w32-io.c (_gpgme_io_spawn): Close
1473 the process handle, return 0.
1475 * gpgme.h (gpgme_protocol_t): Add GPGME_PROTOCOL_UNKNOWN.
1476 * gpgme.c (gpgme_get_protocol_name): Implement support for
1477 GPGME_PROTOCOL_UNKNOWN.
1479 * kdpipeiodevice.h: Fix last change.
1481 * w32-glib-io.c (_gpgme_io_pipe), w32-qt-io.c (_gpgme_io_pipe),
1482 w32-io.c (_gpgme_io_pipe), posix-io.c (_gpgme_io_pipe): Fix debug
1485 2007-09-25 Marcus Brinkmann <marcus@g10code.de>
1487 * conversion.c, keylist.c: Include <sys/types.h>.
1489 * kdpipeiodevice.h: Use namespace _gpgme_.
1490 * kdpipeiodevice.cpp: Use namespace _gpgme_.
1491 [Q_OS_WIN32 && NOMINMAX]: Do not define NOMINMAX again.
1492 * w32-qt-io.cpp: Change namespace of KDPipeIODevice to
1493 _gpgme_::KDPipeIODevice.
1495 2007-09-17 Werner Koch <wk@g10code.com>
1497 * rungpg.c (gpg_new): Make robust against undefined ttyname or
1500 2007-09-14 Werner Koch <wk@g10code.com>
1502 * data-mem.c (gpgme_data_release_and_get_mem): Fix tracing bug.
1504 2007-09-14 Marcus Brinkmann <marcus@g10code.de>
1506 * gpgme.c (gpgme_release): Call gpgme_sig_notation_clear.
1508 2007-09-13 Marcus Brinkmann <marcus@g10code.de>
1510 * rungpg.c (gpg_new): Handle return value of _gpgme_getenv (fixes
1513 2007-09-07 Marcus Brinkmann <marcus@g10code.de>
1515 * Makefile.am (libgpgme_qt_la_SOURCES): Move
1516 moc_kdpipeiodevice.cpp to EXTRA_DIST, as this is only included by
1517 another file (it's more like a header file than a cpp file, but
1518 automake doesn't know that).
1520 * w32-qt-io.cpp (_gpgme_io_spawn): Fix several cast errors and typos.
1521 * w32-io.c (_gpgme_io_write): Use TRACE_SYSRES instead of TRACE_SYS.
1522 (libgpgme_qt_la_LIBADD): Add QT4_CORE_LIBS, not QT4_CORE_LIB.
1524 * kdpipeiodevice.h, kdpipeiodevice.cpp, moc_kdpipeiodevice.cpp,
1525 kdpipeiodevice.moc, w32-qt-io.c: New files.
1526 * Makefile.am (ltlib_gpgme_extra): Rename to ltlib_gpgme_glib.
1527 (ltlib_gpgme_qt): New variable.
1528 (lib_LTLIBRARIES): Add $(ltlib_gpgme_qt).
1529 (libgpgme_qt_la_SOURCES): New variable.
1530 (AM_CPPFLAGS): Add @QT4_CORE_INCLUDES@
1531 (AM_CFLAGS): Add @QT4_CORE_CFLAGS@.
1532 (libgpgme_qt_la_LDFLAGS, libgpgme_qt_la_DEPENDENCIES)
1533 (libgpgme_qt_la_LIBADD): New variables.
1535 * sema.h (struct critsect_s): Rename "private" to "priv" to make
1536 C++ users happy. Change users.
1537 * posix-sema.c (_gpgme_sema_cs_enter, _gpgme_sema_cs_leave)
1538 (_gpgme_sema_cs_destroy): Likewise.
1539 * w32-sema.c (critsect_init, _gpgme_sema_cs_enter)
1540 (_gpgme_sema_cs_leave, _gpgme_sema_cs_destroy): Likewise.
1541 * w32-glib-io.c (gpgme_get_giochannel): Change return type to
1543 (gpgme_get_fdptr): New function.
1544 * w32-io.c (gpgme_get_fdptr): New function
1545 * gpgme.def: Add gpgme_get_fdptr.
1547 2007-08-22 Marcus Brinkmann <marcus@g10code.de>
1549 * w32-io.c (_gpgme_io_write): Return early if COUNT is zero.
1550 (writer): Remove superfluous check.
1552 2007-08-20 Marcus Brinkmann <marcus@g10code.de>
1554 * gpgme.h: Move include of gpg-error.h out of extern "C".
1556 2007-08-07 Werner Koch <wk@g10code.com>
1558 * gpgme.h (struct _gpgme_signature): Add member CHAIN_MODEL.
1559 * verify.c (parse_trust): Set Chain_MODEL.
1561 2007-08-02 Werner Koch <wk@g10code.com>
1563 * w32-glib-io.c (_gpgme_io_spawn): Use DETACHED_PROCESS flag.
1564 * w32-io.c (_gpgme_io_spawn): Ditto.
1565 (_gpgme_io_write): Map ERROR_NO_DATA to EPIPE.
1566 * debug.c (_gpgme_debug): Enable assuan logging.
1567 (_gpgme_debug_subsystem_init): New.
1568 * version.c (do_subsystem_inits): Disable assuan logging and
1569 initialize the debug system.
1570 (gpgme_check_version): Do not trace before the subsystems are
1573 2007-07-17 Marcus Brinkmann <marcus@g10code.de>
1575 * debug.c: Include <errno.h> and "debug.h".
1576 (_gpgme_debug): Save and restore ERRNO.
1578 (_gpgme_debug_buffer): New function.
1579 * conversion.c, data-compat.c, data-mem.c, data.c, engine-gpgsm.c,
1580 gpgme.c, keylist.c, posix-io.c, rungpg.c, sign.c, version.c,
1581 w32-io.c, wait.c: Replace DEBUG macros by TRACE_* variants. In
1582 most of these files, add many more tracepoints.
1584 2007-07-16 Marcus Brinkmann <marcus@g10code.de>
1586 * engine-gpgsm.c (status_handler): Do not send BYE here.
1588 * w32-io.c (struct reader_context_s, struct writer_context_s): New
1590 (create_reader, create_writer): Initialize C->refcount to 1.
1591 (destroy_reader, destroy_writer): Only destroy if C->refcount
1593 (find_reader, find_writer, kill_reader, kill_writer): Beautify.
1594 * priv-io.h (_gpgme_io_dup): New prototype.
1595 * posix-io.c (_gpgme_io_dup): New function.
1596 * w32-io.c (_gpgme_io_dup): Likewise.
1597 * w32-glib-io.c (_gpgme_io_dup): Likewise.
1598 * engine-gpgsm.c (start): Reverting to version 2007-07-10.
1600 2007-07-13 Marcus Brinkmann <marcus@g10code.de>
1602 * data-user.c (user_read, user_write, user_seek): Set errno and
1603 return -1 instead returning the error code directly.
1604 * data-compat.c (old_user_seek): Likewise.
1605 * gpgme.c (gpgme_sig_notation_add): Return error properly.
1607 * Revert the "close_notify_handler" returns int stuff. Always
1608 close in the _gpgme_io_close implementations.
1609 * engine-gpgsm.c (status_handler): Try to terminate the connection
1611 * w32-io.c (_gpgme_io_read): Return C->error_code in ERRNO.
1612 (_gpgme_io_write): Likewise.
1614 * priv-io.h (_gpgme_io_set_close_notify): Change type of HANDLER
1615 to _gpgme_close_notify_handler.
1616 (_gpgme_close_notify_handler): New type.
1617 (_gpgme_io_dup): Remove prototype.
1618 * posix-io.c (notify_table, _gpgme_io_set_close_notify): Change
1619 type of HANDLER to _gpgme_close_notify_handler_t.
1620 (_gpgme_io_close): Do not close the FD if handler returns 0.
1621 (_gpgme_io_dup): Remove function.
1622 * w32-io.c (notify_table, _gpgme_io_set_close_notify,
1623 _gpgme_io_close): Change type of HANDLER to
1624 _gpgme_close_notify_handler_t.
1625 (_gpgme_io_close): Do not close the FD if handler returns 0.
1626 (_gpgme_io_dup): Remove function.
1627 * w32-glib-io.c (_gpgme_io_dup): Remove function.
1628 (_gpgme_io_set_close_notify, notify_table): Change type of HANDLER
1629 to _gpgme_close_notify_handler_t.
1630 (_gpgme_io_close): Do not close the FD if handler returns 0.
1631 * rungpg.c (close_notify_handler): Change return type to int,
1633 * engine-gpgsm.c (close_notify_handler): Change return type to
1634 int, return 0 for status FD and 1 for all other FDs.
1635 (start): Do not duplicate the status FD.
1637 2007-07-12 Marcus Brinkmann <marcus@g10code.de>
1639 * Makefile.am: Replace implicite rule by suffix rule. Add
1642 2007-07-12 Werner Koch <wk@g10code.com>
1644 * version.c (do_subsystem_inits) [W32]: Make sure that the socket
1645 system has been started.
1647 2007-07-10 Marcus Brinkmann <marcus@g10code.de>
1649 * priv-io.h (_gpgme_io_dup): New prototype.
1650 * posix-io.c (_gpgme_io_dup): New function.
1651 * w32-io.c (_gpgme_io_dup): Likewise.
1652 * w32-glib-io.c (_gpgme_io_dup): Likewise.
1653 * engine-gpgsm.c (start): Use _gpgme_dup() instead of dup().
1655 2007-07-08 Marcus Brinkmann <marcus@g10code.de>
1657 * engine-gpgsm.c [HAVE_W32_SYSTEM]: Enable the bunch of the file.
1658 * funopen.c (funopen): Rename to _gpgme_funopen.
1660 2007-04-30 Marcus Brinkmann <marcus@g10code.de>
1662 * engine-gpgsm.c (gpgsm_new): Fix error handling for ttyname_r.
1663 * rungpg.c (gpg_new): Likewise.
1664 Submitted by Stephen Tether.
1666 2007-02-26 Werner Koch <wk@g10code.com>
1668 * verify.c (op_data_t): New element PLAINTEXT_SEEN.
1669 (_gpgme_verify_status_handler): Return an error if more than one
1670 plaintext has been seen.
1671 (parse_error): New arg SET_STATUS. Also detect it based on an
1672 ERROR status (gpg > 1.4.6).
1674 2007-01-26 Werner Koch <wk@g10code.com>
1676 * w32-io.c (build_commandline): Fixed stupid quoting bug.
1677 * w32-glib-io.c (build_commandline): Ditto.
1679 * rungpg.c (gpg_set_locale): Avoid dangling pointer after free.
1681 * gpgme-config.in: New options --get-gpg and --get-gpgsm.
1683 2007-01-18 Marcus Brinkmann <marcus@g10code.de>
1685 * data.h (_gpgme_data_get_fd): Add prototype.
1686 (gpgme_data_get_fd_cb): New type.
1687 (struct _gpgme_data_cbs): New member get_fd.
1688 * data.c (_gpgme_data_get_fd): New function.
1689 * data-fd.c (fd_get_fd): New function.
1690 (fd_cbs): Add fd_get_fd.
1691 * data-stream.c (stream_get_fd): New function.
1692 (stream_cbs): Add stream_get_fd.
1693 * data-mem.c (mem_cbs): Add NULL for get_fd callback.
1694 * data-user.c (user_cbs): Likewise.
1695 * engine-gpgsm.c (gpgsm_set_fd) [USE_DESCRIPTOR_PASSING]: Try to
1696 short-cut by passing the data descriptor directly.
1698 2007-01-17 Marcus Brinkmann <marcus@g10code.de>
1700 * w32-io.c (build_commandline): Quote all command line arguments.
1701 * w32-glib-io.c (build_commandline): Likewise.
1703 2007-01-10 Werner Koch <wk@g10code.com>
1705 * ttyname_r.c (ttyname_r) [W32]: Return a dummy name.
1707 2007-01-08 Werner Koch <wk@g10code.com>
1709 * version.c (do_subsystem_inits): Do assuan init only if building
1711 * setenv.c: Include assuan-def.h only if building with Assuan
1714 * op-support.c (_gpgme_op_reset): Set LC_MESSAGES only if
1716 * engine-gpgsm.c (gpgsm_set_locale): Ditto.
1717 * rungpg.c (gpg_set_locale): Ditto.
1719 2006-12-17 Marcus Brinkmann <marcus@g10code.de>
1721 * gpgme.c (gpgme_set_protocol): Shut down the engine when
1722 switching protocols.
1723 (gpgme_ctx_set_engine_info): Likewise for engine info.
1724 * engine.h (_gpgme_engine_reset): New function prototype.
1725 * engine.c (_gpgme_engine_reset): New function.
1726 * engine-backend.h (struct engine_ops): New member RESET.
1727 * rungpg.c (_gpgme_engine_ops_gpg): Add NULL for reset function.
1728 * engine-gpgsm.c (_gpgme_engine_ops_gpgsm)
1729 [USE_DESCRIPTOR_PASSING]: Add gpgsm_reset for reset.
1730 (_gpgme_engine_ops_gpgsm) [!USE_DESCRIPTOR_PASSING]: Add NULL for
1732 (gpgsm_reset) [USE_DESCRIPTOR_PASSING]: New function.
1733 * op-support.c (_gpgme_op_reset): Try to use the engine's reset
1734 function if available.
1735 * engine-gpgsm.c (gpgsm_new): Move code to dup status_fd to ...
1737 * posix-io.c (_gpgme_io_recvmsg, _gpgme_io_sendmsg): New functions.
1739 * engine.h (_gpgme_engine_new): Remove arguments lc_ctype and
1740 lc_messages from prototype.
1741 (_gpgme_engine_set_locale): New prototype.
1742 * engine.c (_gpgme_engine_set_locale): New function.
1743 * op-support.c (_gpgme_op_reset): Call _gpgme_engine_set_locale.
1744 * engine-backend.h (struct engine_ops): Add new member SET_LOCALE.
1745 Remove arguments lc_messages and lc_ctype from member NEW.
1746 * engine-gpgsm.c (struct engine_gpgsm): New members lc_ctype_set
1747 and lc_messages_set.
1748 (gpgsm_new): Remove lc_messages and lc_ctype
1750 (gpgsm_set_locale): New function.
1751 (_gpgme_engine_ops_gpgsm): Add gpgsm_set_locale.
1752 * rungpg.c (struct engine_gpg): Add new members lc_messages and
1754 (gpg_release): Release lc_messages and lc_ctype if set.
1755 (gpg_new): Remove lc_messages and lc_ctype arguments.
1756 (gpg_set_locale): New function.
1757 (_gpgme_engine_ops_gpg): Add gpg_set_locale.
1758 (add_arg): Implement in terms of:
1759 (add_arg_ext): New function.
1760 (start): Set lc-messages and lc-ctype arguments here.
1762 2006-12-03 Marcus Brinkmann <marcus@g10code.de>
1764 * engine-gpgsm.c (struct engine_gpgsm): Move members
1765 input_fd_server, output_fd_server, message_fd_server to ...
1766 (iocb_data): ... here (as server_fd).
1767 (close_notify_handler): Reset tags as well.
1768 (gpgsm_new): Implement support for descriptor
1770 (fd_type_t): New type.
1771 (gpgsm_clear_fd): New function. Use it instead of _gpgsm_io_close
1772 for unused communication channels.
1773 (gpgsm_set_fd): Rewritten to support descriptor passing. All
1774 relevant callers adjusted as well (previously of _gpgme_io_close).
1776 2006-12-02 Marcus Brinkmann <marcus@g10code.de>
1778 * version.c: Include "assuan.h".
1779 (do_subsystem_inits): Call assuan_set_assuan_err_source.
1781 2006-12-01 Marcus Brinkmann <marcus@g10code.de>
1783 * Makefile.am (libgpgme_real_la_SOURCES): Rename to main_sources.
1784 (libgpgme_la_SOURCES, libgpgme_pthread_la_SOURCES,
1785 libgpgme_glib_la_SOURCES, libgpgme_pth_la_SOURCES): Add
1787 (libgpgme_la_DEPENDENCIES, libgpgme_la_LIBADD,
1788 libgpgme_pthread_la_DEPENDENCIES, libgpgme_pthread_la_LIBADD,
1789 libgpgme_pth_la_DEPENDENCIES, libgpgme_pth_la_LIBADD,
1790 libgpgme_glib_la_DEPENDENCIES, libgpgme_glib_la_LIBADD): Remove
1792 (noinst_LTLIBRARIES): Removed.
1793 (libgpgme_glib_la_CFLAGS, libgpgme_pth_la_CFLAGS): Removed.
1794 (AM_CFLAGS): New variable.
1796 2006-11-30 Marcus Brinkmann <marcus@g10code.de>
1798 * engine-gpgsm.c: Replace AssuanError with gpg_error_t and
1799 ASSUAN_CONTEXT with assuan_context_t.
1801 2006-11-29 Marcus Brinkmann <marcus@g10code.de>
1803 * engine-gpgsm.c (gpgsm_new): Check return value of
1804 assuan_pipe_connect.
1806 * rungpg.c: Include <unistd.h>.
1807 (gpg_new): Support --display, --ttyname, --ttytype, --lc-ctype and
1808 --lc-messages. Fixes issue 734.
1810 2006-10-24 Marcus Brinkmann <marcus@g10code.de>
1812 * trustlist.c (gpgme_op_trustlist_next): Return error if OPD is
1815 2006-10-23 Marcus Brinkmann <marcus@g10code.de>
1817 * wait-global.c (gpgme_wait): Unlock CTX_LIST_LOCK while calling
1818 _gpgme_engine_io_event().
1820 * keylist.c (gpgme_op_keylist_next): Return error if OPD is NULL.
1822 2006-09-25 Marcus Brinkmann <marcus@g10code.de>
1824 * data-mem.c (gpgme_data_release_and_get_mem): Release the data
1827 2006-09-22 Marcus Brinkmann <marcus@g10code.de>
1829 * keylist.c (keylist_colon_handler): Move debug output after
1832 2006-07-29 Marcus Brinkmann <marcus@g10code.de>
1834 * gpgme-config.in (Options): Add NETLIBS.
1835 * Makefile.am (libgpgme_la_LIBADD, libgpgme_pthread_la_LIBADD,
1836 libgpgme_pth_la_LIBADD, libgpgme_glib_la_LIBADD): Add NETLIBS.
1838 * rungpg.c (read_status): Fix comparison disguising as an
1841 2005-03-24 Marcus Brinkmann <marcus@g10code.de>
1843 * gpgme.c (gpgme_set_locale): Remove conditional on
1844 HAVE_W32_SYSTEM, and just check for LC_MESSAGES.
1846 2006-07-16 Marcus Brinkmann <marcus@g10code.de>
1848 * rungpg.c (read_status): Strip potential carriage return.
1849 * genkey.c (get_key_parameter): Skip potential carriage return.
1850 * version.c (_gpgme_get_program_version): Strip potential carriage
1853 * data.c (gpgme_data_set_file_name): Allow to clear the file name
1856 2006-06-22 Marcus Brinkmann <marcus@g10code.de>
1858 * keylist.c (gpgme_get_key): Also clone the engine info.
1860 2006-03-06 Marcus Brinkmann <marcus@g10code.de>
1862 * gpgme-config.in (cflags_pth): Revert accidential removal of
1863 pthread support with last change.
1865 2006-02-28 Marcus Brinkmann <marcus@g10code.de>
1867 * w32-glib-io.c (O_BINARY) [!O_BINARY]: New macro.
1868 (_gpgme_io_pipe): Open pipes in binary mode.
1870 2006-02-22 Marcus Brinkmann <marcus@g10code.de>
1872 * engine.c (gpgme_engine_check_version): Reimplemented to allow
1873 checking the version correctly even after changing the engine
1874 information. Bug reported by Stéphane Corthésy.
1876 * rungpg.c (read_colon_line): Invoke colon preprocess handler if
1878 (colon_preprocessor_t): New type.
1879 (struct engine_gpg): New member colon.preprocess_fnc.
1880 (gpg_keylist_preprocess): New function.
1881 * keylist.c (keylist_colon_handler): Allow short key IDs.
1883 2006-02-15 Marcus Brinkmann <marcus@g10code.de>
1885 * w32-io.c (create_writer): Make C->have_data a manually resetted
1887 (writer): Move code from end of if block to beginning, so it
1888 is also run the first time.
1889 (_gpgme_io_write): Move assert check after error check. Reset
1890 the is_empty event, and also do it eagerly.
1891 (_gpgme_io_select): Unconditionally wait for the is_empty event.
1893 2006-01-26 Werner Koch <wk@g10code.com>
1895 * w32-util.c (_gpgme_get_conf_int): New.
1896 * posix-util.c (_gpgme_get_conf_int): New.
1897 * w32-io.c (get_desired_thread_priority): New.
1898 (create_reader, create_writer): Use it here.
1900 2006-01-04 Werner Koch <wk@g10code.com>
1902 * debug.h (_gpgme_debug_srcname): New. Use it with the debug macros.
1904 * w32-glib-io.c (_gpgme_io_set_nonblocking): Add debug
1905 statements. Disable error return for failed nonblocking call.
1907 2006-01-03 Marcus Brinkmann <marcus@g10code.de>
1909 * w32-glib-io.c (_gpgme_io_close): Only close fd if there is no
1912 2005-12-31 Marcus Brinkmann <marcus@g10code.de>
1914 * w32-glib-io.c (find_channel): Set channel to unbuffered.
1915 (_gpgme_io_select): Fix debug output.
1917 2005-12-23 Werner Koch <wk@g10code.com>
1919 * gpgme.h (struct _gpgme_signature): Append field PKA_ADDRESS.
1920 * verify.c (release_op_data, _gpgme_verify_status_handler): Set
1923 2005-12-20 Werner Koch <wk@g10code.com>
1925 * gpgme.h (gpgme_status_code_t): Added GPGME_STATUS_PKA_TRUST_BAD
1926 and GPGME_STATUS_PKA_TRUST_GOOD.
1927 (struct _gpgme_signature): New field pka_trust.
1928 * verify.c (_gpgme_verify_status_handler): Set pka_trust.
1930 2005-12-06 Werner Koch <wk@g10code.com>
1932 * keylist.c (keylist_colon_handler): Store fingerprints of the
1933 subkeys. Reset the secret flag of subkeys for stub secret keys.
1934 (NR_FIELDS): Bumped up to 16
1936 2005-11-27 Marcus Brinkmann <marcus@g10code.de>
1938 * engine.c (_gpgme_set_engine_info): Use new_file_name in
1939 engine_get_version invocation. Reported by Stéphane Corthésy.
1941 2005-11-24 Marcus Brinkmann <marcus@g10code.de>
1943 * w32-glib-io.c (_gpgme_io_fd2str): Remove debug printf.
1945 2005-11-18 Werner Koch <wk@g10code.com>
1947 * w32-glib-io.c: Include glib.h before windows to avoid a symbol
1949 (find_channel): Better use g_io_channel_win32_new_fd instead of
1950 the autodetection function g_io_channel_unix_new.
1951 (_gpgme_io_select): Rewritten. It is now a fully working select
1954 2005-11-18 Marcus Brinkmann <marcus@g10code.de>
1956 * priv-io.h (_gpgme_io_fd2str): New prototype.
1957 * posix-io.c (_gpgme_io_fd2str): New function.
1958 * w32-io.c (_gpgme_io_fd2str): New function.
1959 * rungpg.c: Use this new function.
1960 * w32-glib-io.c (_gpgme_io_fd2str): Rewrote the file handle code
1961 again. Two's company, three's the musketeers.
1963 * w32-glib-io.c: Rewrote the file handle code. We don't create
1964 system fds for every handle (doesn't work for inherited handles),
1965 but we create pseudo fds in a private namespace that designate a
1966 handle and potentially a giochannel.
1968 2005-11-18 Werner Koch <wk@g10code.com>
1970 * versioninfo.rc.in: Set file version to LT-version + Svn-revision.
1972 2005-11-17 Marcus Brinkmann <marcus@g10code.de>
1974 * w32-glib-io.c: New file.
1975 * gpgme.def (gpgme_get_giochannel): Add symbol.
1976 * Makefile.am (system_components) [HAVE_DOSISH_SYSTEM]: Remove
1978 (ltlib_gpgme_extra): New variable.
1979 (lib_LTLIBRARIES): Add $(ltlib_gpgme_extra).
1980 (system_components_not_extra): New variable.
1981 (libgpgme_la_SOURCES, libgpgme_pthread_la_SOURCES,
1982 (libgpgme_pth_la_SOURCES): Add $(system_components_not_extra).
1983 (libgpgme_glib_la_LDFLAGS, libgpgme_glib_la_DEPENDENCIES,
1984 (libgpgme_glib_la_LIBADD, libgpgme_glib_la_CFLAGS)
1985 [BUILD_W32_GLIB]: New variables.
1986 * gpgme-config.in (glib): New option.
1987 * gpgme.m4 (AM_PATH_GPGME_GLIB): New macro.
1989 2005-11-17 Marcus Brinkmann <marcus@g10code.de>
1991 * priv-io.h (_gpgme_io_waitpid, _gpgme_io_kill): Removed.
1992 * w32-io.c (_gpgme_io_waitpid, _gpgme_io_kill): Removed.
1993 * posix-io.c (_gpgme_io_kill): Removed.
1994 (_gpgme_io_waitpid): Declare static.
1996 2005-10-24 Marcus Brinkmann <marcus@g10code.de>
1998 * w32-io.c (_gpgme_io_spawn): Don't minimize window, hide it.
2000 2005-10-21 Werner Koch <wk@g10code.com>
2002 * Makefile.am: Fixed cut+paste problem
2004 2005-10-20 Marcus Brinkmann <marcus@g10code.de>
2006 * Makefile.am: Build versioninfo.lo, not versioninfo.o. Also, fix
2009 2005-10-16 Marcus Brinkmann <marcus@g10code.de>
2011 * rungpg.c (gpg_edit): Don't add a key argument if in card edit
2014 2005-10-06 Marcus Brinkmann <marcus@g10code.de>
2016 * Makefile.am (gpgme.dll gpgme.dll.a): Use $(srcdir) for
2019 * gpgme.h (gpgme_free): New prototype.
2020 * data-mem.c (gpgme_free): New function.
2021 * libgpgme.vers (GPGME_1.1): Add gpgme_free.
2022 * gpgme.def: Add gpgme_free.
2024 2005-10-02 Marcus Brinkmann <marcus@g10code.de>
2026 * util.h (_gpgme_decode_percent_string): Add new argument BINARY
2028 * verify.c (parse_notation): Likewise for invocation.
2029 * conversion.c (_gpgme_decode_percent_string): Likewise to
2030 declaration. If set, do not replace '\0' characters with a
2032 * gpgme.h (struct _gpgme_key_sig): New field notations.
2033 * ops.h (_gpgme_parse_notation): New prototype.
2034 * sig-notation.c (_gpgme_parse_notation): New function.
2035 * key.c (gpgme_key_unref): Free all signature notations.
2036 * keylist.c (op_data_t): New member tmp_keysig.
2037 (finish_key): Clear OPD->tmp_keysig.
2038 * gpgme.c (gpgme_set_keylist_mode): Remove check.
2039 * rungpg.c (gpg_keylist): Support listing signature notations.
2040 (gpg_keylist_ext): Likewise.
2042 2005-10-01 Marcus Brinkmann <marcus@g10code.de>
2044 * engine.h (_gpgme_set_engine_info): Add prototype.
2045 * engine-backend.h (struct engine_ops): Change return type of
2046 get_file_name() to const char * to silence gcc warning.
2047 * engine.c (engine_get_file_name): Change return type to const
2048 char * to silence gcc warning.
2049 (gpgme_get_engine_info): Use transitional variable to go from
2050 const char * to char * to silence gcc warning.
2051 (_gpgme_set_engine_info): Likewise.
2052 * engine-gpgsm.c (struct engine_gpgsm): Change type of LINE to
2053 char * to silence gcc warning.
2054 (gpgsm_new): Make ARGV a pointer to const char.
2055 (status_handler): Change type of SRC, END, DST, ALINE and NEWLINE
2056 to char * to silence gcc warning.
2058 * gpgme.def: Add gpgme_data_set_file_name,
2059 gpgme_data_get_file_name, gpgme_sig_notation_clear,
2060 gpgme_sig_notation_add and gpgme_sig_notation_get.
2061 * libgpgme.vers: Add gpgme_sig_notation_clear,
2062 gpgme_sig_notation_add and gpgme_sig_notation_get.
2063 * Makefile.am (libgpgme_real_la_SOURCES): Add sig-notation.c.
2064 * context.h (struct gpgme_context): New field sig_notations.
2065 * gpgme.h (struct _gpgme_sig_notation): New member value_len and
2067 (GPGME_SIG_NOTATION_CRITICAL): New symbol.
2068 (gpgme_sig_notation_flags_t): New type.
2069 (gpgme_sig_notation_add, gpgme_sig_notation_clear,
2070 gpgme_sig_notation_get): New prototypes.
2071 * ops.h (_gpgme_sig_notation_create, _gpgme_sig_notation_free):
2073 * sig-notation.c (_gpgme_sig_notation_free): New file.
2074 * verify.c (parse_notation): Use support functions.
2075 (release_op_data): Likewise.
2076 * rungpg.c (append_args_from_sig_notations): New function.
2077 (gpg_encrypt_sign, gpg_sign): Call it.
2079 2005-09-30 Marcus Brinkmann <marcus@g10code.de>
2081 * data.h (struct gpgme_data): New member file_name.
2082 * data.c (gpgme_data_set_filename): New function.
2083 (_gpgme_data_release): Free DH->filename if necessary.
2084 (gpgme_data_get_filename): New function.
2085 * rungpg.c (gpg_encrypt): Set filename option.
2086 (gpg_encrypt_sign): Likewise.
2087 (gpg_sign): Likewise.
2088 * libgpgme.vers (GPGME_1.1): Add gpgme_data_set_file_name and
2089 gpgme_data_get_file_name.
2091 * decrpyt.c, verify.c, gpgme.h: Replace plaintext_filename with
2094 2005-09-29 Marcus Brinkmann <marcus@g10code.de>
2096 * gpgme.h (struct _gpgme_key): Add field is_qualified.
2097 (struct _gpgme_subkey): Likewise.
2098 * keylist.c (set_subkey_capability, set_mainkey_capability): Set
2101 2005-09-23 Werner Koch <wk@g10code.com>
2103 * w32-io.c (_gpgme_io_pipe): Removed use of environment variable
2105 (create_reader, create_writer): Set thread priority higher.
2107 2005-09-19 Werner Koch <wk@g10code.com>
2109 * w32-io.c (_gpgme_io_pipe): New environment variable to change
2110 the size of the pipe buffer.
2112 2005-09-13 Werner Koch <wk@g10code.com>
2114 * ath.c: Changes to make it work under W32.
2116 2005-09-12 Marcus Brinkmann <marcus@g10code.de>
2118 * Makefile.am (libgpgme_la_SOURCES): Set to ath.h and ath.c.
2119 (ath_pth_src, ath_pthread_src): Removed.
2120 (w32_o_files): Replace ath-compat.o with ath.o.
2121 (libgpgme_pth_la_CFLAGS): New variable.
2122 * ath-compat.c, ath-pthread-compat.c, ath-pth-compat.c: Removed.
2123 * ath.h (ath_pthread_available, ath_pth_available): Removed.
2124 (ath_init) [!_ATH_EXT_SYM_PREFIX]: Do not define macro.
2125 (struct ath_ops, ath_init) [_ATH_COMPAT]: Removed.
2126 (_ATH_COMPAT): Macro removed.
2127 * posix-sema.c (_gpgme_sema_subsystem_init): Do not call
2130 2005-09-12 Marcus Brinkmann <marcus@g10code.de>
2132 * keylist.c (release_op_data): Do not free opd->tmp_uid.
2134 2005-09-07 Werner Koch <wk@g10code.com>
2136 * w32-io.c (build_commandline): Quote argv[0].
2138 2005-08-26 Marcus Brinkmann <marcus@g10code.de>
2140 * rungpg.c (command_handler): Use _gpgme_io_write instead of write.
2142 * edit.c (command_handler): Do not depend on PROCESSED being
2145 * engine.h (engine_command_handler_t): Add new argument processed.
2146 * ops.h (_gpgme_passphrase_command_handler_internal): Rename
2148 (_gpgme_passphrase_command_handler): ... this one.
2149 * passphrase.c (_gpgme_passphrase_command_handler_internal):
2151 (_gpgme_passphrase_command_handler): ... this one.
2152 * edit.c (command_handler): Add new argument processed. Remove
2153 local variable with the same name. Always return processed as
2155 * rungpg.c (command_handler): Send a newline character if the
2158 2005-08-26 Werner Koch <wk@g10code.com>
2160 * w32-util.c (read_w32_registry_string): Updated from code used by
2161 GnuPG. This allows for expanding strings and features the
2162 implicit fallback key.
2163 (w32_shgetfolderpath, find_program_at_standard_place): New.
2164 (_gpgme_get_gpg_path, _gpgme_get_gpgsm_path): With no registry
2165 entry, locate the programs at the standard place.
2166 (dlopen, dlsym, dlclose): New, so that we can keep on using what
2167 we are accustomed to.
2169 * debug.c (debug_init): Use PATHSEP_C so that under W32 a
2170 semicolon is used which allows us to create files with drive
2173 * w32-io.c (_gpgme_io_read, _gpgme_io_write): Print content in
2176 2005-08-19 Werner Koch <wk@g10code.com>
2179 * versioninfo.rc.in: New.
2180 * Makefile.am: Addes support for building a W32 DLL.
2182 * ttyname_r.c (ttyname_r) [W32]: Return error.
2183 * ath-compat.c [W32]: select and co are not yet supported; return
2185 * data-stream.c (stream_seek): Use ftell if ftello is not available.
2187 2005-08-08 Werner Koch <wk@g10code.com>
2189 * util.h (stpcpy): Renamed to ..
2190 (_gpgme_stpcpy): .. this and made inline. This avoids duplicate
2191 definitions when linking statically.
2192 * stpcpy.c: Removed.
2194 2005-07-27 Marcus Brinkmann <marcus@g10code.de>
2196 * gpgme.h (gpgme_status_code_t): Add GPGME_STATUS_PLAINTEXT.
2197 (struct _gpgme_op_decrypt_result): New member plaintext_filename.
2198 (struct _gpgme_op_verify_result): Likewise.
2199 * ops.h (_gpgme_parse_plaintext): Add prototype.
2200 * op-support.c (_gpgme_parse_plaintext): New function.
2201 * decrypt.c (release_op_data): Release
2202 OPD->result.plaintext_filename.
2203 (_gpgme_decrypt_status_handler): Handle GPGME_STATUS_PLAINTEXT.
2204 * verify.c (release_op_data): Release
2205 OPD->result.plaintext_filename.
2206 (_gpgme_verify_status_handler): Handle GPGME_STATUS_PLAINTEXT.
2208 2005-07-26 Marcus Brinkmann <marcus@g10code.de>
2210 * keylist.c (gpgme_get_key): Allow key IDs.
2212 2005-06-20 Marcus Brinkmann <marcus@g10code.de>
2214 * gpgme.m4: Only call GPGME_CONFIG if found.
2216 2005-06-03 Marcus Brinkmann <marcus@g10code.de>
2218 * gpgme.h (struct _gpgme_signature): New members pubkey_algo and
2220 * verify.c (parse_valid_sig): Parse pubkey and hash algo numbers.
2221 (parse_new_sig): Parse pubkey, hash algo and timestamp for ERRSIG.
2223 (_gpgme_decrypt_status_handler): Fix last change.
2225 * gpgme.h (struct _gpgme_recipient): New structure.
2226 (gpgme_recipient_t): New type.
2227 (struct _gpgme_op_decrypt_result): Add member recipients.
2228 * decrypt.c (op_data_t): New member last_recipient_p.
2229 (_gpgme_op_decrypt_init_result): Initialize last_recipient_p.
2230 (parse_enc_to): New function.
2231 (_gpgme_decrypt_status_handler): Handle status ENC_TO and
2234 * wait-global.c (gpgme_wait): Break out of the fd processing loop
2236 Reported by Igor Belyi <gpgme@katehok.ac93.org>.
2238 2005-06-02 Marcus Brinkmann <marcus@g10code.de>
2240 * wait.h (_gpgme_run_io_cb): New prototype.
2241 * wait.c (_gpgme_run_io_cb): New function.
2242 * wait-global.c (gpgme_wait): Call it.
2243 * wait-user.c (_gpgme_user_io_cb_handler): Likewise.
2244 * wait-private.c (_gpgme_wait_on_condition): Likewise.
2246 2005-06-02 Werner Koch <wk@g10code.com>
2248 * passphrase.c (_gpgme_passphrase_status_handler): Take care of
2249 GPGME_STATUS_NEED_PASSPHRASE_PIN.
2250 (_gpgme_passphrase_command_handler_internal): Also act on the key
2251 "passphrase.pin.ask".
2253 * gpgme.h: Added status codes GPGME_STATUS_SIG_SUBPACKET,
2254 GPGME_STATUS_NEED_PASSPHRASE_PIN, GPGME_STATUS_SC_OP_FAILURE,
2255 GPGME_STATUS_SC_OP_SUCCESS, GPGME_STATUS_CARDCTRL,
2256 GPGME_STATUS_BACKUP_KEY_CREATED.
2258 2005-05-28 Marcus Brinkmann <marcus@g10code.de>
2260 * data-user.c: Include <errno.h>.
2262 2005-05-17 Marcus Brinkmann <marcus@g10code.de>
2264 * gpgme.c (gpgme_new): Set the CTX->include_certs default to the
2267 2005-05-11 Marcus Brinkmann <marcus@g10code.de>
2269 * w32-io.c (_gpgme_io_select): Fix loop increment.
2271 2005-05-05 Marcus Brinkmann <marcus@g10code.de>
2273 * data-user.c (user_release): Only call user hook if provided.
2274 (user_seek): Return EBADF if no user hook is provided.
2275 (user_read): Likewise.
2276 (user_write): Likewise.
2278 2005-04-28 Marcus Brinkmann <marcus@g10code.de>
2280 * gpgme.h (GPGME_INCLUDE_CERTS_DEFAULT): New macro.
2281 * engine-gpgsm.c (gpgsm_sign): Send the include-certs option after
2282 the reset, just for cleanliness, and do not sent it at all if the
2283 default is requested.
2284 * gpgme.c (gpgme_set_include_certs): Allow to use
2285 GPGME_INCLUDE_CERTS_DEFAULT.
2287 2005-04-21 Werner Koch <wk@g10code.com>
2289 * verify.c (calc_sig_summary): Set the key revoked bit.
2291 2005-04-14 Marcus Brinkmann <marcus@g10code.de>
2293 * wait-global.c (gpgme_wait): Use LI->ctx when checking a context
2294 in the list, not the user-provided CTX.
2295 Reported by Igor Belyi <gpgme@katehok.ac93.org>.
2297 * wait-global.c (gpgme_wait): If no context is found, and we
2298 should not hang, set *status to 0 and return NULL.
2299 Reported by Igor Belyi <gpgme@katehok.ac93.org>.
2301 2005-03-24 Marcus Brinkmann <marcus@g10code.de>
2303 * data.h (EOPNOTSUPP) [_WIN32]: Remove definition.
2304 * data.c (EOPNOTSUPP) [HAVE_W32_SYSTEM]: Remove definition.
2305 (gpgme_data_read, gpgme_data_write, gpgme_data_seek): Return
2306 ENOSYS instead EOPNOTSUPP.
2307 * data-compat.c (EOPNOTSUPP) [HAVE_W32_SYSTEM]: Remove definition.
2308 (gpgme_error_to_errno): Map GPG_ERR_NOT_SUPPORTED
2311 2005-03-24 Marcus Brinkmann <marcus@g10code.de>
2313 * io.h: Rename to ...
2314 * priv-io.h: ... this.
2315 * Makefile.am (libgpgme_real_la_SOURCES): Change io.h to priv-io.h.
2316 * data.c, engine-gpgsm.c, posix-io.c, rungpg.c, version.c,
2317 w32-io.c, wait-private.c, wait-global.c, wait-user.c, wait.c:
2318 Change all includes of "io.h" to "priv-io.h"
2320 2005-03-09 Werner Koch <wk@g10code.com>
2322 * w32-util.c (_gpgme_get_gpg_path, _gpgme_get_gpgsm_path): Do not
2323 cast away type checks.
2325 * io.h [W32]: Do not include stdio.h. If it is needed do it at
2328 * data.h [W32]: Removed kludge for EOPNOTSUP.
2329 * data.c, data-compat.c [W32]: Explicitly test for it here.
2331 Replaced use of _WIN32 by HAVE_W32_SYSTEM except for public header
2334 2005-03-07 Timo Schulz <twoaday@g10code.de>
2336 * gpgme.h: [_WIN32] Removed ssize_t typedef.
2337 * ath.h: [_WIN32] Added some (dummy) types.
2338 * io.h: [_WIN32] include stdio.h.
2339 * data.h: [_WIN32] Define EOPNOTSUPP.
2340 * w32-io.c [_WIN32] (_gpgme_io_subsystem_init): New.
2341 * gpgme.c [_WIN32] (gpgme_set_locale): Disabled.
2343 2004-12-12 Marcus Brinkmann <marcus@g10code.de>
2345 * engine.c (_gpgme_set_engine_info): Fix assertion.
2347 2004-12-11 Marcus Brinkmann <marcus@g10code.de>
2349 * util.h [HAVE_CONFIG_H && HAVE_TTYNAME_R] (ttyname_r): Define
2351 * ttyname_r.c: New file.
2353 2004-12-07 Marcus Brinkmann <marcus@g10code.de>
2355 * putc_unlocked.c, funopen.c: I just claim copyright on these
2356 files and change their license to LGPL, because they are totally
2357 trivial wrapper functions.
2358 * isascii.c: Change copyright notice to the one from ctype/ctype.h
2359 in the GNU C Library (CVS Head 2004-10-10), where isascii is
2360 defined as a macro doing exactly the same as the function in this
2362 * memrchr.c: Update from the GNU C Library (CVS Head 2001-07-06).
2363 * stpcpy.c: Update from the GNU C Library (CVS Head 2004-10-10).
2364 * ath.c, ath-compat.c, ath.h, ath-pth.c, ath-pth-compat.c,
2365 ath-pthread.c, ath-pthread-compat.c, context.h, conversion.c,
2366 data.c, data-compat.c, data-fd.c, data.h, data-mem.c,
2367 data-stream.c, data-user.c, debug.c, debug.h, decrypt.c,
2368 decrypt-verify.c, delete.c, edit.c, encrypt.c, encrypt-sign.c,
2369 engine-backend.h, engine.c, engine-gpgsm.c, engine.h, error.c,
2370 export.c, genkey.c, get-env.c, gpgme.c, gpgme.h, import.c, io.h,
2371 key.c, keylist.c, mkstatus, Makefile.am, ops.h, op-support.c,
2372 passphrase.c, posix-io.c, posix-sema.c, posix-util.c, progress.c,
2373 rungpg.c, sema.h, sign.c, signers.c, trust-item.c, trustlist.c,
2374 util.h, verify.c, version.c, w32-io.c, w32-sema.c, w32-util.c,
2375 wait.c, wait-global.c, wait.h, wait-private.c, wait-user.c: Change
2378 2004-12-07 Marcus Brinkmann <marcus@g10code.de>
2380 * libgpgme.vers (GPGME_1.1): New version.
2381 * engine-backend.h (struct engine_ops): Add argument FILE_NAME to
2382 member get_version(). Add arguments FILE_NAME and HOME_DIR to
2383 member new(). Change return type of get_file_name and get_version
2385 * engine-gpgsm.c (gpgsm_get_version): Change return type to char
2386 pointer. Do not cache result.
2387 (gpgsm_new): Add file_name and home_dir argument, and use them
2388 instead of the defaults, if set.
2389 * rungpg.c (struct engine_gpg): New member file_name.
2390 (gpg_get_version): Change return type to char pointer, and do not
2392 (gpg_release): Free gpg->file_name.
2393 (gpg_new): Take new arguments file_name and home_dir. Set the
2394 --homedir argument if HOME_DIR is not NULL. Set gpg->file_name.
2395 (start): Use gpg->file_name instead _gpgme_get_gpg_path, if set.
2396 * engine.h (_gpgme_engine_info_copy, _gpgme_engine_info_release):
2398 (_gpgme_engine_new): Change first argument to gpgme_engine_info_t
2400 * engine.c: Include <assert.h>.
2401 (gpgme_get_engine_info): Set *INFO within the lock. Move
2402 ENGINE_INFO and ENGINE_INFO_LOCK to ....
2403 (engine_info, engine_info_lock): ... here. New static variables.
2404 (engine_get_version): Add file_name argument to
2405 get_version invocation. Change return type to char pointer.
2406 (gpgme_engine_check_version): Rewritten to free() the return value
2407 of engine_get_version after using it.
2408 (_gpgme_engine_info_release): New function.
2409 (gpgme_get_engine_info): Rewritten.
2410 (_gpgme_engine_info_copy): New function.
2411 (_gpgme_set_engine_info): New function.
2412 (gpgme_set_engine_info): New function.
2413 (_gpgme_engine_new): Change first argument to gpgme_engine_info_t
2415 * gpgme.h (struct _gpgme_engine_info): Change type of file_name
2416 and version to char * (remove the const). New member home_dir.
2417 (gpgme_set_engine_info, gpgme_ctx_get_engine_info,
2418 gpgme_ctx_set_engine_info): New prototypes.
2419 * context.h (struct gpgme_context): New member engine_info.
2420 * gpgme.c (gpgme_new): Allocate CTX->engine_info.
2421 (gpgme_release): Deallocate CTX->engine_info.
2422 (gpgme_ctx_get_engine_info, gpgme_ctx_set_engine_info): New
2424 * op-support.c (_gpgme_op_reset): Look for correct engine info and
2425 pass it to _gpgme_engine_new.
2426 * version.c (gpgme_check_version): Adjust to
2427 _gpgme_compare_versions returning an int.
2428 (_gpgme_compare_versions): Return an int value, not a const char
2430 * ops.h (_gpgme_compare_versions): Same for prototype.
2432 2004-10-03 Marcus Brinkmann <marcus@g10code.de>
2434 * verify.c (parse_trust): If no reason is provided, set
2435 SIG->validity_reason to 0.
2436 (calc_sig_summary): Set GPGME_SIGSUM_CRL_TOO_OLD if appropriate.
2438 2004-10-22 Marcus Brinkmann <marcus@g10code.de>
2440 * engine-gpgsm.c (map_assuan_error): Return 0 if ERR is 0.
2441 (start): Call map_assuan_error on return value of
2444 2004-10-05 Marcus Brinkmann <marcus@g10code.de>
2446 * op-support.c (_gpgme_op_data_lookup): Use char pointer for
2449 2004-09-30 Marcus Brinkmann <marcus@g10code.de>
2451 * gpgme.m4: Implement the --api-version check.
2453 * rungpg.c (read_status): Move the polling of the output data pipe
2454 to just before removing the command fd, from just before adding
2455 it. This avoids buffering problems.
2457 * data.c (_gpgme_data_inbound_handler): Use _gpgme_io_read, not
2458 read, to improve debug output.
2460 2004-09-29 Marcus Brinkmann <marcus@g10code.de>
2462 * gpgme.h (GPGME_IMPORT_NEW, GPGME_IMPORT_UID, GPGME_IMPORT_SIG,
2463 GPGME_IMPORT_SUBKEY, GPGME_IMPORT_SECRET,
2464 (GPGME_KEYLIST_MODE_LOCAL, GPGME_KEYLIST_MODERN_EXTERN,
2465 GPGME_KEYLIST_MODE_SIGS, GPGME_KEYLIST_MODE_VALIDATE): Change from
2467 (gpgme_keylist_mode_t): Define as unsigned int.
2468 (gpgme_key_t): Change type of keylist_mode to
2469 gpgme_keylist_mode_t.
2471 2004-09-23 Marcus Brinkmann <marcus@g10code.de>
2473 * data.c (_gpgme_data_outbound_handler): Close the file descriptor
2476 * data-stream.c (stream_seek): Call ftello and return the current
2478 * data.h (struct gpgme_data): Change type of data.mem.offset to
2480 * data.c (gpgme_data_seek): Check dh->cbs->seek callback, not read
2481 callback. If SEEK_CUR, adjust the offset by the pending buffer
2482 size. Clear pending buffer on success.
2485 2004-09-14 Marcus Brinkmann <marcus@g10code.de>
2487 * gpgme.m4: Add copyright notice.
2489 2004-08-18 Marcus Brinkmann <marcus@g10code.de>
2491 * passphrase.c (_gpgme_passphrase_status_handler): Always run the
2494 2004-08-17 Marcus Brinkmann <marcus@g10code.de>
2496 * rungpg.c (build_argv): Use --no-sk-comment, not --no-comment.
2498 2004-06-23 Marcus Brinkmann <marcus@g10code.de>
2500 * key.c (_gpgme_key_append_name): Make sure tail points to the
2501 byte following the uid.
2502 (_gpgme_key_add_sig): Likewise. Don't use calloc, but malloc and
2505 2004-06-02 Marcus Brinkmann <marcus@g10code.de>
2507 * libgpgme.vers: Remove C-style comment, which is not supported by
2510 2004-05-21 Marcus Brinkmann <marcus@g10code.de>
2512 * gpgme-config.in (Options): Support --api-version.
2514 * libgpgme.vers: List all gpgme symbols under version GPGME_1.0.
2516 * decrypt.c (_gpgme_decrypt_status_handler): Fix last change.
2517 * verify.c (parse_error): Likewise.
2519 * verify.c (parse_error): Do not skip location of where token.
2521 * gpgme.h (gpgme_status_code_t): Add GPGME_STATUS_REVKEYSIG.
2522 * verify.c (_gpgme_verify_status_handler): Add handling of
2523 GPGME_STATUS_REVKEYSIG.
2524 (parse_trust): Likewise.
2526 2004-05-21 Marcus Brinkmann <marcus@g10code.de>
2528 * gpgme.h (struct _gpgme_decrypt_result): New fields
2529 wrong_key_usage and _unused.
2530 * decrypt.c (_gpgme_decrypt_status_handler): Don't skip over
2531 character after a matched string, as in a protocol error this
2532 could skip over the trailing binary zero.
2533 Handle decrypt.keyusage error notifications.
2535 * gpgme.h (struct _gpgme_key): New member keylist_mode.
2536 * keylist.c (keylist_colon_handler): Set the keylist_mode of KEY.
2538 2004-04-29 Marcus Brinkmann <marcus@g10code.de>
2540 * gpgme.h (struct _gpgme_signature): Change member WRONG_KEY_USAGE
2541 to unsigned int. Same for member _unused.
2543 * keylist.c (set_mainkey_trust_info): Rewritten.
2544 (set_subkey_capability): Handle 'd' (disabled).
2545 (set_mainkey_capability): Rewritten.
2547 2004-04-22 Marcus Brinkmann <marcus@g10code.de>
2549 * gpgme.m4: Quote first argument to AC_DEFUN.
2551 2004-04-21 Werner Koch <wk@gnupg.org>
2553 * key.c (gpgme_key_unref): Allow passing NULL like free does.
2554 The rule of least surprise.
2556 2004-04-15 Werner Koch <wk@gnupg.org>
2558 * verify.c (prepare_new_sig, _gpgme_verify_status_handler): Remove
2559 unused result.signatures items.
2561 * keylist.c (gpgme_get_key): Return an error if FPR is NULL.
2563 2004-04-08 Werner Koch <wk@gnupg.org>
2565 * verify.c (_gpgme_verify_status_handler): Ignore the error status
2566 if we can't process it.
2567 * decrypt-verify.c (decrypt_verify_status_handler): Backed out
2568 yesterday's hack. It is not any longer required.
2570 2004-04-07 Werner Koch <wk@gnupg.org>
2572 * decrypt-verify.c (decrypt_verify_status_handler): Hack to cope
2573 with meaningless error codes from the verify status function.
2575 2004-04-05 Werner Koch <wk@gnupg.org>
2577 * gpgme.h: Add GPGME_STATUS_NEWSIG.
2579 * verify.c (parse_error): Compare only the last part of the where
2581 (prepare_new_sig): New.
2582 (parse_new_sig): Use prepare_new_sig when required.
2583 (_gpgme_verify_status_handler): Handle STATUS_NEWSIG.
2585 * engine-gpgsm.c (gpgsm_keylist_ext): Send with-validation
2586 option. Fixed pattern construction.
2587 (status_handler): Add debugging output.
2589 2004-03-23 Marcus Brinkmann <marcus@g10code.de>
2591 * engine-gpgsm.c (gpgsm_new): Protect _only_ tty related code with
2592 isatty(). Submitted by Bernhard Herzog.
2594 2004-03-11 Marcus Brinkmann <marcus@g10code.de>
2596 * engine-gpgsm.c (gpgsm_new): Protect all tty related code with
2599 * rungpg.c (gpg_cancel): Set GPG->fd_data_map to NULL after
2601 * engine-gpgsm.c (gpgsm_cancel): Only call assuan_disconnect if
2602 GPGSM->assuan_ctx is not NULL. Set it to NULL afterwards.
2604 2004-03-07 Marcus Brinkmann <marcus@g10code.de>
2606 * gpgme-config.in: Do not emit include and lib directory for
2607 prefix "/usr" or "".
2609 2004-03-03 Werner Koch <wk@gnupg.org>
2611 * engine-gpgsm.c (gpgsm_export_ext): Properly insert a space
2614 2004-02-18 Werner Koch <wk@gnupg.org>
2616 * gpgme-config.in: Ignore setting of --prefix.
2618 2004-02-25 Marcus Brinkmann <marcus@g10code.de>
2620 * rungpg.c (gpg_cancel): New function.
2621 (gpg_release): Call it here.
2622 (_gpgme_engine_ops_gpg): Add it here.
2623 * engine-gpgsm.c (gpgsm_cancel): Fix last change.
2625 2004-02-24 Marcus Brinkmann <marcus@g10code.de>
2627 * gpgme.c (gpgme_cancel): New function.
2628 * engine-backend.h (struct engine_ops): New member cancel.
2629 * engine.h (_gpgme_engine_cancel): New prototype.
2630 * engine.c (_gpgme_engine_cancel): New function.
2631 * engine-gpgsm.c (_gpgme_engine_ops_gpgsm): Add new member cancel.
2632 (gpgsm_cancel): New function.
2633 (gpgsm_release): Use it.
2634 * rungpg.c (_gpgme_engine_ops_gpg): Add new member cancel.
2636 2004-02-17 Werner Koch <wk@gnupg.org>
2638 * gpgme.h: Add GPGME_KEYLIST_MODE_VALIDATE.
2639 * engine-gpgsm.c (gpgsm_keylist): Send this to gpgsm.
2641 2004-02-15 Werner Koch <wk@gnupg.org>
2643 * memrchr.c (memrchr): Fixed implementation. Problem pointed out
2644 by Adriaan de Groot.
2646 2004-02-01 Marcus Brinkmann <marcus@g10code.de>
2648 * rungpg.c (build_argv): Use --no-comment, not --comment "".
2650 * data-compat.c (gpgme_data_new_from_filepart): Call fseeko if
2652 * data-stream.c (stream_seek): Likewise.
2654 2004-01-16 Werner Koch <wk@gnupg.org>
2656 * conversion.c (_gpgme_map_gnupg_error): Handle numerical codes as
2659 2004-01-13 Marcus Brinkmann <marcus@g10code.de>
2661 * gpgme.h (struct _gpgme_key_sig): Fix comment on REVOKED.
2663 2004-01-12 Werner Koch <wk@gnupg.org>
2665 * sign.c: Include util.h for prototype of _gpgme_parse_timestamp.
2667 2003-12-25 Marcus Brinkmann <marcus@g10code.de>
2669 * gpgme.h (_GPGME_D_CLASS): Revert this change.
2670 (struct _gpgme_key_sig): For C++ compilers, rename class
2671 member to _obsolete_class. Add new member sig_class.
2672 (struct _gpgme_new_signature): Same here.
2673 * key.c (gpgme_key_sig_get_ulong_attr): Use CERTSIG->sig_class,
2675 * keylist.c (keylist_colon_handler): Likewise for KEYSIG, but keep
2676 setting KEYSIG->class, too. Rename variable CLASS to SIG_CLASS.
2677 * sign.c (parse_sig_created): Set SIG->sig_class.
2679 2003-12-22 Werner Koch <wk@gnupg.org>
2681 * gpgme.h (_GPGME_D_CLASS): Kludge for C++ compatibility without
2684 2003-11-19 Werner Koch <wk@gnupg.org>
2686 * conversion.c (_gpgme_parse_timestamp): New.
2687 (atoi_1, atoi_2, atoi_4): New.
2688 * keylist.c (parse_timestamp): Removed. Changed all callers to use
2690 * verify.c (parse_valid_sig): Ditto. Repalced the errno check.
2691 * sign.c (parse_sig_created): Ditto.
2693 2003-10-31 Werner Koch <wk@gnupg.org>
2695 * keylist.c (parse_timestamp): Detect ISO 8601 timestamps and try
2698 2003-10-10 Marcus Brinkmann <marcus@g10code.de>
2700 * genkey.c (get_key_parameter): Make a copy of the key parameters.
2701 Submitted by Miguel Coca <e970095@zipi.fi.upm.es>.
2703 2003-10-06 Marcus Brinkmann <marcus@g10code.de>
2705 * data-compat.c: Include <sys/time.h> before <sys/stat.h> for
2708 * engine-gpgsm.c (map_assuan_error): If ERR is -1, return sensible
2711 * io.h (_gpgme_io_subsystem_init): New prototype.
2712 * posix-io.c (_gpgme_io_subsystem_init): Add function.
2713 (_gpgme_io_spawn): Do not fixup signal handler here.
2714 * version.c (do_subsystem_inits): Call _gpgme_io_subsystem_init.
2716 * debug.c (debug_init): Drop const qualifier from E.
2718 * ath.h (struct ath_ops): Make ADDR argument of CONNECT prototype
2720 (ath_connect): Make ADDR argument const.
2721 * ath-pthread.c (ath_connect): Likewise.
2722 * ath-pth.c (ath_connect): Likewise.
2723 * ath-compat.c (ath_connect): Likewise.
2724 * ath.c (ath_connect): Likewise.
2726 * ath.h [HAVE_SYS_SELECT_H]: Include <sys/select.h> for fd_set.
2727 [!HAVE_SYS_SELECT_H]: Include <sys/time.h>.
2729 * conversion.c (_gpgme_hextobyte): Drop "unsigned" from type of
2731 * util.h (_gpgme_hextobyte): Likewise for prototype.
2733 * gpgme.h: Remove trailing comma in enum.
2735 * rungpg.c: Do not include <time.h>, <sys/time.h>, <sys/types.h>,
2736 <signal.h>, <fcntl.h>, or "unistd.h".
2738 2003-10-02 Marcus Brinkmann <marcus@g10code.de>
2740 * engine-backend.h (struct engine_ops): Add argument TYPE.
2741 * engine.c (_gpgme_engine_op_edit): Likewise.
2742 * engine.h: Likewise.
2743 * rungpg.c (gpg_edit): Likewise. Use it.
2744 * edit.c (edit_start): Likewise. Pass it on.
2745 (gpgme_op_edit_start, gpgme_op_edit): Likewise.
2746 (gpgme_op_card_edit_start, gpgme_op_card_edit): New functions.
2748 2003-09-30 Marcus Brinkmann <marcus@g10code.de>
2750 * gpgme.h (gpg_strerror_r): Change prototype to match
2751 gpg_strerror_r change.
2752 * error.c (gpg_strerror_r): Likewise, also update implementation.
2754 * gpgme.c (gpgme_hash_algo_name): Change name of RMD160 to
2755 RIPEMD160, name of TIGER to TIGER192, name of CRC32-RFC1510 to
2756 CRC32RFC1510, and name of CRC24-RFC2440 to CRC24RFC2440.
2758 2003-09-14 Marcus Brinkmann <marcus@g10code.de>
2760 * gpgme.h: Add prototype for gpgme_set_locale.
2762 * gpgme.h: Define macro _GPGME_INLINE depending on the compiler
2763 characteristics and use that instead __inline__.
2765 * context.h (struct gpgme_context): New members lc_ctype and
2767 * gpgme.c: Include <locale.h>.
2768 (def_lc_lock, def_lc_ctype, def_lc_messages): New static
2770 (gpgme_set_locale): New function.
2771 * engine.c (_gpgme_engine_new): Add arguments lc_ctype and
2773 * engine.h (_gpgme_engine_new): Likewise.
2774 * engine-gpgsm.c (gpgsm_new): Likewise.
2775 * rungpg.c (gpg_new): Likewise.
2776 * engine-backend.h (struct engine_ops): Likewise to NEW.
2777 * op-support.c (_gpgme_op_reset): Likewise to invocation of
2780 2003-09-13 Marcus Brinkmann <marcus@g10code.de>
2782 * gpgme.h (gpgme_strerror_r): New prototype.
2783 * error.c (gpgme_strerror_r): New function.
2785 * get-env.c: New file.
2786 * util.h (_gpgme_getenv): Add prototype.
2787 * Makefile.am (libgpgme_real_la_SOURCES): Add get-env.c.
2788 * rungpg.c (build_argv): Use _gpgme_getenv.
2789 * debug.c (debug_init): Likewise.
2790 * engine-gpgsm.c (gpgsm_new): Likewise.
2791 (gpgsm_new): Use ttyname_r.
2792 * w32-io.c (_gpgme_io_spawn): Disable debugging for now.
2794 2003-09-03 Marcus Brinkmann <marcus@g10code.de>
2796 * gpgme-config.in: Use $libdir, not @libdir@, for the echo
2799 * gpgme-config.in: Rewritten.
2800 * gpgme.m4: Rewritten.
2802 2003-08-19 Marcus Brinkmann <marcus@g10code.de>
2804 The ath files (ath.h, ath.c, ath-pth.c, ath-pthread.c,
2805 ath-compat.c, ath-pth-compat.c and ath-pthread-compat.c) have been
2806 updated to have better thread support, and the Makefile.am was
2807 changed to reflect that.
2809 * util.h [!HAVE_FOPENCOOKIE]: Remove fopencookie declaration.
2810 * engine-gpgsm.c (gpgsm_assuan_simple_command): Set ERR to return
2811 value of status_fnc.
2812 * rungpg.c (start): Return SAVED_ERRNO, not errno.
2814 2003-08-18 Marcus Brinkmann <marcus@g10code.de>
2816 * rungpg.c (start): Use saved_errno instead errno.
2818 2003-08-18 Marcus Brinkmann <marcus@g10code.de>
2820 * funopen.c, putc_unlocked.c, isascii.c, memrchr.c: New files.
2821 * fopencookie.c: File removed.
2823 2003-08-15 Marcus Brinkmann <marcus@g10code.de>
2825 * gpgme-config.in: Put gpg-error related flags after gpgme's.
2827 2003-08-14 Marcus Brinkmann <marcus@g10code.de>
2829 * gpgme.h (struct _gpgme_new_signature): Rename member CLASS to
2830 _OBSOLETE_CLASS, add member CLASS with type unsigned int.
2831 * sign.c (parse_sig_created): Also set SIG->_unused_class for
2832 backward compatibility.
2834 2003-08-04 Marcus Brinkmann <marcus@g10code.de>
2836 * verify.c (parse_new_sig): Fix status parsing case.
2838 2003-07-31 Marcus Brinkmann <marcus@g10code.de>
2840 * gpgme.h (struct _gpgme_subkey): Add flag CAN_AUTHENTICATE.
2841 Lower _UNUSED to 23 bits.
2842 (struct _gpgme_key): Likewise.
2843 * keylist.c (set_mainkey_capability): Support 'a' and 'A'.
2844 (set_subkey_capability): Support 'a'.
2846 * keylist.c (gpgme_get_key): Check if there is more than one key
2847 listed, and return GPG_ERR_AMBIGUOUS_NAME in that case.
2849 * util.h (_gpgme_decode_c_string): Change type of LEN argument to
2851 (_gpgme_decode_percent_string): Likewise.
2852 * conversion.c (_gpgme_decode_c_string): Likewise.
2853 (_gpgme_decode_percent_string): Likewise.
2854 (_gpgme_map_gnupg_error): Change type of I to unsigned int.
2855 * signers.c (gpgme_signers_clear): Likewise.
2856 (gpgme_signers_enum): New unsigned variable SEQNO, set to SEQ.
2857 Use SEQNO instead SEQ.
2858 * wait.c (fd_table_put): Change type of I and J to unsigned int.
2859 * wait-global.c (_gpgme_wait_global_event_cb): Change type of IDX
2861 (gpgme_wait): Change type of I and IDX to unsigned int.
2862 * wait-private.c (_gpgme_wait_on_condition): Change type of IDX
2863 and I to unsigned int.
2864 * posix-io.c (_gpgme_io_close): Cast return value of macro DIM to
2865 int to suppress gcc warning.
2866 (_gpgme_io_set_close_notify): Likewise.
2867 (_gpgme_io_select): Change type of I to unsigned int.
2868 * engine.c (gpgme_get_engine_info): Change type of PROTO to
2870 * wait-user.c (_gpgme_user_io_cb_handler): Change type of IDX and
2873 2003-07-29 Marcus Brinkmann <marcus@g10code.de>
2875 * decrypt-verify.c (decrypt_verify_status_handler): Expand silly
2876 and wrong expression.
2877 * encrypt-sign.c (encrypt_sign_status_handler): Likewise.
2878 * encrypt.c (encrypt_sym_status_handler): Likewise.
2879 * sign.c (sign_status_handler): Likewise.
2880 * verify.c (verify_status_handler): Likewise.
2881 * decrypt.c (decrypt_status_handler): Likewise.
2883 * engine.c (gpgme_get_engine_info): Initialize NULL.
2885 2003-07-23 Marcus Brinkmann <marcus@g10code.de>
2887 * gpgme-config.in (gpg_error_libs): Quote GPG_ERROR_CFLAGS and
2888 GPG_ERROR_LIBS when setting the corresponding variables.
2889 Reported by Stéphane Corthésy.
2891 2003-07-22 Marcus Brinkmann <marcus@g10code.de>
2893 * engine-gpgsm.c (set_recipients): Move declaration of NEWLEN to
2894 the beginning of the block.
2896 2003-06-22 Marcus Brinkmann <marcus@g10code.de>
2898 * data-mem.c (mem_write): Copy original buffer content.
2900 2003-06-22 Marcus Brinkmann <marcus@g10code.de>
2902 * gpgme.h (gpgme_user_ids_release, gpgme_user_ids_append): Remove
2905 2003-06-06 Marcus Brinkmann <marcus@g10code.de>
2907 * Makefile.am (AM_CPPFLAGS): Add @GPG_ERROR_CFLAGS@.
2908 * gpgme-config.in (gpg_error_libs, gpg_error_cflags): New variables.
2911 * op-support.c (_gpgme_parse_inv_userid): Rename to
2912 _gpgme_parse_inv_recp and change to new datatype.
2913 * ops.h (_gpgme_parse_inv_key): Fix prototype.
2914 * gpgme.h (struct _gpgme_invalid_user_id): Rename to
2915 __gpgme_invalid_key. Rename field ID to KEY.
2916 (gpgme_invalid_user_id_t): Rename to gpgme_invalid_key_t.
2917 (struct _gpgme_op_encrypt_result): Here, too.
2918 (struct _gpgme_op_sign_result): Likewise.
2919 * encrypt.c (struct op_data): Likewise.
2920 (release_op_data): Likewise.
2921 * sign.c (struct op_data): Likewise.
2922 (release_op_data): Likewise.
2924 * posix-io.c (_gpgme_io_read): Save errno across debug calls.
2925 (_gpgme_io_write): Likewise.
2926 (_gpgme_io_pipe): Likewise.
2927 (_gpgme_io_select): Likewise.
2929 * rungpg.c (struct engine_gpg): Remove arg_error.
2930 (add_arg): Don't set arg_error.
2931 (add_data): Likewise.
2932 (start): Don't check arg_error.
2933 (gpg_new): Check return value of add_arg.
2934 * verify.c (parse_notation): Free allocated memory at error.
2936 2003-06-05 Marcus Brinkmann <marcus@g10code.de>
2938 Everywhere: Use libgpg-error error codes.
2940 * Makefile.am (EXTRA_DIST): Remove mkerrors.
2941 (BUILT_SOURCES): Remove errors.c.
2942 (MOSTLYCLEANFILES): Likewise.
2943 (libgpgme_la_SOURCES): Likewise. Add error.c.
2944 (errors.c): Remove target.
2945 * mkerrors: File removed.
2946 * error.c: New file.
2948 * gpgme.h (gpgme_error_t): Change to type gpg_error_t.
2949 (gpgme_err_code_t, gpgme_err_source_t): New types.
2950 (gpgme_err_code, gpgme_err_source, gpgme_error, gpgme_err_make):
2951 New static inline functions.
2952 (gpgme_strsource, gpgme_err_code_from_errno,
2953 gpgme_err_code_to_errno, gpgme_err_make_from_errno,
2954 gpgme_error_from_errno): New prototypes.
2956 2003-05-29 Marcus Brinkmann <marcus@g10code.de>
2958 * gpgme.h (gpgme_op_export_start): Change second arg to const char *.
2959 (gpgme_op_export): Likewise.
2960 (gpgme_op_export_ext_start): New prototype.
2961 (gpgme_op_export_ext): Likewise.
2962 * engine.h: Likewise for _gpgme_engine_op_export and
2963 _gpgme_engine_op_export_ext.
2964 * engine-backend.h (struct engine_ops): Change second argument of
2965 prototype of export to const char *, and add reserverd int as
2966 third argument. Add prototype for export_ext.
2967 * engine.c (_gpgme_engine_op_export_ext): New function.
2968 (_gpgme_engine_op_export): Change second argument of prototype of
2969 export to const char *, and add reserverd int as third argument.
2970 * rungpg.c (gpg_export): Change second argument of prototype of
2971 export to const char *, and add reserverd int as third argument.
2972 (gpg_export_ext): New function.
2973 (gpg_keylist_ext): Break loop at error.
2974 (_gpgme_engine_ops_gpg): Add gpg_export_ext.
2975 * engine-gpgsm.c (gpgsm_export): Change second argument of
2976 prototype of export to const char *, and add reserverd int as
2978 (gpgsm_export_ext): New function.
2979 (_gpgme_engine_ops_gpgsm): Add gpgsm_export_ext.
2980 * export.c (export_start): Change second argument of prototype of
2981 export to const char *, and add reserverd int as third argument.
2982 (gpgme_op_export_start): Likewise.
2983 (export_ext_start): New function.
2984 (gpgme_op_export_ext_start): Likewise.
2985 (gpgme_op_export_ext): Likewise.
2987 * gpgme.h (gpgme_keylist_mode_t): New type for anonymous enum.
2988 (gpgme_sigsum_t): New type for anonymous enum.
2990 * encrypt-sign.c (encrypt_sign_start): Check for errors earlier,
2991 and return an error if RECP is not set.
2993 * Makefile.am (libgpgme_la_SOURCES): Remove user-id.c.
2994 * user-id.c: Remove file.
2995 * ops.h: Remove prototype for _gpgme_user_ids_all_valid.
2996 * gpgme.h (gpgme_encrypt_flags_t): New type.
2997 (gpgme_op_encrypt_start): Change second parameter to type
2998 gpgme_key_t[], and add third parameter.
2999 (gpgme_op_encrypt): Likewise.
3000 (gpgme_op_encrypt_sign_start): Likewise.
3001 (gpgme_op_encrypt_sign): Likewise.
3002 * encrypt.c (encrypt_start): Likewise.
3003 (gpgme_op_encrypt_start): Likewise.
3004 (gpgme_op_encrypt): Likewise. Pass flags to engine.
3005 * encrypt-sign.c (encrypt_sign_start): Likewise.
3006 (gpgme_op_encrypt_sign_start): Likewise.
3007 (gpgme_op_encrypt_sign): Likewise.
3008 * engine-backend.h (struct engine_ops): Likewise for prototypes of
3009 encrypt and encrypt_sign.
3010 * engine.h: Likewise for prototypes of _gpgme_engine_op_encrypt
3011 and _gpgme_engine_op_encrypt_sign.
3012 * engine.c (_gpgme_engine_op_encrypt): Likewise.
3013 (_gpgme_engine_op_encrypt_sign): Likewise.
3014 * rungpg.c (gpg_encrypt): Likewise.
3015 (gpg_encrypt_sign): Likewise.
3016 * rungpg.c (gpg_encrypt): Check flags for always trust option.
3017 * engine-gpgsm.c (gpgsm_encrypt): Likewise.
3018 (set_recipients): Rewritten to use keys instead user IDs.
3019 * rungpg.c (append_args_from_recipients): Rewritten to use keys
3021 * encrypt.c (_gpgme_encrypt_status_handler): Change errors
3022 returned to GPGME_Invalid_Key and GPGME_General_Error.
3024 2003-05-28 Marcus Brinkmann <marcus@g10code.de>
3026 * engine-gpgsm.c: Rename GpgsmObject to engine_gpgsm_t.
3027 (struct gpgsm_object_s): Rename to struct engine_gpgsm.
3028 * rungpg.c: Rename GpgObject to engine_gpg_t.
3029 (struct gpg_object_s): Rename to struct engine_gpg.
3031 * context.h (struct gpgme_context): Change EngineObject to
3033 (enum ctx_op_data_type): Rename to ctx_op_data_id_t.
3034 (ctx_op_data_t): New type.
3035 (struct gpgme_context): Use it.
3036 * ops.h (_gpgme_op_data_lookup): Use new type name.
3037 * op-support.c (_gpgme_op_data_lookup): Likewise.
3038 * engine.c: Rename EngineObject to engine_t in the file. Also
3039 EngineStatusHandler to engine_status_handler_t,
3040 EngineCommandHandler to engine_command_handler_t and
3041 EngineColonLineHandler to engine_colon_line_handler.
3042 * rungpg.c (start): Likewise.
3043 * engine-gpgsm.c: Likewise.
3044 * engine-backend.h (struct engine_ops): Likewise
3045 * engine.h (struct engine_object_s): Rename to struct engine.
3046 (EngineObject): Rename to engine_t. Also everywhere else in the
3048 (EngineStatusHandler): Rename to engine_status_handler_t.
3049 (EngineColonLineHandler): Rename to engine_colon_line_handler_t.
3050 (EngineCommandHandler): Rename to engine_command_handler_t.
3052 * engine-gpgsm.c (gpgsm_export): Fix bug in last change.
3054 * Makefile.am (libgpgme_la_SOURCES): Remove recipient.c, add
3056 * gpgme.h (gpgme_recipients_t): Removed.
3057 (gpgme_recipients_new, gpgme_recipients_release,
3058 gpgme_recipients_add_name,
3059 gpgme_recipients_add_name_with_validity, gpgme_recipients_count,
3060 gpgme_recipients_enum_open, gpgme_recipients_enum_read,
3061 gpgme_recipients_enum_close): Removed.
3062 (gpgme_op_encrypt, gpgme_op_encrypt_start, gpgme_op_encrypt_sign,
3063 gpgme_op_encrypt_sign_start, gpgme_op_export_start,
3064 gpgme_op_export): Change second argument to gpgme_user_id_t.
3065 (gpgme_user_ids_release): New prototype.
3066 (gpgme_user_ids_append): Likewise.
3067 * ops.h (_gpgme_recipients_all_valid): Remove.
3068 (_gpgme_user_ids_all_valid): Add.
3069 * context.h (struct gpgme_recipients): Removed.
3070 * user-id.c: New file.
3071 * recipient.c: Removed file.
3072 * rungpg.c (append_args_from_recipients): Change last arg to
3073 gpgme_user_id_t. Reimplement.
3074 (gpg_encrypt): Change second arg to gpgme_user_id_t.
3075 (gpg_encrypt_sign): Likewise.
3076 (gpg_export): Likewise. Rewrite user ID list code.
3077 * engine.c (_gpgme_engine_op_encrypt): Change second arg to
3079 (_gpgme_engine_op_encrypt_sign): Likewise.
3080 (_gpgme_engine_op_export): Likewise.
3081 * engine.h (_gpgme_engine_op_encrypt, _gpgme_engine_op_encrypt_sign,
3082 _gpgme_engine_op_export): Likewise.
3083 * engine-gpgsm.c (set_recipients): Likewise. Rewrite loop code.
3084 (gpgsm_encrypt): Likewise.
3085 (gpgsm_export): Likewise.
3086 * engine-backend.h (struct engine_ops): Likewise for members
3087 ENCRYPT, ENCRYPT_SIGN and EXPORT.
3088 * export.c (export_start, gpgme_op_export_start, gpgme_op_export):
3090 * encrypt.c (encrypt_start): Likewise. Don't check for count of
3092 (gpgme_op_encrypt_start): Likewise.
3093 (gpgme_op_encrypt): Likewise.
3094 * encrypt-sign.c (encrypt_sign_start): Likewise.
3095 (gpgme_op_encrypt_sign): Likewise.
3096 (gpgme_op_encrypt_sign_start): Likewise.
3098 2003-05-27 Marcus Brinkmann <marcus@g10code.de>
3100 * gpgme.h (struct _gpgme_op_import_result): Add skipped_new_keys.
3101 * import.c (parse_import_res): Add skipped_new_keys parser.
3103 * op-support.c (_gpgme_parse_inv_userid): Add missing break
3105 * encrypt.c (gpgme_op_encrypt): Use gpgme_error_t instead of int.
3107 2003-05-27 Marcus Brinkmann <marcus@g10code.de>
3109 * encrypt.c (gpgme_op_encrypt_result): Use intermediate variable
3110 HOOK to avoid compiler warning. Don't ask, you don't want to know.
3111 (_gpgme_encrypt_status_handler): Likewise.
3112 (_gpgme_op_encrypt_init_result): Likewise.
3113 * decrypt.c (gpgme_op_decrypt_result): Likewise.
3114 (_gpgme_decrypt_status_handler): Likewise.
3115 (_gpgme_op_decrypt_init_result): Likewise.
3116 * verify.c (gpgme_op_verify_result): Likewise.
3117 (_gpgme_verify_status_handler): Likewise.
3118 (_gpgme_op_verify_init_result): Likewise.
3119 * edit.c (edit_status_handler): Likewise.
3120 (command_handler): Likewise.
3121 (edit_start): Likewise.
3122 * genkey.c (gpgme_op_genkey_result): Likewise.
3123 (genkey_status_handler): Likewise.
3124 (genkey_start): Likewise.
3125 * import.c (gpgme_op_import_result): Likewise.
3126 (import_status_handler): Likewise.
3127 (_gpgme_op_import_start): Likewise.
3128 * trustlist.c (gpgme_op_trustlist_next): Likewise.
3129 (_gpgme_op_trustlist_event_cb): Likewise.
3130 (gpgme_op_trustlist_start): Likewise.
3131 * keylist.c (gpgme_op_keylist_result): Likewise.
3132 (keylist_colon_handler): Likewise.
3133 (keylist_status_handler): Likewise.
3134 (_gpgme_op_keylist_event_cb): Likewise.
3135 (gpgme_op_keylist_start): Likewise.
3136 (gpgme_op_keylist_ext_start): Likewise.
3137 (gpgme_op_keylist_next): Likewise.
3138 * passphrase.c (_gpgme_passphrase_status_handler): Likewise.
3139 (_gpgme_passphrase_command_handler_internal): Likewise.
3140 * sign.c (gpgme_op_sign_result): Likewise.
3141 (_gpgme_sign_status_handler): Likewise.
3142 (_gpgme_op_sign_init_result): Likewise.
3144 * passphrase.c (_gpgme_passphrase_command_handler_internal): Fix
3145 access to pointer type.
3147 2003-05-26 Marcus Brinkmann <marcus@g10code.de>
3149 * engine.h (EngineCommandHandler): Change last argument to int fd.
3150 * gpgme.h (gpgme_passphrase_cb_t): Rewritten to take parts of the
3152 (gpgme_edit_cb_t): Change last argument to int fd.
3153 * ops.h (_gpgme_passphrase_command_handler_internal): New prototype.
3154 * passphrase.c: Include <assert.h>.
3155 (op_data_t): Rename userid_hint to uid_hint, remove last_pw_handle.
3156 (release_op_data): Check values before calling free.
3157 (_gpgme_passphrase_status_handler): Likewise.
3158 (_gpgme_passphrase_command_handler_internal): New function.
3159 (_gpgme_passphrase_command_handler): Rewritten.
3160 * edit.c (edit_status_handler): Pass -1 as fd argument.
3161 (command_handler): Update prototype. New variable processed. Use
3162 it to store return value of
3163 _gpgme_passphrase_command_handler_internal which is now used
3164 instead _gpgme_passphrase_command_handler. Use it also to check
3165 if we should call the user's edit function. Pass fd to user's
3167 * rungpg.c (struct gpg_object_s): Change type of cmd.cb_data to
3169 (gpg_release): Check value before calling free. Do not release
3171 (command_cb): Function removed.
3172 (command_handler): New function. Thus we don't use a data object
3173 for command handler stuff anymore, but handle it directly. This
3174 allows proper error reporting (cancel of passphrase requests, for
3175 example). Also all callbacks work via direct writes to the file
3176 descriptor (so that passphrases are not kept in insecure memory).
3177 (gpg_set_command_handler): Rewritten to use even more ugly hacks.
3178 (read_status): Check cmd.keyword before calling free. Install
3179 command_handler as the I/O callback handler with GPG as private
3182 * rungpg.c (gpg_new): Add --enable-progress-filter to gpg
3184 * decrypt-verify.c (_gpgme_op_decrypt_verify_start): Rename to
3185 decrypt_verify_start.
3186 (gpgme_op_decrypt_verify_start): Call decrypt_verify_start.
3187 (gpgme_op_decrypt_verify): Likewise.
3188 * verify.c (verify_status_handler): New function that also calls
3189 progress status handler.
3190 (_gpgme_op_verify_start): Set status handler to verify_status_handler.
3191 Rename to (verify_start).
3192 (gpgme_op_verify_start): Call verify_start.
3193 (gpgme_op_verify): Likewise.
3194 * encrypt.c (encrypt_status_handler): New function.
3195 (_gpgme_encrypt_sym_status_handler): Call progress status handler.
3196 Make static. Rename to encrypt_sym_status_handler.
3197 (encrypt_start): Set status handler to encrypt_sym_status_handler
3198 or encrypt_status_handler.
3199 * sign.c (sign_status_handler): New function.
3200 (sign_start): Set status handler to sign_status_handler.
3201 * decrypt.c (decrypt_status_handler): New function that also calls
3202 progress status handler.
3203 (decrypt_start): Set status handler to decrypt_status_handler.
3204 * encrypt-sign.c (encrypt_sign_status_handler): Likewise.
3205 * decrypt-verify.c (decrypt_verify_status_handler): Call
3206 _gpgme_progress_status_handler.
3208 * conversion.c (_gpgme_decode_c_string): Add missing break
3211 * recipient.c (gpgme_recipients_add_name_with_validity): Add one
3212 to buffer to allocate.
3214 2003-05-19 Marcus Brinkmann <marcus@g10code.de>
3216 * verify.c (parse_new_sig): Fix ERRSIG case.
3217 Submitted by Benjamin Lee <benjaminlee@users.sf.net>.
3219 2003-05-18 Marcus Brinkmann <marcus@g10code.de>
3221 * gpgme.h: The following types are renamed. The old name is kept
3222 as a deprecated typedef.
3223 (GpgmeCtx): Rename to gpgme_ctx_t.
3224 (GpgmeData): Rename to gpgme_data_t.
3225 (GpgmeRecipients): Rename to gpgme_recipients_t.
3226 (GpgmeError): Rename to gpgme_error_t.
3227 (GpgmeDataEncoding): Rename to gpgme_data_encoding_t.
3228 (GpgmePubKeyAlgo): Rename to gpgme_pubkey_algo_t.
3229 (GpgmeHashAlgo): Rename to gpgme_hash_algo_t.
3230 (GpgmeSigStat): Rename to gpgme_sig_stat_t.
3231 (GpgmeSigMode): Rename to gpgme_sig_mode_t.
3232 (GpgmeAttr): Rename to gpgme_attr_t.
3233 (GpgmeValidity): Rename to gpgme_validity_t.
3234 (GpgmeProtocol): Rename to gpgme_protocol_t.
3235 (GpgmeStatusCode): Rename to gpgme_status_code_t.
3236 (GpgmeEngineInfo): Rename to gpgme_engine_info_t.
3237 (GpgmeSubkey): Rename to gpgme_subkey_t.
3238 (GpgmeKeySig): Rename to gpgme_keysig_t.
3239 (GpgmeUserID): Rename to gpgme_user_id_t.
3240 (GpgmePassphraseCb): Rename to gpgme_passphrase_cb_t.
3241 (GpgmeProgressCb): Rename to gpgme_progress_cb_t.
3242 (GpgmeEditCb): Rename to gpgme_edit_cb_t.
3243 (GpgmeIOCb): Rename to gpgme_io_cb_t.
3244 (GpgmeRegisterIOCb): Rename to gpgme_register_io_cb_t.
3245 (GpgmeRemoveIOCb): Rename to gpgme_remove_io_cb_t.
3246 (GpgmeEventIO): Rename to gpgme_event_io_t.
3247 (GpgmeEventIOCb): Rename to gpgme_event_io_cb_t.
3248 (GpgmeIOCbs): Rename to gpgme_io_cbs.
3249 (gpgme_io_cbs_t): New type.
3250 (GpgmeDataReadCb): Rename to gpgme_data_read_cb_t.
3251 (GpgmeDataWriteCb): Rename to gpgme_data_write_cb_t.
3252 (GpgmeDataSeekCb): Rename to gpgme_data_seek_cb_t.
3253 (GpgmeDataReleaseCb): Rename to gpgme_data_release_cb_t.
3254 (GpgmeDataCbs): Rename to gpgme_data_cbs.
3255 (gpgme_data_cbs_t): New type.
3256 (GpgmeInvalidUserID): Rename to gpgme_invalid_user_id_t.
3257 (GpgmeEncryptResult): Rename to gpgme_encrypt_result_t.
3258 (GpgmeDecryptResult): Rename to gpgme_decrypt_result_t.
3259 (GpgmeNewSignature): Rename to gpgme_new_signature_t.
3260 (GpgmeSignResult): Rename to gpgme_sign_result_t.
3261 (GpgmeSigNotation): Rename to gpgme_sig_notation_t.
3262 (GpgmeSignature): Rename to gpgme_signature_t.
3263 (GpgmeVerifyResult): Rename to gpgme_verify_result_t.
3264 (GpgmeImportStatus): Rename to gpgme_import_status_t.
3265 (GpgmeImportResult): Rename to gpgme_import_result_t.
3266 (GpgmeGenKeyResult): Rename to gpgme_genkey_result_t.
3267 (GpgmeKeyListResult): Rename to gpgme_keylist_result_t.
3268 (GpgmeTrustItem): Rename to gpgme_trust_item_t.
3269 * gpgme.h (gpgme_deprecated_error_t): New type, swallowing macros
3270 GPGME_No_Recipients, GPGME_Invalid_Recipient and
3271 GPGME_No_Passphrase.
3272 * data.h (struct gpgme_data_s): Rename to struct gpgme_data.
3273 * context.h (struct gpgme_context_s): Rename to struct
3275 (struct gpgme_recipients_s): Rename to gpgme_recipients.
3277 2003-05-18 Marcus Brinkmann <marcus@g10code.de>
3279 * keylist.c (finish_key): Clear OPD->tmp_uid.
3281 2003-05-18 Marcus Brinkmann <marcus@g10code.de>
3283 * verify.c (_gpgme_verify_status_handler): Return GPGME_No_Data
3284 for NODATA status without signatures.
3286 2003-05-05 Marcus Brinkmann <marcus@g10code.de>
3288 * key.c (_gpgme_key_append_name): Use decoded string to parse user id.
3289 (_gpgme_key_add_sig): Likewise.
3291 2003-05-04 Marcus Brinkmann <marcus@g10code.de>
3293 * context.h (struct gpgme_context_s): Remove member op_info.
3295 * key.c (_gpgme_key_add_sig): Initialize SIG->uid.
3297 * gpgme.h (GpgmeError): Add deprecated values for
3298 GPGME_Invalid_Type and GPGME_Invalid_Mode.
3300 2003-04-30 Marcus Brinkmann <marcus@g10code.de>
3302 * gpgme.h (gpgme_get_op_info): Remove prototype.
3303 * ops.h (_gpgme_set_op_info,
3304 _gpgme_data_release_and_return_string, _gpgme_data_get_as_string,
3305 _gpgme_data_append, _gpgme_data_append_string,
3306 _gpgme_data_append_string_for_xml, _gpgme_data_append_for_xml,
3307 _gpgme_data_append_percentstring_for_xml): Likewise.
3308 (_gpgme_progress_status_handler): Change first arg to void *.
3309 * progress.c (_gpgme_progress_status_handler): Likewise.
3310 * conversion.c: Do not include <string.h>, <errno.h>, <ctype.h>,
3311 and <sys/types.h>, but <string.h>.
3312 (_gpgme_data_append): Remove function.
3313 (_gpgme_data_append_string): Likewise.
3314 (_gpgme_data_append_for_xml): Likewise.
3315 (_gpgme_data_append_string_for_xml): Likewise.
3316 (_gpgme_data_append_percentstring_for_xml): Likewise.
3317 * data-mem.c (_gpgme_data_get_as_string): Likewise.
3318 (_gpgme_data_release_and_return_string): Likewise.
3319 * gpgme.c (gpgme_get_op_info): Likewise.
3320 (_gpgme_set_op_info): Likewise.
3322 * gpgme.h (struct _gpgme_key): New structure.
3323 (GpgmeKey): Define using _gpgme_key.
3324 (struct _gpgme_subkey): New structure.
3325 (GpgmeSubKey): New type.
3326 (struct _gpgme_key_sig): New structure.
3327 (GpgmeKeySig): New type.
3328 (struct _gpgme_user_id): New structure.
3329 (GpgmeUserID): New type.
3330 (struct _gpgme_op_keylist_result): New structure.
3331 (GpgmeKeyListResult): New type.
3332 (gpgme_op_keylist_result): New function.
3333 (gpgme_key_get_as_xml): Remove prototype.
3334 * context.h (struct gpgme_context_s): Remove members tmp_key,
3335 tmp_uid, key_cond and key_queue.
3336 (struct key_queue_item_s): Remove structure.
3337 (struct user_id_s): Remove structure.
3338 (struct gpgme_recipients_s): Replace with simple
3340 * gpgme.c (gpgme_release): Do not release CTX->tmp_key.
3341 * ops.h (_gpgme_key_add_subkey, _gpgme_key_append_name,
3342 _gpgme_key_add_sig, _gpgme_trust_item_new): New prototypes.
3343 * rungpg.c (command_cb): Return GpgmeError instead int.
3344 New variable ERR. Use it to hold return value of cmd handler.
3345 (gpg_delete): Access fingerprint of key directly.
3346 (append_args_from_signers): Likewise.
3347 (gpg_edit): Likewise.
3348 (append_args_from_recipients): Use GpgmeUserID for recipient list.
3349 * engine-gpgsm.c: Do not include "key.h".
3350 (gpgsm_delete): Access fingerprint of key directly.
3351 (gpgsm_sign): Likewise.
3352 (set_recipients): Use GpgmeUserID for recipients. Invert invalid
3354 * key.h: File removed.
3355 * key.c: Completely reworked to use exposed GpgmeKey data types.
3356 * keylist.c: Likewise.
3357 * recipient.c: Completely reworked to use GpgmeUserID.
3359 2003-04-29 Marcus Brinkmann <marcus@g10code.de>
3361 * gpgme.h (gpgme_get_key): Remove force_update argument.
3362 * key-cache.c: File removed.
3363 * Makefile.am (libgpgme_la_SOURCES): Remove key-cache.c.
3364 * ops.h (_gpgme_key_cache_add, _gpgme_key_cache_get): Remove
3366 * keylist.c (_gpgme_op_keylist_event_cb): Don't call
3367 _gpgme_key_cache_add.
3368 (gpgme_get_key): New function.
3369 * verify.c (gpgme_get_sig_key): Remove last argument to
3370 gpgme_get_key invocation.
3372 * gpgme.h (struct _gpgme_trust_item): New structure.
3373 (GpgmeTrustItem): New type.
3374 (gpgme_trust_item_ref, gpgme_trust_item_unref): New prototypes.
3375 * context.h (struct trust_queue_item_s): Remove structure.
3376 (struct gpgme_context_s): Remove trust_queue member.
3377 * Makefile.am (libgpgme_la_SOURCES): Add trust-item.c.
3378 * trust-item.c: New file.
3379 * trustlist.c: Do not include <stdio.h> or <time.h>, but
3381 (struct trust_queue_item_s): Change to new type op_data_t.
3382 (trust_status_handler): Change first argument to void *.
3383 (trust_colon_handler): Likewise.
3384 (_gpgme_op_trustlist_event_cb): Use op_data_t type.
3385 (gpgme_op_trustlist_start): Use op_data_t and rework error
3387 (gpgme_op_trustlist_next): Use op_data_t.
3388 (gpgme_trust_item_release): Remove function.
3389 (gpgme_trust_item_get_string_attr): Likewise.
3390 (gpgme_trust_item_get_int_attr): Likewise.
3392 * verify.c (calc_sig_summary): Do not set GPGME_SIGSUM_SYS_ERROR
3395 2003-04-28 Marcus Brinkmann <marcus@g10code.de>
3397 * context.h: Remove OPDATA_VERIFY_COLLECTING.
3398 (struct gpgme_context_s): Remove member notation.
3399 * gpgme.h: Make enum for GPGME_KEYLIST_MODE_* values.
3401 * gpgme.h (struct _gpgme_sig_notation): New structure.
3402 (GpgmeSigNotation): New type.
3403 (struct _gpgme_signature): New structure.
3404 (GpgmeSignature): New type.
3405 (struct _gpgme_op_verify_result): New structure.
3406 (GpgmeVerifyResult): New type.
3407 (gpgme_op_verify_result): New prototype.
3408 (gpgme_get_notation): Remove prototype.
3409 * ops.h (_gpgme_op_verify_init_result): New prototype.
3410 (_gpgme_verify_status_handler): Change first argument to void *.
3411 * util.h (_gpgme_decode_percent_string, _gpgme_map_gnupg_error):
3413 * conversion.c (_gpgme_decode_percent_string): New function.
3414 (gnupg_errors): New static global.
3415 (_gpgme_map_gnupg_error): New function.
3416 * gpgme.c (gpgme_release): Don't release CTX->notation.
3417 (gpgme_get_notation): Remove function.
3418 * decrypt-verify.c (_gpgme_op_decrypt_verify_start): Call
3419 _gpgme_op_verify_init_result.
3420 * verify.c: Do not include <stdio.h>, <assert.h> and "key.h", but
3421 do include "gpgme.h".
3422 (struct verify_result): Replace with ...
3423 (op_data_t): ... this type.
3424 (release_verify_result): Remove function.
3425 (release_op_data): New function.
3426 (is_token): Remove function.
3427 (skip_token): Remove function.
3428 (copy_token): Remove function.
3429 (gpgme_op_verify_result): New function.
3430 (calc_sig_summary): Rewritten.
3431 (finish_sig): Remove function.
3432 (parse_new_sig): New function.
3433 (parse_valid_sig): New function.
3434 (parse_notation): New function.
3435 (parse_trust): New function.
3436 (parse_error): New function.
3437 (_gpgme_verify_status_handler): Rewritten. Change first argument
3439 (_gpgme_op_verify_start): Rework error handling. Call
3440 _gpgme_op_verify_init_result.
3441 (gpgme_op_verify): Do not release or clear CTX->notation.
3442 (gpgme_get_sig_status): Rewritten.
3443 (gpgme_get_sig_string_attr): Likewise.
3444 (gpgme_get_sig_ulong_attr): Likewise.
3445 (gpgme_get_sig_key): Likewise.
3447 * gpgme.h (struct _gpgme_op_decrypt_result): New structure.
3448 (GpgmeDecryptResult): New type.
3449 (gpgme_op_decrypt_result): New prototype.
3450 * ops.h (_gpgme_op_decrypt_init_result): New prototype.
3451 (_gpgme_decrypt_status_handler): Fix prototype.
3452 (_gpgme_decrypt_start): Remove prototype.
3453 * decrypt-verify.c: Do not include <stdio.h>, <stdlib.h>,
3454 <string.h> and <assert.h>, "util.h" and "context.h", but
3456 (decrypt_verify_status_handler): Change first argument to void *,
3457 and rework error handling.
3458 (_gpgme_op_decrypt_verify_start): New function.
3459 (gpgme_op_decrypt_verify_start): Rewrite using
3460 _gpgme_op_decrypt_verify_start.
3461 (gpgme_op_decrypt_verify): Likewise.
3462 * decrypt.c: Include <string.h>, "gpgme.h" and "util.h".
3463 (struct decrypt_result): Change to typedef op_data_t, rewritten.
3464 (is_token): Remove function.
3465 (release_op_data): New function.
3466 (skip_token): Remove function.
3467 (gpgme_op_decrypt_result): New function.
3468 (_gpgme_decrypt_status_handler): Change first argument to void *.
3469 Rework error handling.
3470 (_gpgme_decrypt_start): Rename to ...
3471 (decrypt_start): ... this. Call _gpgme_op_decrypt_init_result.
3472 (_gpgme_op_decrypt_init_result): New function.
3473 (gpgme_op_decrypt_start): Use decrypt_start.
3474 (gpgme_op_decrypt): Likewise.
3476 2003-04-27 Marcus Brinkmann <marcus@g10code.de>
3478 * encrypt-sign.c: Do not include <stddef.h>, <stdio.h>,
3479 <stdlib.h>, <string.h>, <assert.h> and "util.h", but "gpgme.h".
3480 (_gpgme_op_encrypt_sign_start): Rename to ...
3481 (encrypt_sign_start): ... this.
3482 (gpgme_op_encrypt_sign_start): Use encrypt_sign_start, not
3483 _gpgme_op_encrypt_sign_start.
3484 (gpgme_op_encrypt_sign): Likewise.
3486 * gpgme.h (GpgmeEncryptResult): New data type.
3487 (gpgme_op_encrypt_result): New prototype.
3488 * ops.h (_gpgme_op_encrypt_init_result): New prototype.
3489 (_gpgme_op_encrypt_status_handler): Fix prototype.
3490 * encrypt-sign.c (_gpgme_op_encrypt_sign_start): Call
3491 _gpgme_op_encrypt_init_result.
3492 * encrypt.c: Do not include <stdio.h>, <assert.h>, "util.h" and
3493 "wait.h". Include <errno.h> and "gpgme.h".
3494 (SKIP_TOKEN_OR_RETURN): Remove macro.
3495 (struct encrypt_result): Rename to ...
3496 (op_data_t): ... new data type. Rewrite for user result data.
3497 (append_xml_encinfo): Remove function.
3498 (release_op_data): New function.
3499 (gpgme_op_encrypt_result): New function.
3500 (_gpgme_op_encrypt_status_handler): Change first argument to void *.
3501 Rewrite result parsing.
3502 (_gpgme_op_encrypt_sym_status_handler): Change first argument to
3504 (_gpgme_op_encrypt_init_result): New function.
3505 (_gpgme_op_encrypt_start): Rename to ...
3506 (encrypt_start): ... this.
3507 (gpgme_op_encrypt_start): Use encrypt_start, not
3508 gpgme_op_encrypt_start.
3509 (gpgme_op_encrypt): Likewise.
3511 * gpgme.h (GpgmePubKeyAlgo, GpgmeHashAlgo, GpgmeInvalidUserID,
3512 GpgmeNewSignature, GpgmeSignResult): New data types.
3513 (gpgme_op_sign_result, gpgme_pubkey_algo_name,
3514 gpgme_hash_algo_name): New prototypes.
3515 * gpgme.c (gpgme_pubkey_algo_name): New function.
3516 (gpgme_hash_algo_name): Likewise.
3517 * ops.h (_gpgme_parse_inv_userid, _gpgme_op_sign_init_result): New
3519 (_gpgme_op_sign_status_handler): Fix prototype.
3520 * op-support.c: Include <errno.h> and <string.h>.
3521 (_gpgme_parse_inv_userid): New function.
3522 * sign.c: Include <errno.h> and "gpgme.h", but not <stdio.h>,
3523 <assert.h> and "util.h".
3524 (SKIP_TOKEN_OR_RETURN): Remove macro.
3525 (struct sign_result): Change to op_data_t type and rework it.
3526 (release_sign_result): Rename to ...
3527 (release_op_data): ... this and rewrite it.
3528 (append_xml_info): Remove function.
3529 (gpgme_op_sign_result): New function.
3530 (parse_sig_created): New function.
3531 (_gpgme_sign_status_handler): Change first argument to void *.
3532 Rewrite the function to use the new result structure and functions.
3533 (_gpgme_op_sign_init_result): New function.
3534 (_gpgme_op_sign_start): Rename to ...
3535 (sign_start): ... this. Call _gpgme_op_sign_init_result.
3536 (gpgme_op_sign_start): Use sign_start instead _gpgme_op_sign_start.
3537 (gpgme_op_sign): Likewise.
3538 * encrypt-sign.c (_gpgme_op_encrypt_sign_start): Call
3539 _gpgme_op_sign_init_result.
3541 * delete.c: Include <errno.h> and "gpgme.h", but not "util.h" or
3543 (enum delete_problem): Move into function delete_status_handler.
3544 (delete_status_handler): Change first argument to void *. Parse
3545 delete problem with strtol instead atoi. Return better error
3547 (_gpgme_op_delete_start): Rename to ...
3548 (delete_start): ... this. Rework error handling.
3549 (gpgme_op_delete_start): Use delete_start instead
3550 _gpgme_op_delete_start.
3551 (gpgme_op_delete): Likewise.
3552 * gpgme.h (GpgmeDataType): Removed.
3554 2003-04-25 Marcus Brinkmann <marcus@g10code.de>
3556 * gpgme.h: Change GPGME_IMPORT_PRIVATE to GPGME_IMPORT_SECRET.
3557 * import.c (parse_import_res): Parse unchanged field.
3559 * gpgme.h: New enum for GPGME_IMPORT_NEW, GPGME_IMPORT_UID,
3560 GPGME_IMPORT_SIG, GPGME_IMPORT_SUBKEY, GPGME_IMPORT_PRIVATE.
3561 (GpgmeError): GPGME_Unknown_Reason, GPGME_Not_Found,
3562 GPGME_Ambiguous_Specification, GPGME_Wrong_Key_Usage,
3563 GPGME_Key_Revoked, GPGME_Key_Expired, GPGME_No_CRL_Known,
3564 GPGME_CRL_Too_Old, GPGME_Policy_Mismatch, GPGME_No_Secret_Key,
3565 GPGME_Key_Not_Trusted, GPGME_Issuer_Missing, GPGME_Chain_Too_Long,
3566 GPGME_Unsupported_Algorithm, GPGME_Sig_Expired,
3567 GPGME_Bad_Signature, GPGME_No_Public_Key added as new error codes.
3568 (struct _gpgme_import_status): New structure.
3569 (GpgmeImportStatus): New type.
3570 (struct _gpgme_op_import_result): New structure.
3571 (GpgmeImportResult): New type.
3572 (gpgme_op_import_result): New function.
3573 * import.c: Include <errno.h> and "gpgme.h", but not "util.h".
3574 (struct import_result): Change to type op_data_t.
3575 (release_import_result): Rename to ...
3576 (release_op_data): ... this.
3577 (append_xml_impinfo): Function removed.
3578 (gpgme_op_import_result): New function.
3579 (parse_import): New function.
3580 (parse_import_res): Likewise.
3581 (import_status_handler): Change first argument to void *. Rewrite
3582 to use new functions.
3583 (_gpgme_op_import_start): Rework error handling.
3585 * edit.c: Do not include <assert.h>, "util.h", but "gpgme.h".
3586 (edit_resut): Change to typedef for op_data_t.
3587 (edit_status_handler): Change first argument to void *.
3588 Rework error handling.
3589 (command_handler): Rework error handling.
3590 (_gpgme_op_edit_start): Rename to ...
3591 (edit_start): ... this. Rework error handling.
3592 (gpgme_op_edit_start): Rewrite using edit_start.
3593 (gpgme_op_edit): Likewise.
3595 * ops.h (_gpgme_passphrase_start): Remove prototype.
3596 * passphrase.c: Do not include <assert.h>, "util.h" or
3597 "debug.h", but "gpgme.h".
3598 (struct passphrase_result): Change to typedef for op_data_t.
3599 (release_passphrase_result): Rename to release_op_data.
3600 (_gpgme_passphrase_status_handler): Change first argument to void *.
3601 Use new op_data_t type.
3602 (_gpgme_passphrase_command_handler): Use new op_data_t type.
3603 (_gpgme_passphrase_start): Remove function.
3604 * decrypt.c (_gpgme_decrypt_start): Rewrite error handling. Do
3605 not call _gpgme_passphrase_start, but install command handler.
3606 * encrypt.c (_gpgme_op_encrypt_start): Likewise.
3607 * encrypt-sign.c (_gpgme_op_encrypt_sign_start): Likewise.
3608 * sign.c (_gpgme_op_sign_start): Likewise.
3610 * context.h (struct gpgme_context_s): Remove member initialized,
3611 use_cms and help_data_1. Add member protocol. Make use_armor and
3612 use_textmode bit flags. Make keylist_mode, include_certs,
3613 signers_len and signers_size unsigned.
3614 * gpgme.c (gpgme_new): Initialize CTX->protocol.
3615 (gpgme_set_protocol): Do not check CTX. Use CTX->protocol.
3616 (gpgme_get_protocol): Likewise.
3617 (gpgme_release): Do not release CTX->help_data_1.
3618 * op-support.c (_gpgme_op_reset): Use CTX->protocol.
3620 * wait-private.c (_gpgme_wait_private_event_cb): Remove variable CTX.
3622 * data.c: Do not include <assert.h>, but "gpgme.h".
3623 (_gpgme_data_inbound_handler): Expand _gpgme_data_append, because
3624 it will go. Do not assert DH.
3625 (_gpgme_data_outbound_handler): Do not assert DH.
3627 * export.c: Do not include <stdlib.h>, "debug.h" and "util.h", but
3629 (export_status_handler): Change type of first argument to void *.
3630 (_gpgme_op_export_start): Rename to ...
3631 (export_start): ... this. Rework error handling.
3632 (gpgme_op_export_start): Rewritten to use export_start instead
3633 _gpgme_op_export_start.
3634 (gpgme_op_export): Likewise.
3636 * gpgme.h (GpgmeError): Add GPGME_Busy, GPGME_No_Request.
3637 (GPGME_No_Recipients, GPGME_Invalid_Recipient,
3638 GPGME_No_Passphrase): New macros.
3640 * key.c (gpgme_key_get_string_attr): Fix validity attribute.
3642 2003-04-24 Marcus Brinkmann <marcus@g10code.de>
3644 * gpgme.h (struct _gpgme_op_genkey_result): New structure.
3645 (GpgmeGenKeyResult): New type.
3646 (gpgme_op_genkey): Drop last argument.
3647 (gpgme_op_genkey_result): New function.
3648 * genkey.c: Do not include "util.h", but "gpgme.h".
3649 (struct genkey_result): Replace with ...
3650 (op_data_t): ... this new type.
3651 (release_genkey_result): Replace with ...
3652 (release_op_data): ... this new function.
3653 (gpgme_op_genkey_result): New function.
3654 (genkey_status_handler): Rewritten using new op_data_t type.
3655 (get_key_parameter): New function.
3656 (_gpgme_op_genkey_start): Renamed to
3657 (genkey_start): ... this and rewritten.
3658 (gpgme_op_genkey_start): Use genkey_start instead
3659 _gpgme_op_genkey_start.
3660 (gpgme_op_genkey): Rewritten. Remove FPR argument.
3662 * context.h (struct gpgme_context_s): Remove member verbosity.
3663 * gpgme.c (gpgme_new): Do not set member verbosity.
3664 * engine.h (_gpgme_engine_set_verbosity): Remove prototype.
3665 * engine.c (_gpgme_engine_set_verbosity): Remove function.
3666 * engine-backend.h (struct engine_ops): Remove set_verbosity.
3667 * engine-gpgsm.c (_gpgme_engine_ops_gpgsm): Remove set_verbosity member.
3668 * rungpg.c (_gpgme_engine_ops_gpg): Likewise.
3669 (gpg_set_verbosity): Remove function.
3670 * decrypt.c (_gpgme_decrypt_start): Don't call
3671 _gpgme_engine_set_verbosity.
3672 * delete.c (_gpgme_op_delete_start): Likewise.
3673 * edit.c (_gpgme_op_edit_start): Likewise.
3674 * encrypt.c (_gpgme_op_encrypt_start): Likewise.
3675 * encrypt-sign.c (_gpgme_op_encrypt_sign_start): Likewise.
3676 * export.c (_gpgme_op_export_start): Likewise.
3677 * genkey.c (_gpgme_op_genkey_start): Likewise.
3678 * import.c (_gpgme_op_import_start): Likewise.
3679 * keylist.c (gpgme_op_keylist_start): Likewise.
3680 (gpgme_op_keylist_ext_start): Likewise.
3681 * sign.c (_gpgme_op_sign_start): Likewise.
3682 * verify.c (_gpgme_op_verify_start): Likewise.
3684 * Makefile.am (libgpgme_la_SOURCES): Add key-cache.c.
3685 * key.c (key_cache_initialized, key_cache_size,
3686 key_cache_max_chain_length, ): Removed.
3687 (struct key_cache_item_s, key_cache_lock, key_cache,
3688 key_cache_unused_items, hash_key, _gpgme_key_cache_add,
3689 _gpgme_key_cache_get, gpgme_get_key): Moved to ...
3690 * key-cache.c: ... here. New file.
3691 * key.h (_gpgme_key_cache_init): Remove prototypes.
3692 (_gpgme_key_cache_add,_gpgme_key_cache_get): Move to ...
3694 * version.c: Do not include "key.h".
3695 (do_subsystem_inits): Do not call _gpgme_key_cache_init.
3697 * mkstatus: Strip trailing comma.
3698 * gpgme.h (GpgmeStatus): Pretty print.
3700 * gpgme.h (GpgmeError): Rename GPGME_No_Passphrase to
3701 GPGME_Bad_Passphrase.
3702 * passphrase.c (_gpgme_passphrase_status_handler): Use
3703 GPGME_Bad_Passphrase instead GPGME_No_Passphrase.
3705 * gpgme.h (GpgmeError): Rename GPGME_No_Recipients to
3706 GPGME_No_UserID and GPGME_Invalid_Recipient to
3707 GPGME_Invalid_UserID.
3708 * encrypt.c (_gpgme_encrypt_status_handler): Use GPGME_No_UserID
3709 instead GPGME_No_Recipients and GPGME_Invalid_UserID instead
3710 GPGME_Invalid_Recipient.
3711 (_gpgme_op_encrypt_start): Likewise.
3713 * gpgme.h (GpgmeError): Remove GPGME_Busy and GPGME_No_Request.
3714 * wait-user.c (_gpgme_wait_user_event_cb): Don't clear CTX->pending.
3715 * wait-private.c (_gpgme_wait_private_event_cb): Likewise.
3716 * wait-global.c (gpgme_wait): Likewise.
3717 * verify.c (_gpgme_op_verify_start): Likewise.
3718 (gpgme_get_sig_status): Don't check pending flag.
3719 (gpgme_get_sig_string_attr): Likewise.
3720 (gpgme_get_sig_ulong_attr): Likewise.
3721 (gpgme_get_sig_key): Likewise.
3722 * op-support.c (_gpgme_op_reset): Likewise.
3723 * trustlist.c (gpgme_op_trustlist_start): Don't clear pending flag.
3724 (gpgme_op_trustlist_next): Don't check or clear pending flag.
3725 (gpgme_op_trustlist_end): Likewise.
3726 * sign.c (_gpgme_op_sign_start): Likewise.
3727 * context.h (struct gpgme_context_s): Remove member PENDING.
3728 * decrypt.c (_gpgme_decrypt_start): Likewise.
3729 * delete.c (_gpgme_op_delete_start): Likewise.
3730 * edit.c (_gpgme_op_edit_start): Likewise.
3731 * encrypt.c (_gpgme_op_encrypt_start): Likewise.
3732 * encrypt-sign.c (_gpgme_op_encrypt_sign_start): Likewise.
3733 * export.c (_gpgme_op_export_start): Likewise.
3734 * genkey.c (_gpgme_op_genkey_start): Likewise.
3735 * import.c (_gpgme_op_import_start): Likewise.
3736 * key.c (gpgme_get_key): Likewise.
3737 * keylist.c (gpgme_op_keylist_start): Likewise.
3738 (gpgme_op_keylist_ext_start): Likewise.
3739 (gpgme_op_keylist_next): Likewise.
3740 (gpgme_op_keylist_end): Likewise.
3741 * data-compat.c (gpgme_error_to_errno): Don't convert EBUSY.
3743 2003-02-06 Marcus Brinkmann <marcus@g10code.de>
3745 * gpgme.h (GpgmePassphraseCb): Change type to return GpgmeError,
3746 and add argument for returning the result string.
3747 (gpgme_cancel): Remove prototype.
3748 * gpgme.c (gpgme_cancel): Remove function.
3749 * context.h (struct gpgme_context_s): Remove member cancel.
3750 * passphrase.c (_gpgme_passphrase_command_handler): Call the
3751 passphrase callback in the new way.
3753 2003-01-30 Marcus Brinkmann <marcus@g10code.de>
3755 * edit.c (_gpgme_edit_status_handler): Call the progress status
3758 2003-02-05 Marcus Brinkmann <marcus@g10code.de>
3760 * wait-user.c (_gpgme_wait_user_remove_io_cb): Move check for no
3761 I/O handlers left to ...
3762 (_gpgme_user_io_cb_handler): ... here.
3764 2003-02-04 Marcus Brinkmann <marcus@g10code.de>
3766 * trustlist.c (trustlist_colon_handler): Release ITEM if name
3767 could not be allocated.
3768 (gpgme_trust_item_release): Only release name if it is allocated.
3769 Reported by Marc Mutz <Marc.Mutz@uni-bielefeld.de>.
3771 2003-02-04 Marcus Brinkmann <marcus@g10code.de>
3773 * rungpg.c (read_status): If he status handler returns an error,
3775 (status_handler): If read_status fails, just return the error.
3777 2003-02-01 Marcus Brinkmann <marcus@g10code.de>
3779 * engine-gpgsm.c (start): Handle all errors, not only most of
3781 (xtoi_1, xtoi_2): Remove macro.
3782 (status_handler): Replace use of xtoi_2 with _gpgme_hextobyte.
3784 2003-02-01 Marcus Brinkmann <marcus@g10code.de>
3786 * engine-gpgsm.c (map_assuan_error): Replace
3787 ASSUAN_Bad_Certificate_Path with ASSUAN_Bad_Certificate_Chain.
3788 (gpgsm_new): Use assuan_pipe_connect instead assuan_pipe_connect2.
3790 * util.h (DIMof): Remove macro.
3792 * ops.h (_gpgme_op_event_cb, _gpgme_op_event_cb_user,
3793 _gpgme_data_unread): Prototypes removed.
3795 2003-01-30 Marcus Brinkmann <marcus@g10code.de>
3797 * types.h: File removed.
3798 * Makefile.am (libgpgme_la_SOURCES): Remove types.h.
3799 * io.h (struct spawn_fd_item_s): Do not include "types.h".
3801 * context.h: Likewise.
3802 * cengine-gpgsm.h: Likewise.
3803 * engine.h: Include "gpgme.h" instead "types.h". Add prototypes
3804 for EngineStatusHandler, EngineColonLineHandler and
3805 EngineCommandHandler.
3806 (_gpgme_engine_set_status_handler): Change parameter type from
3807 GpgmeStatusHandler to EngineStatusHandler.
3808 (_gpgme_engine_set_command_handler): Change parameter type from
3809 GpgmeCommandHandler to EngineCommandHandler.
3810 (_gpgme_engine_set_colon_line_handler): Change parameter type from
3811 GpgmeColonLineHandler to EngineColonLineHandler.
3812 * engine-backend.h: Include "engine.h" instead "types.h".
3813 (struct engine_ops): Change Gpgme*Handler parameters in members
3814 set_command_handler, set_colon_line_handler and set_status_handler
3816 * engine.c (_gpgme_engine_set_status_handler): Change parameter
3817 type from GpgmeStatusHandler to EngineStatusHandler.
3818 (_gpgme_engine_set_command_handler): Change parameter type from
3819 GpgmeCommandHandler to EngineCommandHandler.
3820 (_gpgme_engine_set_colon_line_handler): Change parameter type from
3821 GpgmeColonLineHandler to EngineColonLineHandler.
3822 * rungpg.c (struct gpg_object_s): Change type of member status.fnc
3823 from GpgmeStatusHandler to EngineStatusHandler. Change type of
3824 member colon.fnc from GpgmeColonLineHandler to
3825 EngineColonLineHandler. Change type of member cmd.fnc from
3826 GpgmeCommandHandler to EngineCommandHandler.
3827 * engine-gpgsm.c (struct gpgsm_object_s): Likewise.
3828 * rungpg.c (gpg_set_status_handler): Change parameter type from
3829 GpgmeStatusHandler to EngineStatusHandler.
3830 * engine-gpgsm.c (gpgsm_set_status_handler): Likewise.
3831 (assuan_simple_command): Likewise.
3832 * rungpg.c (gpg_set_colon_line_handler): Change parameter type
3833 from GpgmeColonLineHandler to EngineColonLineHandler.
3834 * engine-gpgsm.c (gpgsm_set_colon_line_handler): Likewise.
3835 * rungpg.c (gpg_set_command_handler): Change parameter type from
3836 GpgmeCommandHandler to EngineCommandHandler.
3838 * engine-gpgsm.c (status_handler): Do not close status fd at end
3841 * ops.h (_gpgme_op_data_lookup): Add prototype.
3842 * op-support.c: Include <stdlib.h>.
3843 (_gpgme_op_data_lookup): New function.
3844 * decrypt.c (_gpgme_release_decrypt_result): Function removed.
3845 (struct decrypt_result_s): Rename to ...
3846 (struct decrypt_resul): ... this.
3847 (DecryptResult): New type.
3848 (_gpgme_decrypt_status_handler): Don't use
3849 test_and_allocate_result, but use _gpgme_op_data_lookup to
3850 retrieve result data object.
3851 * sign.c (_gpgme_release_sign_result): Function removed.
3852 (release_sign_result): New function.
3853 (struct sign_result_s): Rename to ...
3854 (struct sign_result): ... this.
3855 (SignResult): New type.
3856 (_gpgme_sign_status_handler): Don't use
3857 test_and_allocate_result, but use _gpgme_op_data_lookup to
3858 retrieve result data object.
3859 * encrypt.c (struct encrypt_result_s): Rename to ...
3860 (struct encrypt_result): ... this.
3861 (_gpgme_release_encrypt_result): Function removed.
3862 (release_encrypt_result): New function.
3863 (_gpgme_encrypt_status_handler): Don't use
3864 test_and_allocate_result, but use _gpgme_op_data_lookup to
3865 retrieve result data object.
3866 * verify.c (struct verify_result_s): Rename to ...
3867 (struct verify_result): ... this. Remove member next.
3868 (VerifyResult): New type.
3869 (_gpgme_release_verify_result): Function removed.
3870 (release_verify_result): New function.
3871 (finish_sig): Change first argument to type VerifyResult. Diddle
3872 the type of the op_data structure.
3873 (add_notation): Change first argument to type VerifyResult.
3874 (_gpgme_verify_status_handler): Don't use
3875 test_and_allocate_result, but use _gpgme_op_data_lookup to
3876 retrieve result data object.
3877 * passphrase.c (struct passphrase_result_s): Rename to ...
3878 (struct passphrase_result): ... this. Remove member next.
3879 (PassphraseResult): New type.
3880 (_gpgme_release_passphrase_result): Function removed.
3881 (release_passphrase_result): New function.
3882 (_gpgme_passphrase_status_handler): Don't use
3883 test_and_allocate_result, but use _gpgme_op_data_lookup to
3884 retrieve result data object.
3885 (_gpgme_passphrase_command_handler): Likewise.
3886 * keylist.c (struct keylist_result_s): Rename to ...
3887 (struct keylist_result): ... this. Remove member next.
3888 (KeylistResult): New type.
3889 (_gpgme_release_keylist_result): Function removed.
3890 (release_keylist_result): New function.
3891 (keylist_status_handler): Don't use
3892 test_and_allocate_result, but use _gpgme_op_data_lookup to
3893 retrieve result data object.
3894 * edit.c (struct edit_result_s): Rename to ...
3895 (struct edit_result): ... this. Remove member next.
3896 (EditResult): New type.
3897 (_gpgme_release_edit_result): Function removed.
3898 (release_edit_result): New function.
3899 (edit_status_handler): Don't use
3900 test_and_allocate_result, but use _gpgme_op_data_lookup to
3901 retrieve result data object.
3902 (command_handler): Likewise.
3903 * types.h (DecryptResult, SignResult, EncryptResult,
3904 PassphraseResult, ImportResult, DeleteResult, GenKeyResult,
3905 KeylistResult, EditResult): Types removed.
3906 * ops.h: Don't include "types.h", but "gpgme.h" and "context.h".
3907 (test_and_allocate_result): Remove macro.
3908 (_gpgme_release_decrypt_result): Remove prototype.
3909 (_gpgme_decrypt_result): Remove prototype.
3910 (_gpgme_release_sign_result): Remove prototype.
3911 (_gpgme_release_encrypt_result): Remove prototype.
3912 (_gpgme_release_passphrase_result): Remove prototype.
3913 (_gpgme_release_import_result): Remove prototype.
3914 (_gpgme_release_delete_result): Remove prototype.
3915 (_gpgme_release_genkey_result): Remove prototype.
3916 (_gpgme_release_keylist_result): Remove prototype.
3917 (_gpgme_release_edit_result): Remove prototype.
3918 (_gpgme_release_verify_result): Remove prototype.
3919 * gpgme.c (_gpgme_release_result): Rewritten.
3920 * context.h (enum ctx_op_data_type): New enum.
3921 (struct ctx_op_data): New structure.
3922 (struct gpgme_context_s): Replace the member result with a member
3924 (fail_on_pending_request): Remove macro.
3925 * op-support.c (_gpgme_op_reset): Expand macro
3926 fail_on_pending_request.
3927 * util.h: Don't include "types.h" or "debug.h", but include "gpgme.h".
3929 2003-01-30 Marcus Brinkmann <marcus@g10code.de>
3931 * types.h (EngineObject): Move typedef to ...
3932 * engine.h: ... here.
3933 * types.h (GpgObject): Move typedef to ...
3934 * rungpg.c: ... here.
3935 * types.h (GpgsmObject): Move typedef to ...
3936 * engine-gpgsm.c: ... here.
3938 * util.h (return_if_fail, return_null_if_fail,
3939 return_val_if_fail): Remove macro.
3940 * gpgme.c (gpgme_cancel): Don't use return_if_fail.
3941 * key.c (gpgme_key_ref): Likewise.
3942 * signers.c (gpgme_signers_enum): Likewise.
3943 (gpgme_signers_clear): Likewise.
3945 * engine-backend.h (struct engine_ops): Rename get_path to
3947 * gpgme.h (struct _gpgme_engine_info): Rename member path to
3949 * version.c: Do not include <stdio.h>, <stdlib.h>, context.h and
3950 util.h. Other clean ups.
3951 (parse_version_number): Protect more seriously against
3953 (gpgme_get_engine_info): Move to ...
3954 * engine.c (gpgme_get_engine_info): ... here.
3955 (_gpgme_engine_get_info): Function removed.
3956 (_gpgme_engine_get_path): Make static and rename to ...
3957 (engine_get_file_name): .. this.
3958 (_gpgme_engine_get_version): Make static and rename to ...
3959 (engine_get_version): ... this.
3960 (_gpgme_engine_get_req_version): Make static and rename to ...
3961 (engine_get_req_version): ... this.
3962 * engine.h (_gpgme_engine_get_path, _gpgme_engine_get_version,
3963 _gpgme_engine_req_version, _gpgme_engine_get_info.): Remove
3966 * gpgme.h (enum GpgmeProtocol): Remove GPGME_PROTOCOL_AUTO.
3967 * gpgme.c (gpgme_set_protocol): Don't handle GPGME_PROTOCOL_AUTO.
3968 (gpgme_get_protocol_name): New function.
3970 * engine-backend.h (struct engine_ops): New member
3971 get_req_version, remove member check_version.
3972 * engine.h (_gpgme_Engine_get_version): New prototype.
3973 * rungpg.c (gpg_get_req_version): New function.
3974 (gpg_check_version): Function removed.
3975 (_gpgme_engine_ops_gpg): Add gpg_get_req_version, remove
3977 * engine-gpgsm.c (gpgsm_get_req_version): New function.
3978 (gpgsm_check_version): Function removed.
3979 (_gpgme_engine_ops_gpgsm): Add gpgsm_get_req_version, remove
3980 gpgsm_check_version.
3981 * engine.c: Include ops.h.
3982 (_gpgme_engine_get_req_version): New function.
3983 (gpgme_engine_check_version): Rewritten.
3984 * version.c (gpgme_get_engine_info): Rewritten.
3985 * gpgme.h (gpgme_engine_info): New structure.
3986 (GpgmeEngineInfo): New type.
3988 2003-01-29 Marcus Brinkmann <marcus@g10code.de>
3990 * types.h: Remove byte and ulong types.
3991 * util.h (_gpgme_hextobyte): Change prototype to unsigned char
3993 * conversion.c (_gpgme_hextobyte): Change argument to unsigned
3995 (_gpgme_decode_c_string): Likewise, and beautify. Also support a
3996 few more escaped characters. Be more strict about buffer size.
3997 (_gpgme_data_append_percentstring_for_xml): Change type of SRC,
3998 BUF and DST to unsigned char instead byte.
3999 * progress.c (_gpgme_progress_status_handler): Use unsigned char
4001 * debug.c (trim_spaces): Likewise.
4003 * util.h (mk_error): Remove macro.
4004 * conversion.c, data.c, data-compat.c, decrypt.c, delete.c,
4005 edit.c, encrypt.c, encrypt-sign.c, engine.c, engine-gpgsm.c,
4006 export.c, genkey.c, gpgme.c, import.c, key.c, keylist.c,
4007 passphrase.c, progress.c, recipient.c, rungpg.c, sign.c,
4008 signers.c, trustlist.c, verify.c, wait.c, wait-global.c,
4009 wait-private (literally everywhere): Expand the mk_error macro.
4011 * context.h (wait_on_request_or_fail): Remove macro.
4013 * context.h (gpgme_context_s): Remove member ERROR.
4014 * types.h (GpgmeStatusHandler): Change return type to GpgmeError.
4015 (GpgmeCommandHandler): Change return type to GpgmeError and add
4016 new argument RESULT.
4017 * gpgme.h (GpgmeIOCb): Change return type to GpgmeError.
4018 (GpgmeEventIO): New event GPGME_EVENT_START.
4019 (GpgmeIdleFunc): Remove type.
4020 (gpgme_register_idle): Remove prototype.
4021 * data.c: Include <assert.h>.
4022 (_gpgme_data_inbound_handler): Change return type to GpgmeError.
4023 Return any error instead ignoring it, don't close file descriptor
4025 (_gpgme_data_outbound_handler): Likewise.
4026 * decrypt.c: Do not include <stdio.h>, <string.h> and <assert.h>.
4027 (_gpgme_decrypt_status_handler): Change return type to GpgmeError.
4028 Return error instead setting ctx->error. Return success at end of
4030 (gpgme_op_decrypt): Don't work around the old kludge anymore.
4031 * decrypt-verify.c (decrypt_verify_status_handler): Change return
4032 type to GpgmeError. Return possible errors.
4033 * delete.c: Do not include <stdio.h>, <string.h>, <time.h> and
4035 (delete_status_handler): Change return type to GpgmeError. Return
4036 error instead setting ctx->error. Return success at end of
4038 * edit.c: Do not include <stdio.h> and <string.h>.
4039 (_gpgme_edit_status_handler): Change type to GpgmeError,
4040 make static and rename to ...
4041 (edit_status_handler): ... this. Return error directly.
4042 (command_handler): Change return type to GpgmeError, add result
4043 argument. Return error directly.
4044 * encrypt.c (status_handler_finish): Remove function.
4045 (_gpgme_encrypt_status_handler): Change return type to GpgmeError.
4046 Return error directly.
4047 (_gpgme_encrypt_sym_status_handler): Likewise.
4048 * encrypt-sign.c (encrypt_sign_status_handler): Likewise.
4049 * engine-gpgsm.c (close_notify_handler): Do not signal done event
4051 (status_handler): Change return type to GpgmeError. Diddle things
4052 around a bit to return errors directly.
4053 (start): Send start event.
4054 * export.c: Do not include <stdio.h>, <string.h> and <assert.h>.
4055 (export_status_handler): Change return type to GpgmeError. Don't
4057 * genkey.c: Do not include <stdio.h> and <assert.h>.
4058 (genkey_status_handler): Change return type to GpgmeError. Don't
4059 check ctx->error. Return errors directly.
4060 * gpgme.c (_gpgme_release_result): Do not initialize ctx->error.
4061 (_gpgme_op_event_cb): Function removed.
4062 (_gpgme_op_event_cb_user): Likewise.
4063 * import.c: Do not include <stdio.h>, <string.h> and <assert.h>.
4064 (import_status_handler): Change return type to GpgmeError. Don't
4066 * keylist.c (keylist_colon_handler, keylist_status_handler, finish_key):
4067 Change return type to GpgmeError, return error directly.
4068 * Makefile (libgpgme_la_SOURCES): Add wait-global.c,
4069 wait-private.c and wait-user.c
4070 * ops.h (test_and_allocate_result): Return error instead setting
4072 (_gpgme_data_inbound_handler, _gpgme_data_outbound_handler,
4073 _gpgme_verify_status_handler, _gpgme_decrypt_status_handler,
4074 _gpgme_sign_status_handler, _gpgme_encrypt_staus_handler,
4075 _gpgme_passphrase_status_handler, _gpgme_progress_status_handler):
4076 Change return type to GpgmeError.
4077 (_gpgme_passphease_command_handler): Change return type to
4078 GpgmeError and add new argument RESULT.
4079 * op-support.c: Use new callback functions, and change private
4080 data to ctx everywhere.
4081 * passphrase.c (_gpgme_passphrase_status_handler): Change return
4082 type to GpgmeError, return error directly.
4083 (_gpgme_passphrase_command_handler): Change return type to
4084 GpgmeError, add result argument. Return results accordingly.
4085 * progress.c (_gpgme_progress_status_handler): Change return type
4086 to GpgmeError, return errors directly.
4087 * rungpg.c (status_handler): Change return type to GpgmeError.
4088 Return error directly.
4089 (close_notify_handler): Don't send done event.
4090 (colon_line_handler): Change return type to GpgmeError, return
4092 * rungpg.c (start): Send start event.
4093 * sign.c (_gpgme_sign_status_handler): Change return type to
4094 GpgmeError, return errors directly.
4095 * trustlist.c (trustlist_status_handler): Change return type to
4096 GpgmeError. Return 0.
4097 (trustlist_colon_handler): Change return type GpgmeError. Return
4099 * verify.c (add_notation): Change return type to GpgmeError,
4100 return errors directly.
4101 (_gpgme_verify_status_handler): Likewise.
4102 * wait.h (struct fd_table): Remove lock member.
4103 (struct wait_item_s): Moved here from wait.c.
4104 (struct tag): New structure.
4105 (_gpgme_wait_event_cb): Remove prototype.
4106 (_gpgme_wait_private_event_cb, _gpgme_wait_global_event_cb,
4107 _gpgme_wait_user_add_io_cb, _gpgme_wait_user_remove_io_cb,
4108 _gpgme_wait_user_event_io_cb): New prototypes.
4109 * wait.c: Don't include <stdio.h>.
4110 (ftd_global, ctx_done_list, ctx_done_list_size,
4111 ctx_done_list_length, ctx_done_list_lock, idle_function): Remove
4113 (gpgme_register_idle, do_select, _gpgme_wait_event_cb): Remove
4115 (gpgme_wait): Move to file wait-global.c.
4116 (_gpgme_add_io_cb): Take ctx as private argument, initialize ctx
4117 member in wait item and tag.
4118 (_gpgme_remove_io_cb): Take ctx from tag. Don't use FDT lock.
4119 (_gpgme_wait_one, _gpgme_wait_on_condition): Move to
4121 (gpgme_fd_table_init): Don't initialize FDT->lock.
4122 (gpgme_fd_table_deinit): Don't destroy FDT->lock.
4123 (_gpgme_fd_table_put): Make static and rename to ...
4124 (fd_table_put): ... this function. Don't use FDT->lock.
4125 (struct wait_item_s): Move to wait.h.
4126 * wait-global.c: New file.
4127 * wait-private.c: New file.
4128 * wait-user.c: New file.
4130 * key.c (gpgme_key_sig_get_string_attr): Use validity_to_string
4131 instead otrust_to_string to calculate validity.
4133 2003-01-19 Miguel Coca <mcoca@gnu.org>
4135 * w32-io.c (_gpgme_io_select): Add missing argument in calls to
4137 * w32-util.c: Include "sema.h".
4138 (find_program_in_registry): Change DEBUG1 to DEBUG2, fixes compilation
4141 2003-01-19 Marcus Brinkmann <marcus@g10code.de>
4143 * rungpg.c (_gpgme_engine_ops_gpg): Remove gpg_start.
4144 (gpg_start): Rename to ...
4145 (start): ... this function. Change arguments to GpgObject.
4146 (gpg_decrypt): Call start.
4147 (gpg_edit): Likewise.
4148 (gpg_encrypt): Likewise.
4149 (gpg_encrypt_sign): Likewise.
4150 (gpg_export): Likewise.
4151 (gpg_import): Likewise.
4152 (gpg_keylist): Likewise.
4153 (gpg_keylist_ext): Likewise.
4154 (gpg_trustlist): Likewise.
4155 (gpg_verify): Likewise.
4157 * engine-gpgsm.c (_gpgme_engine_ops_encrypt): Remove gpgsm_start.
4158 (gpgsm_start): Rename to ...
4159 (struct gpgsm_object_s): Remove member command.
4160 (gpgsm_release): Don't free command.
4161 (start): ... this function. Change arguments to GpgsmObject and
4163 (gpgsm_decrypt): Call start.
4164 (gpgsm_delete): Likewise.
4165 (gpgsm_encrypt): Likewise.
4166 (gpgsm_export): Likewise.
4167 (gpgsm_genkey): Likewise.
4168 (gpgsm_import): Likewise.
4169 (gpgsm_keylist): Likewise.
4170 (gpgsm_keylist_ext): Likewise.
4171 (gpgsm_verify): Likewise.
4173 * decrypt.c (_gpgme_decrypt_start): Don't call
4174 _gpgme_engine_start.
4175 * delete.c (_gpgme_op_delete_start): Likewise.
4176 * edit.c (_gpgme_op_edit_start): Likewise.
4177 * encrypt.c (_gpgme_op_encrypt_start):
4178 * encrypt-sign.c (_gpgme_op_encrypt_sign_start):
4179 * export.c (_gpgme_op_export_start): Likewise.
4180 * genkey.c (_gpgme_op_genkey_start): Likewise.
4181 * import.c (_gpgme_op_import_start): Likewise.
4182 * keylist.c (gpgme_op_keylist_ext_start): Likewise.
4183 (gpgme_op_keylist_start): Likewise.
4184 * sign.c (_gpgme_op_sign_start): Likewise.
4185 * trustlist.c (gpgme_op_trustlist_start): Likewise.
4186 * verify.c (_gpgme_op_verify_start): Likewise.
4188 * engine-backend.h (struct engine_ops): Remove member start.
4190 * engine.h (_gpgme_engine_start): Remove prototype.
4191 * engine.c (_gpgme_engine_start): Remove function.
4193 2003-01-06 Werner Koch <wk@gnupg.org>
4195 * keylist.c (set_mainkey_capability): Handle 'd' and 'D' used
4196 since gpg 1.3 to denote disabled keys.
4198 2003-01-06 Marcus Brinkmann <marcus@g10code.de>
4200 * data-mem.c: Include <string.h>.
4201 * engine.c: Likewise.
4203 2003-01-06 Marcus Brinkmann <marcus@g10code.de>
4205 * Makefile.am (libgpgme_la_DEPENDENCIES): Correct bug in last change.
4207 2002-12-24 Marcus Brinkmann <marcus@g10code.de>
4209 * gpgme.h (gpgme_op_verify, gpgme_op_decrypt_verify): Drop R_STAT
4211 * decrypt-verify.c (gpgme_op_decrypt_verify): Drop R_STAT
4213 * verify.c (gpgme_op_verify): Drop R_STAT argument.
4214 (_gpgme_intersect_stati): Function removed.
4215 * ops.h (_gpgme_intersect_stati): Remove prototype.
4217 2002-12-24 Marcus Brinkmann <marcus@g10code.de>
4219 * libgpgme.vers: New file.
4220 * Makefile.am (EXTRA_DIST): Add libgpgme.vers.
4221 (libgpgme_version_script_cmd): New variable.
4222 (libgpgme_la_LDFLAGS): Add libgpgme_version_script_cmd here.
4223 (libgpgme_la_DEPENDENCIES): New variable.
4225 2002-12-23 Marcus Brinkmann <marcus@g10code.de>
4227 * key.c (gpgme_key_get_string_attr): Don't accept GPGME_ATTR_IS_SECRET.
4228 (otrust_to_string): New function.
4229 (gpgme_key_get_as_xml): Use it.
4230 (validity_to_string): New function.
4231 (gpgme_key_get_string_attr): Beautify using above functions.
4232 (gpgme_key_get_ulong_attr): Likewise.
4234 2002-12-23 Marcus Brinkmann <marcus@g10code.de>
4236 * data-mem.c (mem_release): Fix gcc warning.
4237 * data-user.c (user_release): Likewise.
4239 2002-12-06 Marcus Brinkmann <marcus@g10code.de>
4241 * data.h (gpgme_data_release_cb): Change return type to void.
4242 (gpgme_data_read_cb): Change return type to ssize_t.
4243 * data.c (gpgme_data_read): Likewise.
4244 * data-stream.c (stream_read): Likewise.
4245 * data-fd.c (fd_read): Likewise.
4246 * data-mem.c (mem_read): Likewise.
4247 (mem_release): Change return type to void.
4248 * data-user.c (user_read): Change return type to ssize_t.
4249 (user_release): Change return type to void.
4250 * data-compat.c (old_user_read): Change return type to ssize_t.
4251 * gpgme.h (GpgmeDataReadCb): Likewise.
4252 (gpgme_data_read): Likewise.
4253 (GpgmeDataSeekCb): Change return type to off_t.
4255 2002-12-04 Marcus Brinkmann <marcus@g10code.de>
4257 * gpgme.h: Add prototype for gpgme_get_key.
4258 * key.c (gpgme_get_key): New function.
4259 * verify.c (gpgme_get_sig_key): Rewrite using gpgme_get_key.
4261 * gpgme.h: Add prototypes for new interfaces
4262 gpgme_key_sig_get_string_attr and gpgme_key_get_ulong_attr.
4263 (enum GpgmeAttr): New attribute GPGME_ATTR_SIG_CLASS.
4264 * gpgme.c (gpgme_set_keylist_mode): Allow GPGME_KEYLIST_MODE_SIGS.
4265 * key.h (struct certsig_s): New members ALGO, NAME_PART,
4266 EMAIL_PART, COMMENT_PART, NAME, SIG_STAT and SIG_CLASS.
4268 * conversion.c (_gpgme_decode_c_string): Add new parameter LEN.
4269 Use that to determine if allocation is desired or not.
4270 * util.h: Adjust prototype of _gpgme_decode_c_string.
4271 * keylist.c (keylist_colon_handler): Adjust caller of
4272 _gpgme_decode_c_string.
4274 * key.h (struct gpgme_key_s): New member last_uid.
4275 * key.c (_gpgme_key_append_name): Rewritten using
4276 _gpgme_decode_c_string and the last_uid pointer.
4277 (my_isdigit): Macro removed.
4278 (ALLOC_CHUNK): Likewise.
4279 * keylist.c (set_userid_flags): Use last_uid member of KEY.
4281 * context.h (struct user_id_s): New member last_certsig.
4282 * key.h: Add prototype for _gpgme_key_add_certsig.
4283 * key.c (_gpgme_key_add_certsig): New function.
4284 (set_user_id_part): Move function before _gpgme_key_add_certsig.
4285 (parse_user_id): Change first argument to SRC, add new arguments
4286 NAME, EMAIL and COMMENT. Change code to use these arguments
4287 instead going through UID. Move function before
4289 (parse_x509_user_id): Likewise.
4290 (_gpgme_key_append_name): Adjust arguments to parse_x509_user_id
4291 and parse_user_id invocation.
4292 (one_certsig_as_xml): New function.
4293 (one_uid_as_xml): Print signatures.
4294 * context.h (struct gpgme_context_s): New member TMP_UID.
4295 * keylist.c (keylist_colon_handler): Rewritten, implement "sig"
4298 * key.c (get_certsig): New function.
4299 (gpgme_key_sig_get_string_attr): Likewise.
4300 (gpgme_key_sig_get_ulong_attr): Likewise.
4302 * keylist.c: Include <ctype.h>.
4303 (my_isdigit): Macro removed.
4304 (set_mainkey_trust_info): Use isdigit, not my_isdigit.
4305 (set_userid_flags): Likewise.
4306 (set_subkey_trust_info): Likewise.
4307 (set_ownertrust): Likewise.
4308 (finish_key): Move function up a bit and remove prototype.
4310 * rungpg.c (gpg_keylist_ext): Correct precedence of signature
4312 (gpg_keylist_ext): Implement signature listing mode.
4314 2002-11-25 Marcus Brinkmann <marcus@g10code.de>
4316 * rungpg.c (_gpgme_gpg_spawn): Do not set parent fds to -1.
4317 * posix-io.c (_gpgme_io_spawn): Call _gpgme_io_close instead close
4319 * w32-io.c (_gpgme_io_spawn): Call _gpgme_io_close instead
4320 CloseHandle for parent fds.
4322 2002-11-22 Marcus Brinkmann <marcus@g10code.de>
4324 * gpgme.h [_MSC_VER]: Define ssize_t as long.
4326 2002-11-22 Werner Koch <wk@gnupg.org>
4328 * engine-gpgsm.c (_gpgme_gpgsm_new): Save the result of a first
4329 setlocale before doing another setlocale.
4331 2002-11-21 Marcus Brinkmann <marcus@g10code.de>
4333 * decrypt.c: Some beautyfication.
4335 * verify.c (_gpgme_verify_status_handler): Treat
4336 GPGME_STATUS_UNEXPECTED like GPGME_STATUS_NODATA.
4337 Reported by Miguel Coca <e970095@zipi.fi.upm.es>.
4339 2002-11-19 Marcus Brinkmann <marcus@g10code.de>
4341 * genkey.c: Only include <config.h> if [HAVE_CONFIG_H].
4342 (struct genkey_result_s): Add new member FPR.
4343 (_gpgme_release_genkey_result): Free RESULT->fpr if set.
4344 (genkey_status_handler): Extract the fingerprint from the status
4346 (gpgme_op_genkey): Add new argument FPR and return the fingerprint
4348 * gpgme.h: Adjust prototype of gpgme_op_genkey.
4350 2002-11-19 Marcus Brinkmann <marcus@g10code.de>
4352 * rungpg.c (gpg_keylist): Add --with-fingerprint to gpg invocation
4353 twice, to get fingerprints on subkeys. Suggested by Timo Schulz
4354 <twoaday@freakmail.de>.
4355 (gpg_keylist_ext): Likewise.
4357 2002-11-05 Marcus Brinkmann <marcus@g10code.de>
4359 * import.c (append_xml_impinfo): Use
4360 _gpgme_data_append_string_for_xml rather than
4361 _gpgme_data_append_string for the field content.
4362 Submitted by Miguel Coca <e970095@zipi.fi.upm.es>.
4364 2002-10-10 Marcus Brinkmann <marcus@g10code.de>
4366 * rungpg.h, engine-gpgsm.h: File removed.
4367 * engine-backend.h: New file.
4368 * Makefile.am (gpgsm_components): New variable, set depending on
4369 automake conditional HAVE_GPGSM.
4370 (libgpgme_la_SOURCES): Add engine-backend.h, remove rungpg.h and
4371 engine-gpgsm.h. Replace engine-gpgsm.c with ${gpgsm_components}.
4372 (status-table.h): Depend on gpgme.h, not rungpg.h.
4373 * conversion.c: Include <stdlib.h>.
4374 * engine-gpgsm.c: Do not set ENABLE_GPGSM here. Include
4375 "engine-backend.h" instead "engine-gpgsm.h". Reorder some
4376 functions and remove all function prototypes.
4377 (_gpgme_gpgsm_get_version): Make static and rename to ...
4378 (gpgsm_get_version): ... this.
4379 (_gpgme_gpgsm_check_version): Make static and rename to ...
4380 (gpgsm_check_version): ... this.
4381 (_gpgme_gpgsm_new): Make static. Change argument type from
4382 GpgsmObject * to void **. Call gpgsm_release instead
4383 _gpgme_gpgsm_release.
4384 (_gpgme_gpgsm_op_decrypt): Make static and rename to ...
4385 (gpgsm_check_decrypt): ... this.
4386 (_gpgme_gpgsm_op_delete): Make static and rename to ...
4387 (gpgsm_check_delete): ... this.
4388 (_gpgme_gpgsm_set_recipients): Make static and rename to ...
4389 (gpgsm_check_set_recipients): ... this.
4390 (_gpgme_gpgsm_op_encrypt): Make static and rename to ...
4391 (gpgsm_encrypt): ... this.
4392 (_gpgme_gpgsm_op_export): Make static and rename to ...
4393 (gpgsm_export): ... this.
4394 (_gpgme_gpgsm_op_genkey): Make static and rename to ...
4395 (gpgsm_genkey): ... this.
4396 (_gpgme_gpgsm_op_import): Make static and rename to ...
4397 (gpgsm_import): ... this.
4398 (_gpgme_gpgsm_op_keylist): Make static and rename to ...
4399 (gpgsm_keylist): ... this.
4400 (_gpgme_gpgsm_op_keylist_ext): Make static and rename to ...
4401 (gpgsm_keylist_ext): ... this.
4402 (_gpgme_gpgsm_op_sign): Make static and rename to ...
4403 (gpgsm_sign): ... this.
4404 (_gpgme_gpgsm_op_trustlist): Make static and rename to ...
4405 (gpgsm_trustlist): ... this.
4406 (_gpgme_gpgsm_op_verify): Make static and rename to ...
4407 (gpgsm_verify): ... this.
4408 (gpgsm_status_handler): Rename to ...
4409 (status_handler): ... this.
4410 (_gpgme_gpgsm_set_status_handler): Make static and rename to ...
4411 (gpgsm_set_status_handler): ... this.
4412 (_gpgme_gpgsm_set_colon_line_handler): Make static and rename to ...
4413 (gpgsm_set_colon_line_handler): ... this.
4414 (_gpgme_gpgsm_add_io_cb): Rename to ...
4415 (add_io_cb): ... this.
4416 (_gpgme_gpgsm_start): Make static and rename to ...
4417 (gpgsm_start): ... this.
4418 (_gpgme_gpgsm_set_io_cb): Make static and rename to ...
4419 (gpgsm_set_io_cb): ... this.
4420 (_gpgme_gpgsm_io_event): Make static and rename to ...
4421 (gpgsm_io_event): ... this.
4422 (struct _gpgme_engine_ops_gpgsm): New variable.
4423 [!ENABLE_GPGSM]: Removed.
4424 * engine.c: Do not include <time.h>, <sys/types.h>, <string.h>,
4425 <assert.h>, "io.h", "rungpg.h" and "engine-gpgsm.h". Include
4426 <stdlib.h> and "engine-backend.h".
4427 (struct engine_object_s): Rewritten.
4428 (engine_ops): New variable.
4429 * engine.c (_gpgme_engine_get_path, _gpgme_engine_get_version,
4430 _gpgme_engine_check_version, _gpgme_engine_new,
4431 _gpgme_engine_release, _gpgme_engine_set_verbosity,
4432 _gpgme_engine_set_status_handler,
4433 _gpgme_engine_set_command_handler,
4434 _gpgme_engine_set_colon_line_handler, _gpgme_engine_op_decrypt,
4435 _gpgme_engine_op_delete, _gpgme_engine_op_edit,
4436 _gpgme_engine_op_encrypt, _gpgme_engine_op_encrypt_sign,
4437 _gpgme_engine_op_export, _gpgme_engine_op_genkey,
4438 _gpgme_engine_op_import, _gpgme_engine_op_keylist,
4439 _gpgme_engine_op_keylist_ext, _gpgme_engine_op_sign,
4440 _gpgme_engine_op_trustlist, _gpgme_engine_op_verify,
4441 _gpgme_engine_start, _gpgme_engine_set_io_cbs,
4442 _gpgme_engine_io_event): Reimplement.
4443 * engine.h: Fix a few comments and a variable name in a prototype.
4444 * ops.h: Do not include "rungpg.h".
4445 * passphrase.c: Include config.h only if [HAVE_CONFIG_H]. Do not
4447 * recipient.c: Likewise.
4448 * signers.c: Likewise.
4449 * version.c: Likewise.
4450 * rungpg.c: Likewise. Include "engine-backend.h". Reorder
4451 functions and remove prototypes.
4452 (_gpgme_gpg_get_version): Make static and rename to ...
4453 (gpg_get_version): ... this.
4454 (_gpgme_gpg_check_version): Make static and rename to ...
4455 (gpg_check_version): ... this.
4456 (_gpgme_gpg_new): Make static. Change argument type from
4457 GpgObject * to void **. Call gpg_release instead
4459 (_gpgme_gpg_op_decrypt): Make static and rename to ...
4460 (gpg_check_decrypt): ... this.
4461 (_gpgme_gpg_op_delete): Make static and rename to ...
4462 (gpg_check_delete): ... this.
4463 (_gpgme_gpg_set_recipients): Make static and rename to ...
4464 (gpg_check_set_recipients): ... this.
4465 (_gpgme_gpg_op_encrypt): Make static and rename to ...
4466 (gpg_encrypt): ... this.
4467 (_gpgme_gpg_op_export): Make static and rename to ...
4468 (gpg_export): ... this.
4469 (_gpgme_gpg_op_genkey): Make static and rename to ...
4470 (gpg_genkey): ... this.
4471 (_gpgme_gpg_op_import): Make static and rename to ...
4472 (gpg_import): ... this.
4473 (_gpgme_gpg_op_keylist): Make static and rename to ...
4474 (gpg_keylist): ... this.
4475 (_gpgme_gpg_op_keylist_ext): Make static and rename to ...
4476 (gpg_keylist_ext): ... this.
4477 (_gpgme_gpg_op_sign): Make static and rename to ...
4478 (gpg_sign): ... this.
4479 (_gpgme_gpg_op_trustlist): Make static and rename to ...
4480 (gpg_trustlist): ... this.
4481 (_gpgme_gpg_op_verify): Make static and rename to ...
4482 (gpg_verify): ... this.
4483 (gpg_status_handler): Rename to ...
4484 (status_handler): ... this.
4485 (_gpgme_gpg_set_status_handler): Make static and rename to ...
4486 (gpg_set_status_handler): ... this.
4487 (_gpgme_gpg_set_colon_line_handler): Make static and rename to ...
4488 (gpg_set_colon_line_handler): ... this.
4489 (gpgme_gpg_add_io_cb): Rename to ...
4490 (add_io_cb): ... this.
4491 (_gpgme_gpg_start): Make static and rename to ...
4492 (gpg_start): ... this.
4493 (_gpgme_gpg_set_io_cb): Make static and rename to ...
4494 (gpg_set_io_cb): ... this.
4495 (_gpgme_gpg_io_event): Make static and rename to ...
4496 (gpg_io_event): ... this.
4497 (struct _gpgme_engine_ops_gpg): New variable.
4499 2002-10-10 Marcus Brinkmann <marcus@g10code.de>
4501 * engine-gpgsm.c (_gpgme_gpgsm_op_verify) [!ENABLE_GPGSM]: Add
4504 2002-10-09 Marcus Brinkmann <marcus@g10code.de>
4506 * data.h, data-user.c, data-stream.c, data-mem.c, data-fd.c,
4507 data-compat.c: New file. Really check them in this time, completes
4510 * rungpg.h (GpgStatusHandler): Rename type to GpgmeStatusHandler
4512 * types.h (GpgmeStatusHandler): ... here.
4513 * rungpg.h (GpgColonLineHandler): Rename type to GpgmeColonLineHandler.
4515 * types.h (GpgmeColonLineHandler): ... here.
4516 * rungpg.h (GpgCommandHandler): Rename type to GpgmeCommandHandler.
4518 * types.h (GpgmeCommandHandler): ... here.
4519 * engine.h: Don't include "rungpg.h".
4520 (_gpgme_engine_set_status_handler): Change type of
4521 argument from GpgStatusHandler to GpgmeStatusHandler.
4522 (_gpgme_engine_set_colon_line_handler): Change type of
4523 argument from GpgColonLineHandler to GpgmeColonLineHandler.
4524 (_gpgme_engine_set_command_handler): Change type of
4525 argument from GpgCommandHandler to GpgmeCommandHandler.
4526 * engine-gpgsm.h: Don't include "rungpg.h".
4527 (_gpgme_gpgsm_set_status_handler): Change type of
4528 argument from GpgStatusHandler to GpgmeStatusHandler.
4529 (_gpgme_gpgsm_set_colon_line_handler): Change type of
4530 argument from GpgColonLineHandler to GpgmeColonLineHandler.
4531 * engine-gpgsm.c: Do not include "rungpg.h".
4532 (struct gpgsm_object_s): Change type of
4533 status.fnc to GpgmeStatusHandler. Change type of colon.fnc to
4534 GpgmeColonLineHandler.
4535 (gpgsm_assuan_simple_command): Change type of argument from
4536 GpgStatusHandler to GpgmeStatusHandler.
4537 (_gpgme_gpgsm_set_status_handler): Likewise.
4538 (_gpgme_gpgsm_set_colon_line_handler): Change type of argument from
4539 GpgColonLineHandler to GpgmeColonLineHandler.
4540 * rungpg.h (_gpgme_gpg_set_status_handler): Change type of
4541 argument from GpgStatusHandler to GpgmeStatusHandler.
4542 (_gpgme_gpg_set_colon_line_handler): Change type of
4543 argument from GpgColonLineHandler to GpgmeColonLineHandler.
4544 (_gpgme_gpg_set_command_handler): Change type of
4545 argument from GpgCommandHandler to GpgmeCommandHandler.
4546 * rungpg.c (struct gpg_object_s): Change type of status.fnc to
4547 GpgmeStatusHandler. Change type of colon.fnc to
4548 GpgmeColonLineHandler. Change type of cmd.fnc to
4549 GpgmeCommandLineHandler.
4550 (_gpgme_gpg_set_status_handler): Change type of argument FNC to
4552 (_gpgme_gpg_set_colon_line_handler): Change type of argument FNC
4553 to GpgmeColonLineHandler.
4554 (_gpgme_gpg_set_command_handler): Change type of argument FNC to
4555 GpgmeCommandHandler.
4556 * engine.c (_gpgme_engine_set_status_handler): Change type of
4557 argument FNC to GpgmeStatusHandler.
4558 (_gpgme_engine_set_colon_line_handler): Change type of argument FNC
4559 to GpgmeColonLineHandler.
4560 (_gpgme_engine_set_command_handler): Change type of argument FNC to
4561 GpgmeCommandHandler.
4563 * rungpg.h (_gpgme_gpg_enable_pipemode): Remove prototype.
4564 * rungpg.c (struct gpg_object_s): Remove PM.
4565 (pipemode_cb): Prototype removed.
4566 (add_pm_data): Function removed.
4567 (_gpgme_gpg_enable_pipemode): Likewise.
4568 (pipemode_copy): Likewise.
4569 (pipemode_cb): Likewise.
4570 (add_arg): Don't check for pipemode.
4571 (add_data): Likewise.
4572 (_gpgme_gpg_set_status_handler): Likewise.
4573 (_gpgme_gpg_set_colon_line_handler): Likewise.
4574 (_gpgme_gpg_set_command_handler): Likewise.
4575 (_gpgme_gpg_spawn): Likewise.
4576 (_gpgme_gpg_spawn): Don't set PM.active.
4577 (_gpgme_gpg_op_verify): Remove pipemode case.
4578 * verify.c (_gpgme_op_verify_start): Remove pipemode case.
4580 * rungpg.h (_gpgme_gpg_add_arg, _gpgme_gpg_add_data,
4581 _gpgme_gpg_add_pm_data, _gpgme_gpg_housecleaning,
4582 _gpgme_gpg_set_simple_line_handler): Prototype removed.
4583 (_gpgme_gpg_set_verbosity): New prototype.
4584 * rungpg.c (_gpgme_gpg_add_data): Make static and rename to ...
4585 (add_data): ... this.
4586 (_gpgme_gpg_add_pm_data): Call add_data, not _gpgme_gpg_add_data.
4587 (_gpgme_gpg_set_command_handler): Likewise.
4588 (_gpgme_gpg_op_decrypt, _gpgme_gpg_op_edit, _gpgme_gpg_op_encrypt,
4589 _gpgme_gpg_op_encrypt_sign, _gpgme_gpg_op_export,
4590 _gpgme_gpg_op_genkey, _gpgme_gpg_op_import, _gpgme_gpg_op_sign,
4591 _gpgme_gpg_op_verify): Likewise.
4592 (_gpgme_gpg_add_pm_data): Rename to ...
4593 (add_pm_data): ... this.
4594 (_gpgme_gpg_op_verify): Call add_pm_data, not
4595 _gpgme_gpg_add_pm_data.
4596 (_gpgme_gpg_add_arg): Make static and rename to ...
4597 (add_arg): ... this.
4598 (_gpgme_gpg_set_command_handler, _gpgme_gpg_new,
4599 _gpgme_gpg_op_decrypt, _gpgme_gpg_op_delete,
4600 _gpgme_append_gpg_args_from_signers, _gpgme_gpg_op_edit,
4601 _gpgme_append_gpg_args_from_recipients, _gpgme_gpg_op_encrypt,
4602 _gpgme_gpg_op_encrypt_sign, _gpgme_gpg_op_export,
4603 _gpgme_gpg_op_genkey, _gpgme_gpg_op_import, _gpgme_gpg_op_keylist,
4604 _gpgme_gpg_op_keylist_ext, _gpgme_gpg_op_trustlist,
4605 _gpgme_gpg_op_sign, _gpgme_gpg_op_verify): Use add_arg, not
4607 (_gpgme_gpg_set_verbosity): New function.
4608 (struct gpg_object_s): Remove member simple from colon.
4609 (_gpgme_gpg_set_colon_line_handler): Don't initialize simple.
4610 (_gpgme_gpg_set_simple_line_handler): Removed function.
4611 (read_colon_line): Don't check the GPG->colon.simple.
4612 * engine.c (_gpgme_engine_set_verbosity): Call
4613 _gpgme_gpg_set_verbosity instead _gpgme_gpg_add_arg.
4615 2002-10-08 Marcus Brinkmann <marcus@g10code.de>
4617 * util.h (_gpgme_malloc, _gpgme_realloc, _gpgme_calloc,
4618 _gpgme_strdup, _gpgme_free): Remove prototypes.
4619 (xtrymalloc, xtrycalloc, xtryrealloc, xtrystrdup, xfree): Remove
4621 * util.c: File removed.
4622 * Makefile.am (libgpgme_la_SOURCES): Remove util.h.
4623 * conversion.c (_gpgme_decode_c_string): Use malloc instead of
4624 xtrymalloc, realloc instead of xtryrealloc, calloc instead of
4625 xtrycalloc, free instead of xfree.
4626 (_gpgme_data_append_percentstring_for_xml): Likewise.
4627 * data.c (_gpgme_data_new, _gpgme_data_release): Likewise.
4628 * data-compat.c (gpgme_data_new_from_filepart): Likewise.
4629 * data-mem.c (mem_write, mem_release, gpgme_data_new_from_mem,
4630 _gpgme_data_get_as_string): Likewise.
4631 * debug.c (debug_init): Likewise.
4632 * decrypt.c (_gpgme_release_decrypt_result): Likewise.
4633 * delete.c (_gpgme_release_delete_result): Likewise.
4634 * edit.c (_gpgme_release_edit_result, _gpgme_op_edit_start):
4636 * encrypt.c (_gpgme_release_encrypt_result): Likewise.
4637 * engine.c (_gpgme_engine_get_info, _gpgme_engine_new,
4638 _gpgme_engine_release): Likewise.
4639 * engine-gpgsm.c (_gpgme_gpgsm_new, _gpgme_gpgsm_release,
4640 _gpgme_gpgsm_op_decrypt, _gpgme_gpgsm_op_delete,
4641 gpgsm_set_recipients, _gpgme_gpgsm_op_encrypt,
4642 _gpgme_gpgsm_op_export, _gpgme_gpgsm_op_genkey,
4643 _gpgme_gpgsm_op_import, _gpgme_gpgsm_op_keylist,
4644 _gpgme_gpgsm_op_keylist_ext, _gpgme_gpgsm_op_sign,
4645 _gpgme_gpgsm_op_verify, gpgsm_status_handler): Likewise.
4646 * genkey.c (_gpgme_release_genkey_result): Likewise.
4647 * gpgme.c (gpgme_new, gpgme_release): Likewise.
4648 * import.c (_gpgme_release_import_result): Likewise.
4649 * key.c (_gpgme_key_cache_init, _gpgme_key_cache_add, key_new,
4650 add_subkey, gpgme_key_release, _gpgme_key_append_name): Likewise.
4651 * keylist.c (_gpgme_release_keylist_result, keylist_colon_handler,
4652 _gpgme_op_keylist_event_cb, gpgme_op_keylist_next): Likewise.
4653 * ops.h (test_and_allocate_result): Likewise.
4654 * passphrase.c (_gpgme_release_passphrase_result,
4655 _gpgme_passphrase_status_handler,
4656 _gpgme_passphrase_command_handler): Likewise.
4657 * progress.c (_gpgme_progress_status_handler): Likewise.
4658 * recipient.c (gpgme_recipients_new, gpgme_recipients_release,
4659 gpgme_recipients_add_name_with_validity): Likewise.
4660 * rungpg.c (_gpgme_gpg_new, _gpgme_gpg_release,
4661 _gpgme_gpg_add_arg, _gpgme_gpg_add_data,
4662 _gpgme_gpg_set_colon_line_handler, free_argv, free_fd_data_map,
4663 build_argv, _gpgme_gpg_spawn, read_status, read_colon_line):
4665 * sign.c (_gpgme_release_sign_result): Likewise.
4666 * signers.c (_gpgme_signers_add): Likewise.
4667 * trustlist.c (trust_item_new, trustlist_colon_handler,
4668 _gpgme_op_trustlist_event_cb, gpgme_op_trustlist_next,
4669 gpgme_trustitem_release): Likewise.
4670 * verify.c (_gpgme_release_verify_result, finish_sig): Likewise.
4671 * version.c (gpgme_get_engine_info, _gpgme_get_program_version):
4673 * w32-io.c (create_reader, create_writer, destroy_reader,
4674 destroy_writer, build_commandline, _gpgme_io_spawn): Likewise.
4675 * w32-sema.c (critsect_init, _gpgme_sema_cs_destroy): Likewise.
4676 * w32-util.c (read_w32_registry_string): Likewise.
4677 * wait.c (_gpgme_fd_table_deinit, _gpgme_fd_table_put,
4678 _gpgme_wait_event_cb, _gpgme_add_io_cb, _gpgme_remove_io_cb)
4679 * data-compat.c: Include <stdlib.h>.
4681 2002-10-08 Marcus Brinkmann <marcus@g10code.de>
4683 New data object component:
4685 * gpgme.h (GpgmeDataReadCb, GpgmeDataWriteCb, GpgmeDataSeekCb,
4686 GpgmeDataReleaseCb): New types.
4687 (struct GpgmeDataCbs): New structure.
4688 (gpgme_data_read): Changed prototype to match that of read() closely.
4689 (gpgme_data_write): Similar for write().
4690 (gpgme_data_seek, gpgme_data_new_from_cbs, gpgme_data_new_from_fd,
4691 gpgme_data_new_from_stream): New prototypes.
4692 (gpgme_data_get_type, gpgme_check_engine): Prototype removed.
4694 * Makefile.am (libgpgme_la_SOURCES): Add data.h, data-fd.c,
4695 data-stream.c, data-mem.c, data-user.c and data-compat.c.
4696 * data.c: Reimplemented from scratch.
4697 * (data-compat.c, data-fd.c, data.h, data-mem.c, data-stream.c,
4698 data-user.c): New file.
4699 * context.h (struct gpgme_data_s): Removed.
4700 * conversion.c: Include <errno.h> and <sys/types.h>.
4701 (_gpgme_data_append): New function.
4702 * data.c (_gpgme_data_append_string): Move to ...
4703 * conversion.c (_gpgme_data_append_string): ... here.
4704 * data.c (_gpgme_data_append_for_xml): Move to ...
4705 * conversion.c (_gpgme_data_append_for_xml): ... here.
4706 * data.c (_gpgme_data_append_string_for_xml): Move to ...
4707 * conversion.c (_gpgme_data_append_string_for_xml): ... here.
4708 * data.c (_gpgme_data_append_percentstring_for_xml): Move to ...
4709 * conversion.c (_gpgme_data_append_percentstring_for_xml): ... here.
4711 * ops.h (_gpgme_data_get_mode, _gpgme_data_set_mode): Prototype
4713 * types.h (GpgmeDataMode): Type removed.
4715 * decrypt.c (_gpgme_decrypt_start): Don't check data type or mode.
4716 * edit.c (_gpgme_op_edit_start): Likewise.
4717 * encrypt.c (_gpgme_op_encrypt_start): Likewise.
4718 * encrypt-sign.c (_gpgme_op_encrypt_sign_start): Likewise.
4719 * encrypt-sign.c (_gpgme_op_encrypt_sign_start): Likewise.
4720 * export.c (_gpgme_op_export_start): Likewise.
4721 * genkey.c (_gpgme_op_genkey_start): Likewise.
4722 * import.c (_gpgme_op_import_start): Likewise.
4723 * sign.c (_gpgme_op_sign_start): Likewise.
4724 * verify.c (_gpgme_op_verify_start): Likewise.
4726 * encrypt.c (gpgme_op_encrypt): Remove hack that returns invalid
4727 no recipient if no data was returned.
4728 * encrypt-sign.c (gpgme_op_encrypt_sign): Remove hack that returns
4729 no recipient if no data was returned.
4730 * encrypt-sign.c (gpgme_op_encrypt_sign): Remove hack that returns
4731 no recipient if no data was returned.
4733 * engine.c (_gpgme_engine_op_verify): Add new argument to
4734 differentiate detached from normal signatures.
4735 * engine.h (_gpgme_engine_op_verify): Likewise for prototype.
4736 * engine-gpgsm.c (_gpgme_gpgsm_op_verify): Likewise. Don't check
4737 mode of data argument.
4738 * engine-gpgsm.h (_gpgme_gpgsm_op_verify): Likewise for prototype.
4739 * gpgme.h (gpgme_op_verify_start): Likewise for prototype.
4740 (gpgme_op_verify): Likewise for prototype.
4741 * rungpg.c (_gpgme_gpg_op_verify): Likewise.
4742 * rungpg.h (_gpgme_gpg_op_verify): Likewise for prototype.
4743 * verify.c (_gpgme_op_verify_start): Likewise.
4744 (gpgme_op_verify_start): Likewise.
4745 (gpgme_op_verify): Likewise.
4747 * rungpg.c (struct arg_and_data_s): New member INBOUND to hold
4748 direction of data object.
4749 (_gpgme_gpg_add_data): Add new argument INBOUND. Use it to
4750 determine direction of data object.
4751 (_gpgme_gpg_add_pm_data, _gpgme_gpg_set_command_handler,
4752 _gpgme_gpg_op_decrypt, _gpgme_gpg_op_edit, _gpgme_gpg_op_encrypt,
4753 _gpgme_gpg_op_encrypt_sign, _gpgme_gpg_op_export,
4754 _gpgme_gpg_op_genkey, _gpgme_gpg_op_import, _gpgme_gpg_op_sign,
4755 _gpgme_gpg_op_verify): Add new argument to _gpgme_gpg_add_data
4757 (build_argv): Use new member INBOUND to determine direction of
4758 file descriptor. Don't check the data type.
4759 * rungpg.h (_gpgme_gpg_add_data): Add new argument to prototype.
4761 * gpgme.c (gpgme_get_op_info): Don't call
4762 _gpgme_data_get_as_string if CTX->op_info is NULL.
4764 * version.c (gpgme_check_engine): Function removed.
4766 2002-09-30 Werner Koch <wk@gnupg.org>
4768 * keylist.c (keylist_colon_handler): Take care when printing a
4769 NULL with the DEBUG.
4771 * engine-gpgsm.c (struct gpgsm_object_s): New member ANY.
4772 (gpgsm_status_handler): Run the colon function to indicate EOF.
4773 (_gpgme_gpgsm_set_colon_line_handler): Better reset ANY here.
4775 2002-09-28 Marcus Brinkmann <marcus@g10code.de>
4777 * conversion.c (_gpgme_hextobyte): Prevent superfluous
4778 multiplication with base. Reported by Stéphane Corthésy.
4780 * keylist.c (gpgme_op_keylist_ext_start): Use private asynchronous
4781 operation type in invocation of _gpgme_op_reset.
4783 2002-09-20 Werner Koch <wk@gnupg.org>
4785 * ath.c: Include sys/time.h if sys/select.h is not available.
4787 2002-09-13 Marcus Brinkmann <marcus@g10code.de>
4789 * keylist.c (keylist_status_handler): Do not call finish_key() here.
4790 (gpgme_op_keylist_ext_start): Set CTX->tmp_key to NULL.
4792 2002-09-03 Marcus Brinkmann <marcus@g10code.de>
4794 * Makefile.am (assuan_libobjs): Remove @LTLIBOBJS@ as we link them
4795 into gpgme unconditionally.
4796 (libgpgme_la_LIBADD): Change @LIBOBJS@ into @LTLIBOBJS@.
4798 2002-09-02 Marcus Brinkmann <marcus@g10code.de>
4800 * Makefile.am (assuan_libobjs): Use @LTLIBOBJS@ instead @LIBOBJS@.
4802 2002-09-02 Marcus Brinkmann <marcus@g10code.de>
4804 * debug.c (_gpgme_debug_add): Test *LINE, not LINE.
4805 (_gpgme_debug_end): Likewise.
4806 Reported by Dr. Stefan Dalibor <Dr.Stefan.Dalibor@bfa.de>.
4808 2002-09-02 Marcus Brinkmann <marcus@g10code.de>
4810 * posix-io.c (_gpgme_io_select): Don't use a non-constant struct
4812 * version.c (_gpgme_get_program_version): Likewise.
4813 Reported by Dr. Stefan Dalibor <Dr.Stefan.Dalibor@bfa.de>.
4815 2002-09-02 Marcus Brinkmann <marcus@g10code.de>
4817 * conversion.c (_gpgme_decode_c_string): Set DESTP before
4820 * conversion.c (_gpgme_decode_c_string): Fix off by one error in
4822 * rungpg.c (_gpgme_append_gpg_args_from_signers): Move before
4823 _gpgme_op_edit so its prototype is known early on.
4825 * conversion.c: New file.
4826 * util.h: Add prototypes for _gpgme_decode_c_string and
4828 * keylist.c (keylist_colon_handler): Call _gpgme_decode_c_string
4830 * Makefile.am (libgpgme_la_SOURCES): Add conversion.c
4831 * key.c (_gpgme_key_append_name): Replace calls to hextobyte by
4832 calls to _gpgme_hextobyte.
4833 (hash_key): Likewise.
4835 2002-09-01 Marcus Brinkmann <marcus@g10code.de>
4837 * op-support.c (_gpgme_op_reset): Set CTX->pending after calling
4838 _gpgme_engine_release, as this will reset pending to zero in the
4839 event done callback on cancelled operations.
4841 2002-08-30 Marcus Brinkmann <marcus@g10code.de>
4843 * rungpg.c (_gpgme_gpg_op_edit): Add args from signers.
4844 Suggested by Miguel Coca <e970095@zipi.fi.upm.es>.
4846 * rungpg.c (_gpgme_gpg_op_edit): Add bogus ctx argument.
4847 * rungpg.h: Also to prototype.
4848 * engine.c (_gpgme_engine_op_edit): Likewise.
4849 * engine.h: Likewise.
4850 * edit.c (_gpgme_op_edit_start): Likewise.
4852 2002-08-29 Werner Koch <wk@gnupg.org>
4854 * engine-gpgsm.c (_gpgme_gpgsm_op_sign): Implement signer
4856 * vasprintf.c (va_copy): Define macro if not yet defined.
4858 2002-08-29 Marcus Brinkmann <marcus@g10code.de>
4860 * passphrase.c (_gpgme_passphrase_status_handler): Reset
4861 CTX->result.passphrase->no_passphrase if passphrase is given (good
4862 or bad). Submitted by Jean DIRAISON <jean.diraison@free.fr>.
4864 2002-08-28 Marcus Brinkmann <marcus@g10code.de>
4866 * posix-io.c (_gpgme_io_spawn): Use a double-fork approach.
4867 Return 0 on success, -1 on error.
4868 * version.c (_gpgme_get_program_version): Don't wait for the child.
4869 * engine.c (_gpgme_engine_housecleaning): Function removed.
4870 (do_reaping): Likewise.
4871 (_gpgme_engine_add_child_to_reap_list): Likewise.
4872 (struct reap_s): Removed.
4873 (reap_list): Likewise.
4874 (reap_list_lock): Likewise.
4875 * engine.h (_gpgme_engine_io_event): Remove prototypes for
4876 _gpgme_engine_housecleaning and
4877 _gpgme_engine_add_child_to_reap_list.
4878 * rungpg.c (_gpgme_gpg_release): Don't add child to reap list.
4879 (struct gpg_object_s): Remove PID member.
4880 (_gpgme_gpg_new): Don't initialize GPG->pid.
4881 (_gpgme_gpg_spawn): Don't set GPG->pid.
4882 * wait.c (run_idle): Removed.
4883 (gpgme_wait): Run idle_function directly.
4885 2002-08-21 Marcus Brinkmann <marcus@g10code.de>
4887 * encrypt-sign.c (encrypt_sign_status_handler): Remove dead
4888 variables encrypt_info and encrypt_info_len.
4889 * trustlist.c (gpgme_op_trustlist_start): Set colon line handler.
4890 * posix-sema.c (sema_fatal): Remove function.
4891 All these reported by Stéphane Corthésy.
4893 2002-08-23 Werner Koch <wk@gnupg.org>
4895 * gpgme-config.in: Made --prefix work for --libs.
4897 2002-08-21 Marcus Brinkmann <marcus@g10code.de>
4899 * ath.h: Update list of symbols that get a prefix: Rename the
4900 ath_mutex_*_available symbols to ath_*_available.
4902 2002-08-21 Marcus Brinkmann <marcus@g10code.de>
4904 * stpcpy.c: New file from gnulib.
4905 * Makefile.am (assuan_libobjs): Remove jnlib.
4907 2002-08-20 Marcus Brinkmann <marcus@g10code.de>
4909 * gpgme.h: Add prototype for gpgme_op_import_ext.
4910 * import.c (struct import_result_s): New member `nr_considered'.
4911 Rename `any_imported' to `nr_imported'.
4912 (import_status_handler): Increment nr_imported. Set nr_considered
4914 (gpgme_op_import_ext): New function.
4915 (gpgme_op_import): Implement in terms of gpgme_op_import_ext.
4917 2002-08-20 Werner Koch <wk@gnupg.org>
4919 * gpgme.m4: Replaced with a new and faster version. This does not
4920 anymore try to build test programs. If we really need test
4921 programs, we should add an option to gpgme-config to do so.
4923 * vasprintf.c (int_vasprintf): Hack to handle NULL passed for %s.
4925 2002-08-20 Marcus Brinkmann <marcus@g10code.de>
4927 * gpgme.c (_gpgme_set_op_info): Append data on subsequent calls.
4928 * encrypt-sign.c (encrypt_sign_status_handler): Remove op_info
4931 2002-08-19 Werner Koch <wk@gnupg.org>
4933 * decrypt.c (is_token,skip_token): Duplicated from verify.c
4934 (gpgme_op_decrypt): Hack to properly return Decryption_Failed..
4935 (_gpgme_decrypt_status_handler): Create an operation info.
4937 2002-08-14 Werner Koch <wk@gnupg.org>
4939 * key.h (struct certsig_s): New. Use it in gpgme_key_s.
4940 * key.c (gpgme_key_release): Release it. We need to add more code
4942 (_gpgme_key_append_name): Use memset to intialize the struct.
4943 * gpgme.h (GPGME_KEYLIST_MODE_SIGS): New.
4944 * rungpg.c (_gpgme_gpg_op_keylist): Include sigs in listing depending
4947 * key.c (gpgme_key_get_string_attr): Use GPGME_ATTR_TYPE to return
4948 information about the key type (PGP or X.509).
4949 (gpgme_key_get_ulong_attr): Likewise.
4951 * keylist.c (keylist_colon_handler): Include 1 in the check for
4952 valid algorithms so that RSA is usable. Store the issuer name and
4953 serial number also for "crs" records. Parse the expire date for
4955 (set_userid_flags): Put them onto the last appended key.
4957 2002-07-29 Marcus Brinkmann <marcus@g10code.de>
4959 * rungpg.c (_gpgme_gpg_op_edit): Use --with-colons.
4961 2002-07-28 Marcus Brinkmann <marcus@g10code.de>
4963 * data.c (gpgme_data_read): For GPGME_DATA_TYPE_NONE, return EOF
4966 The following changes make it possible to flush an inbound data
4967 pipe before invoking a command handler:
4969 * posix-io.c (_gpgme_io_select): Accept new argument NONBLOCK to
4970 _gpgme_io_select. Set timeout of 0 if this is set.
4971 * w32-io.c (_gpgme_io_select): Likewise.
4972 * io.h: Add new argument NONBLOCK to _gpgme_io_select prototype.
4973 * wait.c (do_select): Add new argument to _gpgme_io_select
4975 * rungpg.h (_gpgme_gpg_set_command_handler): Add new argument
4976 linked_data to prototype.
4977 * engine.h (_gpgme_engine_set_command_handler): Likewise.
4978 * engine.c (_gpgme_engine_set_command_handler): Likewise.
4979 * passphrase.c (_gpgme_passphrase_start): Pass NULL as linked_data
4980 argument to _gpgme_engine_set_command_handler.
4981 * rungpg.c (struct gpg_object_s): New members linked_data and
4983 (_gpgme_gpg_new): Initialize those new members.
4984 (_gpgme_gpg_set_command_handler): Accept new argument linked_data.
4985 (build_argv): Handle linked_data in the same hack as cb_data.
4986 (read_status): If linked_data is in use, flush the pipe before
4987 activating the command handler.
4988 * gpgme.h: Add prototypes for gpgme_op_edit_start and
4991 The next changes export the status codes to the user:
4993 * decrypt.c (_gpgme_decrypt_status_handler): Likewise, also prefix
4994 all STATUS_ with GPGME_.
4995 * delete.c (delete_status_handler): Likewise.
4996 * decrypt-verify.c (decrypt_verify_status_handler): Likewise.
4997 * encrypt.c (_gpgme_encrypt_status_handler): Likewise.
4998 (_gpgme_encrypt_sym_status_handler): Likewise.
4999 * encrypt-sign.c (encrypt_sign_status_handler): Likewise.
5000 * engine-gpgsm.c (parse_status): Likewise.
5001 (gpgsm_status_handler): Likewise.
5002 (gpgsm_set_recipients): Likewise.
5003 * export.c (export_status_handler): Likewise.
5004 * genkey.c (genkey_status_handler): Likewise.
5005 * import.c (append_xml_impinfo): Likewise.
5006 (import_status_handler): Likewise.
5007 * keylist.c (keylist_status_handler): Likewise.
5008 * passphrase.c (_gpgme_passphrase_status_handler): Likewise.
5009 (command_handler): Likewise.
5010 * progress.c (_gpgme_progress_status_handler): Likewise.
5011 * sign.c (_gpgme_sign_status_handler): Likewise.
5012 * trustlist.c (trustlist_status_handler): Likewise.
5013 * verify.c (_gpgme_verify_status_handler): Likewise.
5014 * gpgme.h (GpgmeEditCb): New type.
5015 * rungpg.h (GpgStatusCode): Rename and move to ...
5016 * gpgme.h (GpgmeStatusCode): ... this and here.
5017 * Makefile.am (status-table.h): Run mkstatus on gpgme.h, not rungpg.h.
5018 * mkstatus: Prefix STATUS with GPGME_.
5019 * rungpg.h (GpgStatusHandler, GpgCommandHandler): Change type
5021 * ops.h (_gpgme_verify_status_handler,
5022 _gpgme_decrypt_status_handler, _gpgme_sign_status_handler,
5023 _gpgme_encrypt_status_handler, _gpgme_passphrase_status_handler,
5024 _gpgme_progress_status_handler): Likewise.
5025 * rungpg.c (struct gpg_object_s): Likewise for CMD.code.
5027 These changes add an edit operation to GPGME:
5029 * context.h (struct gpgme_context_s): New member RESULT.edit. *
5030 ops.h: Add prototype for _gpgme_release_edit_result and
5031 _gpgme_passphrase_command_handler.
5032 * passphrase.c (command_handler): Make non-static and rename to ...
5033 (_gpgme_passphrase_command_handler): ... this.
5034 (_gpgme_passphrase_start): Use new name for command handler.
5035 * types.h: Add EditResult type.
5036 * gpgme.c (_gpgme_release_result): Release EDIT result.
5038 * Makefile.am (libgpgme_la_SOURCES): Add edit.c.
5039 (libgpgme_la_LDADD): Rename to libgpgme_la_LIBADD, and include
5041 (assuan_libobjs): New variable, set this instead
5043 * engine.h (_gpgme_engine_op_edit): New prototype.
5044 * engine.c (_gpgme_engine_op_edit): New function.
5045 * rungpg.h (_gpgme_gpg_op_edit): New prototype.
5046 * rungpg.c (_gpgme_gpg_op_edit): New function.
5048 2002-07-27 Marcus Brinkmann <marcus@g10code.de>
5050 * delete.c (delete_problem): New case ambigious specification.
5051 (delete_status_handler): Handle new case (poorly).
5053 2002-07-25 Marcus Brinkmann <marcus@g10code.de>
5055 * engine-gpgsm.c (_gpgme_gpgsm_op_delete): Implement this.
5057 2002-07-25 Marcus Brinkmann <marcus@g10code.de>
5059 * Makefile.am (libgpgme_la_LDADD): Add @LIBOBJS@ for vasprintf and
5061 * vasprintf.c: Update to more recent libiberty version.
5062 * debug.h: Replace #elsif with #elif.
5064 Submitted by Stéphane Corthésy:
5065 * util.h (vasprintf): Correct prototype.
5066 * encrypt-sign.c: Include <stddef.h>.
5067 (encrypt_sign_status_handler): Change type of ENCRYPT_INFO_LEN to
5069 * ath-pthread.c: Include <stdlib.h>, not <malloc.h>.
5070 * ath-pth.c: Likewise.
5072 2002-07-25 Marcus Brinkmann <marcus@g10code.de>
5074 * wait.c (fdt_global): Make static. Reported by Stéphane
5077 * rungpg.c (_gpgme_gpg_op_keylist_ext): Skip empty string
5078 patterns. Reported by Stéphane Corthésy.
5080 * key.c (gpgme_key_get_as_xml): Add OTRUST attribute. Requested
5081 by Stéphane Corthésy.
5082 (gpgme_key_get_string_attr): Add GPGME_ATTR_SIG_SUMMARY case to
5083 silence gcc warning.
5085 * rungpg.c (_gpgme_gpg_new): Always set utf8 as charset.
5087 2002-07-03 Marcus Brinkmann <marcus@g10code.de>
5089 * gpgme.c (gpgme_set_io_cbs): Deal with CTX being NULL.
5091 * gpgme.c (_gpgme_op_event_cb_user): New function.
5092 * op-support.c (_gpgme_op_reset): Support a new mode of operation
5093 for private or user event loop. Use new user event callback
5095 * trustlist.c (gpgme_op_trustlist_start): Use this new mode.
5096 * keylist.c (gpgme_op_keylist_start): Likewise.
5098 * rungpg.c (_gpgme_gpg_io_event): New function.
5099 * rungpg.h (_gpgme_gpg_io_event): New prototype.
5100 * engine-gpgsm.c (_gpgme_gpg_io_event): New function.
5101 * engine-gpgsm.h (_gpgme_gpgsm_io_event): New prototype.
5102 * engine.c (_gpgme_engine_io_event): New function.
5103 * engine.h (_gpgme_engine_io_event): New prototype.
5104 * keylist.c (finish_key): Call _gpgme_engine_io_event, and move
5105 the real work for the default IO callback routines to ...
5106 (_gpgme_op_keylist_event_cb): ... here. New function.
5107 * trustlist.c (trustlist_colon_handler): Signal
5108 GPGME_EVENT_NEXT_TRUSTITEM. Move queue manipulation to ...
5109 (_gpgme_op_trustlist_event_cb): ... here. New function.
5110 * gpgme.c (_gpgme_op_event_cb): Call _gpgme_op_keylist_event_cb
5111 and _gpgme_op_trustlist_event_cb when appropriate.
5112 * ops.h (_gpgme_op_keylist_event_cb): New prototype.
5113 (_gpgme_op_trustlist_event_cb): Likewise.
5114 * op-support.c (_gpgme_op_reset): Add comment why we don't use the
5115 user provided event handler directly.
5116 * gpgme.h (GpgmeRegisterIOCb): Return GpgmeError value, and TAG in
5118 * wait.c (_gpgme_add_io_cb): Likewise.
5119 * wait.h (_gpgme_add_io_cb): Likewise for prototype.
5120 * rungpg.c (_gpgme_gpg_add_io_cb): Call IO_CBS->add with new
5121 argument. Fix up error handling.
5122 * engine-gpgsm.c (_gpgme_gpgsm_add_io_cb): Call IO_CBS->add with
5123 new argument, fix up error handling.
5125 2002-07-03 Werner Koch <wk@gnupg.org>
5127 * encrypt.c (status_handler_finish): New.
5128 (_gpgme_encrypt_status_handler): Moved some code out to the new
5129 function and call this function also in case we get into the
5130 status handler with an error which might happen due to a kludge in
5133 2002-06-28 Marcus Brinkmann <marcus@g10code.de>
5135 * keylist.c (gpgme_op_keylist_ext_start): Always use our own FD
5136 table (eg use synchronous mode).
5138 2002-06-28 Marcus Brinkmann <marcus@g10code.de>
5140 * ops.h (_gpgme_wait_on_condition): Remove HANG argument from
5141 prototype and change return type to GpgmeError.
5142 (_gpgme_wait_one): New prototype.
5143 * wait.c (gpgme_wait): Replace with the meat from
5144 _gpgme_wait_on_condition here, and remove the support for
5146 (_gpgme_wait_on_condition): Remove HANG argument from prototype
5147 and change return type to GpgmeError. Replace with meat from
5148 _gpgme_wait_one and add support for conditions.
5149 (_gpgme_wait_one): Just call _gpgme_wait_on_condition without
5151 * keylist.c (gpgme_op_keylist_ext_start): Always use our own FD
5152 table (eg use synchronous mode).
5153 (gpgme_op_keylist_next): Remove HANG argument from
5154 _gpgme_wait_on_condition. Check its return value.
5155 * trustlist.c (gpgme_op_trustlist_start): Always use our own FD
5156 table (eg use synchronous mode).
5157 (gpgme_op_trustlist_next): Remove HANG argument from
5158 _gpgme_wait_on_condition. Check its return value.
5160 2002-06-27 Marcus Brinkmann <marcus@g10code.de>
5162 * gpgme.h: Fix documentation of key attribute retrieval functions.
5164 2002-06-26 Werner Koch <wk@gnupg.org>
5166 * engine-gpgsm.c (map_assuan_error): Map No_Data_Available to EOF.
5168 * import.c (append_xml_impinfo): Kludge to print fingerprint
5169 instead of keyid for use with gpgsm.
5170 (import_status_handler): Set a flag to know whether any import
5172 (gpgme_op_import): Reurn -1 if no certificate ewas imported.
5174 2002-06-25 Werner Koch <wk@gnupg.org>
5176 * engine-gpgsm.c (_gpgme_gpgsm_set_io_cbs) [ENABLE_GPGSM]: Fixed
5179 2002-06-25 Marcus Brinkmann <marcus@g10code.de>
5181 * engine-gpgsm.c (_gpgme_gpgsm_op_export): Only export the keys
5183 * export.c (gpgme_op_export): If no data was returned, return
5184 GPGME_No_Recipients.
5186 2002-06-25 Marcus Brinkmann <marcus@g10code.de>
5188 * engine-gpgsm.c (_gpgme_gpgsm_op_export): Implement.
5190 2002-06-21 Marcus Brinkmann <marcus@g10code.de>
5192 * engine-gpgsm.c (gpgsm_assuan_simple_command): Return ERR.
5193 (parse_status): New function.
5194 (gpgsm_status_handler): Use parse_status.
5195 (gpgsm_assuan_simple_command): Accept new arguments STATUS_FNC and
5196 STATUS_FNC_VALUE and process status messages.
5197 (gpgsm_set_recipients): Pass new arugments to gpgsm_assuan_simple_command.
5198 (gpgsm_set_fd): Likewise.
5199 (_gpgme_gpgsm_op_keylist): Likewise.
5200 (_gpgme_gpgsm_op_keylist_ext): Likewise.
5201 (_gpgme_gpgsm_op_sign): Likewise.
5203 2002-06-21 Marcus Brinkmann <marcus@g10code.de>
5205 * wait.c (_gpgme_remove_io_cb): Unlock FDT->lock.
5207 2002-06-20 Werner Koch <wk@gnupg.org>
5209 * rungpg.c (build_argv): Ignore GPG_AGENT_INFO if set but empty.
5211 * verify.c (calc_sig_summary): Set bad policy for wrong key usage.
5213 (_gpgme_verify_status_handler): Watch out for wrong key usage.
5214 (gpgme_get_sig_string_attr): Hack to return info on the key
5215 usage. Does now make use of the former RESERVED argument which
5216 has been renamed to WHATIDX.
5217 (gpgme_get_sig_ulong_attr): Renamed RESERVED to WHATIDX.
5219 2002-06-14 Marcus Brinkmann <marcus@g10code.de>
5221 * wait.c (do_select): Return -1 on error, and 0 if nothing to run.
5222 (_gpgme_wait_one): Only set HANG to zero if do_select returned an
5223 error, or there are no more file descriptors to wait on.
5224 (_gpgme_wait_on_condition): Ignore return value from do_select for
5227 2002-06-13 Werner Koch <wk@gnupg.org>
5229 * verify.c (gpgme_op_verify): Make sure that we never access an
5230 unitialized result structure.
5232 2002-06-12 Werner Koch <wk@gnupg.org>
5234 * keylist.c (struct keylist_result_s): New.
5235 (_gpgme_release_keylist_result): Release it here
5236 (keylist_status_handler): Handle truncated.
5237 (append_xml_keylistinfo): New.
5238 * gpgme.c (_gpgme_release_result): and use it here.
5239 * types.h: Declare the new type here.
5240 * context.h (struct gpgme_context_s): Use it here.
5242 2002-06-11 Marcus Brinkmann <marcus@g10code.de>
5244 * engine-gpgsm.c (_gpgme_gpgsm_release): Close status_cb.fd.
5245 (_gpgme_gpgsm_new): Duplicate status file descriptor, so we can
5246 use our own close notification mechanism without interfering with
5249 2002-06-11 Werner Koch <wk@gnupg.org>
5251 * gpgme.h: Add GPGME_ATTR_SIG_SUMMARY and the GPGME_SIGSUM_
5253 * verify.c (calc_sig_summary): New.
5254 (gpgme_get_sig_ulong_attr): And use it here.
5256 2002-06-10 Werner Koch <wk@gnupg.org>
5258 * rungpg.h: Add new status codes TRUNCATED and ERROR.
5259 * verify.c (is_token, copy_token): New.
5260 (_gpgme_verify_status_handler): Use copy_token, handle the new
5261 ERROR status and store the errorcode used withgpgsm and trust
5263 * gpgme.h: New attribute ERRTOK.
5264 * key.c (gpgme_key_get_string_attr): Add dummy case for it.
5265 (gpgme_get_sig_string_attr): Use it here to return the last error.
5267 2002-06-10 Marcus Brinkmann <marcus@g10code.de>
5269 * engine-gpgsm.c (_gpgme_gpgsm_start): Move the code that sets the
5270 close notification for the status fd to ...
5271 (_gpgme_gpgsm_new): ... here.
5272 * wait.h: Include "sema.h". Remove prototypes of
5273 _gpgme_remove_proc_from_wait_queue and
5274 _gpgme_register_pipe_handler. Add prototypes of
5275 _gpgme_fd_table_init, _gpgme_fd_table_deinit, _gpgme_fd_table_put,
5276 _gpgme_add_io_cb, _gpgme_remove_io_cb, _gpgme_wait_event_cb and
5278 * wait.c: Remove global variables PROC_QUEUE, PROC_QUEUE_LOCK,
5279 FD_TABLE_SIZE, FD_TABLE, FD_TABLE_LOCK. New global variables
5280 FDT_GLOBAL, CTX_DONE_LIST, CTX_DONE_LIST_SIZE,
5281 CTX_DONE_LIST_LENGTH and CTX_DONE_LIST_LOCK. Remove struct
5282 proc_s. Replace struct wait_item_s.
5283 (_gpgme_fd_table_init): New function.
5284 (_gpgme_fd_table_deinit): Likewise.
5285 (_gpgme_fd_table_put): Likewise.
5286 (set_process_done): Remove function.
5287 (do_select): Take argument FDT. Use that to decide which fds to
5289 (_gpgme_remove_proc_from_wait_queue): Remove function.
5290 (_gpgme_wait_event_cb): New function.
5291 (_gpgme_wait_one): Likewise.
5292 (_gpgme_register_pipe_hanldler): Remove function.
5293 (_gpgme_add_io_cb): New function.
5294 (_gpgme_remove_io_cb): Likewise.
5295 (_gpgme_freeze_fd): Remove function.
5296 (_gpgme_thaw_fd): Remove function.
5297 * rungpg.c (struct fd_data_map_s): Add new member TAG.
5298 (struct gpg_object_s): Likewise for STATUS and COLON. Add member
5299 IDX to CMD. Add new member IO_CBS.
5300 (close_notify_handler): New variables POSSIBLY_DONE and NOT_DONE.
5301 For each I/O callback, check if it should be unregistered. If all
5302 callbacks have been unregistered, trigger GPGME_EVENT_DONE.
5303 Remove member RUNNING.
5304 (_gpgme_gpg_new): Initialize new members.
5305 (_gpgme_gpg_release): Check PID not RUNNING. Don't call
5306 _gpgme_remove_proc_from_wait_queue. Close GPG->CMD.FD if set.
5307 (build_argv): Store away the index instead the file descriptor for
5309 (_gpgme_gpg_add_io_cb): New function.
5310 (_gpgme_gpg_spawn): Use _gpgme_gpg_add_io_cb to register IO
5312 (gpg_status_handler): Change return type to void, remove PID
5313 argument, close filedescriptor if EOF or error occurs.
5314 (read_status): Use _gpgme_gpg_add_io_cb instead _gpgme_thaw_fd.
5315 Use IO_CBS->remove instead _gpgme_freeze_fd.
5316 (gpg_colon_line_handler): Change return type to void, remove PID
5317 argument, close filedescriptor if EOF or error occurs.
5318 (command_cb): Use IO_CBS->remove instead _gpgme_freeze_fd.
5319 (_gpgme_gpg_set_io_cbs): New function.
5320 * rungpg.h (_gpgme_gpg_set_io_cbs): Prototype for
5321 _gpgme_gpg_set_io_cbs.
5322 * gpgme.h (GpgmeIOCb): New type.
5323 (GpgmeRegisterIOCb): Likewise.
5324 (GpgmeRemoveIOCb): Likewise.
5325 (GpgmeEventIO): Likewise.
5326 (GpgmeEventIOCb): Likewise.
5327 (struct GpgmeIOCbs): New structure to hold I/O callbacks.
5328 (gpgme_set_op_io_cbs): New prototype.
5329 (gpgme_get_op_io_cbs): Likewise.
5330 * ops.h: New prototype for _gpgme_op_event_cb. Remove prototypes
5331 for _gpgme_freeze_fd and _gpgme_thaw_fd. Remove PID argument from
5332 _gpgme_data_inbound_handler and _gpgme_data_outbound_handler
5333 prototype. Add prototype for _gpgme_op_reset.
5334 Add synchronous argument to _gpgme_decrypt_start prototype.
5335 * io.h: Beautification.
5336 * gpgme.c: Include "wait.h".
5337 (gpgme_new): Initialize FDT.
5338 (gpgme_set_io_cbs): New function.
5339 (gpgme_get_io_cbs): Likewise.
5340 (_gpgme_op_event_cb): Likewise.
5341 * data.c (_gpgme_data_inbound_handler): Change return type to
5342 void. Drop PID argument. Close FD on error and EOF.
5343 (write_mem_data): Don't close FD here ...
5344 (write_cb_data): ... or here ...
5345 (_gpgme_data_outbound_handler): ... but here. Change return type
5346 to void. Drop PID argument.
5347 * context.h: Include "wait.h".
5348 (struct gpgme_context_s): New members FDT and IO_CBS.
5349 * op-support.c: New file.
5350 * Makefile.am (libgpgme_la_SOURCES): Add op-support.c.
5351 * ops.h: Add prototype for _gpgme_op_reset().
5352 * decrypt.c (_gpgme_decrypt_start): New argument SYNCHRONOUS. Use
5354 (gpgme_op_decrypt_start): Add synchronous argument.
5355 (gpgme_op_decrypt): Likewise. Use _gpgme_wait_one instead
5357 * delete.c (gpgme_op_delete_start): Rename to ...
5358 (_gpgme_op_delete_start): ... this. New argument SYNCHRONOUS.
5359 Use _gpgme_op_reset. Make function static.
5360 (gpgme_op_delete_start): Just a wrapper around
5361 _gpgme_op_delete_start now.
5362 (gpgme_op_delete): Add synchronous argument. Use _gpgme_wait_one
5364 * encrypt.c: Include "wait.h".
5365 (ggpgme_op_encrypt_start): Rename to ...
5366 (_gpgme_op_encrypt_start): ... this. New argument SYNCHRONOUS.
5367 Use _gpgme_op_reset. Make function static.
5368 (gpgme_op_encrypt_start): Just a wrapper around
5369 _gpgme_op_encrypt_start now.
5370 (gpgme_op_encrypt): Add synchronous argument. Use _gpgme_wait_one
5372 * encrypt_sign.c (gpgme_op_encrypt_sign_start): Rename to ...
5373 (_gpgme_op_encrypt_sign_start): ... this. New argument
5374 SYNCHRONOUS. Use _gpgme_op_reset. Make function static.
5375 (gpgme_op_encrypt_sign_start): Just a wrapper around
5376 _gpgme_op_encrypt_sign_start now.
5377 (gpgme_op_encrypt_sign): Add synchronous argument. Use
5378 _gpgme_wait_one instead gpgme_wait.
5379 * export.c (gpgme_op_export_start): Rename to ...
5380 (_gpgme_op_export_start): ... this. New argument SYNCHRONOUS.
5381 Use _gpgme_op_reset. Make function static.
5382 (gpgme_op_export_start): Just a wrapper around
5383 _gpgme_op_export_start now.
5384 (gpgme_op_export): Add synchronous argument. Use _gpgme_wait_one
5386 * genkey.c (gpgme_op_genkey_start): Rename to ...
5387 (_gpgme_op_genkey_start): ... this. New argument SYNCHRONOUS.
5388 Use _gpgme_op_reset. Make function static.
5389 (gpgme_op_genkey_start): Just a wrapper around
5390 _gpgme_op_genkey_start now.
5391 (gpgme_op_genkey): Add synchronous argument. Use _gpgme_wait_one
5393 * import.c (gpgme_op_import_start): Rename to ...
5394 (_gpgme_op_import_start): ... this. New argument SYNCHRONOUS.
5395 Use _gpgme_op_reset. Make function static.
5396 (gpgme_op_import_start): Just a wrapper around
5397 _gpgme_op_import_start now.
5398 (gpgme_op_import): Add synchronous argument. Use _gpgme_wait_one
5400 * keylist.c (gpgme_op_keylist_start): Use _gpgme_op_reset.
5401 (gpgme_op_keylist_ext_start): Likewise.
5402 * sign.c (gpgme_op_sign_start): Rename to ...
5403 (_gpgme_op_sign_start): ... this. New argument SYNCHRONOUS. Use
5404 _gpgme_op_reset. Make function static.
5405 (gpgme_op_sign_start): Just a wrapper around _gpgme_op_sign_start
5407 (gpgme_op_sign): Add synchronous argument. Use _gpgme_wait_one
5409 * trustlist.c (gpgme_op_trustlist_start): Use _gpgme_op_reset.
5410 * verify.c (gpgme_op_verify_start): Rename to ...
5411 (_gpgme_op_verify_start): ... this. New argument SYNCHRONOUS.
5412 Use _gpgme_op_reset. Make function static.
5413 (gpgme_op_verify_start): Just a wrapper around
5414 _gpgme_op_verify_start now.
5415 (gpgme_op_verify): Add synchronous argument. Use _gpgme_wait_one
5417 * engine-gpgsm.c (iocb_data_t): New type.
5418 (struct gpgsm_object_s): New member status_cb. Replace input_fd
5419 and input_data with input_cb. Replace output_fd and output_data
5420 with output_cb. Replace message_fd and message_data with
5421 message_cb. New member io_cbs.
5422 (_gpgme_gpgsm_new): Initialize all new members (and drop the old
5424 (close_notify_handler): New variable POSSIBLY_DONE. For each I/O
5425 callback, check if it should be unregistered. If all callbacks
5426 have been unregistered, trigger GPGME_EVENT_DONE.
5427 (_gpgme_gpgsm_release): Remove variable PID. Use new variable
5428 names to close the file descriptors.
5429 (_gpgme_gpgsm_op_decrypt): Use new variable names,
5430 (_gpgme_gpgsm_op_encrypt): Likewise.
5431 (_gpgme_gpgsm_op_genkey): Likewise.
5432 (_gpgme_gpgsm_op_import): Likewise.
5433 (_gpgme_gpgsm_op_keylist): Likewise.
5434 (_gpgme_gpgsm_op_keylist_ext): Likewise.
5435 (_gpgme_gpgsm_op_sign): Likewise.
5436 (_gpgme_gpgsm_op_verify): Likewise.
5437 (gpgsm_status_handler): Drop argument PID. Change return type to
5438 void. Close status pipe before returning because of EOF or error.
5439 (_gpgme_gpgsm_add_io_cb): New function.
5440 (_gpgme_gpgsm_start): Use _gpgme_gpgsm_add_io_cb to register
5442 (_gpgme_gpgsm_set_io_cbs): New function.
5443 * engine-gpgsm.h: New prototype for _gpgme_gpgsm_set_io_cbs.
5444 * engine.c (_gpgme_engine_set_io_cbs): New function.
5445 * engine.h: New prototype for _gpgme_engine_set_io_cbs.
5447 2002-06-04 Marcus Brinkmann <marcus@g10code.de>
5449 * Makefile.am (libgpgme_la_SOURCES): Remove mutex.h.
5451 2002-06-03 Marcus Brinkmann <marcus@g10code.de>
5453 * key.c: Include <ctype.h>.
5454 (_gpgme_key_append_name): Skip one more char when
5455 processing escaped char. Submitted by Marc Mutz <mutz@kde.org>.
5456 Handle hexadecimal encodings. Also reported by Marc. Thanks!
5458 2002-06-02 Marcus Brinkmann <marcus@g10code.de>
5460 * ath.h: Enable the _gpgme_ prefix. Fix all those prefix macros.
5461 * posix-sema.c: Use that prefix here.
5462 * posix-io.c: Include "ath.h".
5463 (_gpgme_io_read): Use _gpgme_ath_read instead read.
5464 (_gpgme_io_write): Use _gpgme_ath_write instead write.
5465 (_gpgme_io_waitpid): Use _gpgme_ath_waitpid instead waitpid.
5466 (_gpgme_io_select): Use _gpgme_ath_select instead select.
5468 2002-06-02 Marcus Brinkmann <marcus@g10code.de>
5470 * Makefile.am (ath_components): New variable.
5471 (ath_components_pthread): Likewise.
5472 (ath_components_pth): Likewise.
5473 (system_components): Add ath_componentes.
5477 * ath-pthread.c: Likewise.
5478 * ath-pth.c: Likewise.
5479 * posix-sema.c (_gpgme_sema_cs_enter): Rework to use the ATH
5481 * mutex.h: Remove file.
5483 2002-05-30 Werner Koch <wk@gnupg.org>
5485 * key.c (gpgme_key_get_string_attr): Return NULL when asking for
5486 an issuer with IDX > 0. We don't support altIssuerNames for now.
5488 2002-05-22 Werner Koch <wk@gnupg.org>
5490 * engine-gpgsm.c (_gpgme_gpgsm_op_keylist_ext): Aehmm, added
5491 missing variable definition. Oohh - Marcus was faster.
5493 2002-05-22 Marcus Brinkmann <marcus@gnu.org>
5495 * engine-gpgsm.c (_gpgme_gpgsm_op_keylist_ext): Fix last change.
5497 2002-05-21 Werner Koch <wk@gnupg.org>
5499 * engine-gpgsm.c (_gpgme_gpgsm_op_keylist)
5500 (_gpgme_gpgsm_op_keylist_ext): Pass the keylist mode to gpgsm.
5502 2002-05-10 Werner Koch <wk@gnupg.org>
5504 * key.h (gpgme_key_s): Add OTRUST.
5505 * keylist.c (set_ownertrust): New.
5506 (keylist_colon_handler): Get the ownertrust value
5507 * key.c (gpgme_key_get_string_attr,gpgme_key_get_ulong_attr):
5510 2002-05-08 Marcus Brinkmann <marcus@g10code.de>
5512 * w32-util.c: New static variable GET_PATH_LOCK.
5513 (_gpgme_get_gpg_path): Remove superfluous NULL initializer.
5514 Take lock while determining path.
5515 (_gpgme_get_gpgsm_path): Likewise.
5516 * version.c (do_subsystem_inits): Set DONE to 1 after
5518 (gpgme_get_engine_info): New variable ENGINE_INFO_LOCK. Take lock
5519 while determining engine info.
5520 * rungpg.c (_gpgme_gpg_get_version): New variable
5521 GPG_VERSION_LOCK. Take the lock while determining the program
5523 * posix-io.c: Include "sema.h".
5524 (_gpgme_io_spawn): New variable FIXED_SIGNALS_LOCK. Take the lock
5525 while fixing the signals.
5526 (_gpgme_io_select): Make READFDS and WRITEFDS non-static.
5527 * key.c: Include "sema.h". New globals KEY_CACHE_LOCK and
5529 (capabilities_to_string): Make STRINGS very const.
5530 (_gpgme_key_cache_add): Lock the key cache.
5531 (_gpgme_key_cache_get): Likewise.
5532 (gpgme_key_ref, gpgme_key_release): Lock the key_ref_lock.
5533 * import.c (append_xml_impinfo): Make IMPORTED_FIELDS and
5534 IMPORT_RES_FIELDS very const. Make FIELD and FIELD_NAME a litle
5536 * engine.c (_gpgme_engine_get_info): New variable
5537 ENGINE_INFO_LOCK. Take lock while determining engine info.
5538 * engine-gpgsm.c: Include "sema.h".
5539 (_gpgme_gpgsm_get_version): New variable GPGSM_VERSION_LOCK. Take
5540 lock while getting program version.
5542 2002-05-08 Marcus Brinkmann <marcus@g10code.de>
5544 * debug.h: New file.
5545 * Makefile.am (libgpgme_la_SOURCES): Add debug.h.
5546 * util.h: Removed all prototypes and declarations related to
5547 debugging. Include "debug.h".
5549 * debug.c (debug_level): Comment variable and remove superfluous
5552 (_gpgme_debug_enabled): Function removed.
5553 (struct debug_control_s): Definition removed.
5554 (_gpgme_debug_level): Function removed.
5555 (_gpgme_debug_begin): Rewritten to use vasprintf. Accept a
5556 pritnf-style format specification and a variable number of
5558 (_gpgme_debug_add): Rewritten using vasprintf. Expect that format
5559 starts out with "%s" for simplicity.
5560 (_gpgme_debug_end): Rewritten using vasprintf. Do not accept a
5561 TEXT argument anymore.
5563 * posix-io.c (_gpgme_io_select): Use new level argument for
5564 DEBUG_BEGIN instead explicit if construct.
5566 * debug.c (debug_init): Remove superfluous zero initializer,
5567 remove volatile flag of INITIALIZED. Do not use the
5568 double-checked locking algorithm, it is fundamentally flawed and
5569 will empty your fridge (on a more serious note, despite the
5570 volatile flag it doesn't give you the guarantee you would expect,
5571 for example on a DEC Alpha or an SMP machine. The volatile only
5572 serializes accesses to the volatile variable, but not to the other
5575 2002-05-03 Werner Koch <wk@gnupg.org>
5577 * engine-gpgsm.c (_gpgme_gpgsm_new): Redirect any gpgsm error
5578 output to /dev/null.
5580 * verify.c (gpgme_get_sig_key): Set the protocol of the listctx.
5581 * gpgme.c (gpgme_get_protocol): New.
5583 * data.c (gpgme_data_write): Changed type of BUFFER to void*.
5584 (gpgme_data_read): Ditto.
5586 * verify.c (_gpgme_verify_status_handler): Handle TRUST_* status
5587 lines so that a claim can be made without looking up the key.
5588 (gpgme_get_sig_string_attr): New.
5589 (gpgme_get_sig_ulong_attr): New.
5591 * gpgme.h (GpgmeAttr): Added GPGME_ATTR_SIG_STATUS.
5593 * rungpg.h: Add new status codes from gpg 1.0.7 and formatted the
5594 list to align with the status.h file from gnupg.
5596 * gpgme.h (GpgmeSigStat): Add _GOOD_EXP and _GOOD_EXPKEY.
5597 * verify.c (_gpgme_verify_status_handler, finish_sig): Handle
5598 these new status codes. Store the expiration time
5600 2002-04-27 Werner Koch <wk@gnupg.org>
5602 * gpgme.h (GpgmeData_Encoding): New.
5603 * data.c (gpgme_data_get_encoding,gpgme_data_set_encoding): New.
5604 * engine-gpgsm.c (map_input_enc): New. Use it in all local
5605 functions where the INPUT command gets send.
5607 2002-04-27 Marcus Brinkmann <marcus@g10code.de>
5609 * engine-gpgsm.c (_gpgme_gpgsm_op_verify): Close the output
5610 descriptor only when we don't need it anymore. Close the message
5611 descriptor if we don't need it.
5613 2002-04-26 Werner Koch <wk@gnupg.org>
5615 * Makefile.am (libgpgme_la_LIBADD): Use libtool libraries.
5617 2002-04-25 Marcus Brinkmann <marcus@g10code.de>
5619 * rungpg.c (_gpgme_gpg_release): Call gpgme_data_release on
5620 GPG->cmd.cb_data, not xfree.
5622 2002-04-25 Marcus Brinkmann <marcus@g10code.de>
5624 * engine-gpgsm.c (_gpgme_gpgsm_new): Set the display, ttyname,
5625 ttytype, lc_ctype and lc_messages options in the server.
5627 2002-04-24 Marcus Brinkmann <marcus@g10code.de>
5629 * engine-gpgsm.c (map_assuan_error): Add new error codes.
5631 2002-04-23 Werner Koch <wk@gnupg.org>
5633 * key.c (gpgme_key_get_ulong_attr): Swapped use of can_encrypt and
5634 can_certify to return the requested values.
5636 2002-04-23 Marcus Brinkmann <marcus@g10code.de>
5638 * gpgme.c (gpgme_get_progress_cb): Allow either return parameter
5640 (gpgme_get_passphrase_cb): Likewise.
5642 2002-04-22 Marcus Brinkmann <marcus@g10code.de>
5644 * gpgme.c (gpgme_get_passphrase_cb): New function.
5645 (gpgme_get_progress_cb): New function.
5646 * gpgme.h: Add new prototypes for gpgme_get_passphrase_cb and
5647 gpgme_get_progress_cb.
5649 2002-03-28 Werner Koch <wk@gnupg.org>
5651 * gpgme.h (GpgmeAttr): Add values for issuer and chaining.
5652 * key.h (gpgme_key_s): Add issuer and chaining elements for X509.
5653 * keylist.c (keylist_colon_handler): Store them.
5654 * key.c (gpgme_key_release): Free them.
5655 (gpgme_key_get_as_xml,gpgme_key_get_string_attr): Print them.
5657 2002-03-26 Werner Koch <wk@gnupg.org>
5659 * Makefile.am (libgpgme_la_SOURCES): Add mutex.h
5661 2002-03-21 Werner Koch <wk@gnupg.org>
5663 * util.h [!HAVE_FOPENCOOKIE]: Make sure off_t and ssize_t are
5666 2002-03-18 Marcus Brinkmann <marcus@g10code.de>
5668 * Makefile.am (system_components): New variable, set depending on
5670 (libgpgme_la_SOURCES): Use system_components. Remove `syshdr.h'.
5671 * syshdr.h: File removed.
5673 * posix-io.c: Remove !HAVE_DOSISH_SYSTEM safeguard. Clean up source.
5674 * posix-sema.c: Likewise.
5675 * posix-util.c: Likewise.
5677 * w32-io.c: Remove HAVE_DOSISH_SYSTEM safeguard.
5678 * w32-sema.c: Likewise.
5679 * w32-util.c: Likewise.
5681 * posix-io.c: Include `unistd.h', do not include `syshdr.h'.
5682 * posix-sema.c: Likewise.
5683 * w32-io.c: Include `io.h', do not include `syshdr.h'
5684 * w32-sema.c: Likewise.
5685 * w32-util.c: Likewise.
5686 * data.c: Do not include `syshdr.h'.
5688 * wait.h: Code cleanup.
5690 * mutex.h: New file.
5691 * posix-sema.c: Implement.
5693 2002-03-08 Werner Koch <wk@gnupg.org>
5695 * util.h [!HAVE_FOPENCOOKIE]: Fixed type. Thanks to Frank Heckenbach.
5697 2002-03-07 Werner Koch <wk@gnupg.org>
5699 * gpgme.h (gpgme_op_keylist_ext_start): Add prototype.
5701 2002-03-06 Marcus Brinkmann <marcus@g10code.de>
5703 * encrypt.c (_gpgme_encrypt_sym_status_handler): New function.
5704 (gpgme_op_encrypt_start): New variable SYMMETRIC, set it if RECP
5705 is null, and if it is set, use _gpgme_encrypt_sym_status_handler
5706 as status handler and run _gpgme_passphrase_start.
5707 * rungpg.c (_gpgme_gpg_op_encrypt): If RECP is zero, do symmetric
5709 * engine-gpgsm.c (_gpgme_gpgsm_op_encrypt): If RECP is zero,
5712 * rungpg.c (_gpgme_gpg_op_verify): Add "--" argument.
5714 2002-03-03 Marcus Brinkmann <marcus@g10code.de>
5716 * passphrase.c (_gpgme_passphrase_status_handler): Also set the
5717 error No_Passphrase if only a bad passphrase was provided.
5719 2002-03-03 Marcus Brinkmann <marcus@g10code.de>
5721 * rungpg.c (_gpgme_gpg_op_verify): If TEXT is of mode
5722 GPGME_DATA_MODE_IN, construct a command line that stores the
5724 * verify.c (gpgme_op_verify_start): Accept TEXT being
5725 uninitialized, and in this case interpret SIG as a normal or
5726 cleartext signature and TEXT as a return data object.
5727 * engine-gpgsm.c (_gpgme_gpgsm_op_verify): Likewise.
5729 2002-03-03 Marcus Brinkmann <marcus@g10code.de>
5731 * engine-gpgsm.c (_gpgme_gpgsm_op_keylist_ext) [!ENABLE_GPGSM]:
5734 2002-02-28 Werner Koch <wk@gnupg.org>
5736 * key.h (subkey_s): New member expires_at.
5737 * keylist.c (keylist_colon_handler): Set it here
5738 * key.c (gpgme_key_get_as_xml,gpgme_key_get_ulong_attr): Return it.
5740 2002-02-27 Marcus Brinkmann <marcus@g10code.de>
5742 * rungpg.h (_gpgme_gpg_op_keylist_ext): New prototype.
5743 * rungpg.c (_gpgme_gpg_op_keylist_ext): New function.
5744 * engine-gpgsm.h (_gpgme_gpgsm_op_keylist_ext): New prototype.
5745 * engine-gpgsm.c (_gpgme_gpgsm_op_keylist_ext): New function.
5746 * engine.h (_gpgme_engine_op_keylist_ext): New prototype.
5747 * engine.c (_gpgme_engine_op_keylist_ext): New function.
5748 * keylist.c (gpgme_op_keylist_ext_start): New function.
5750 2002-02-27 Marcus Brinkmann <marcus@g10code.de>
5752 * gpgme.h: Add new error code GPGME_Invalid_Recipient.
5753 * encrypt.c (struct encrypt_result_s): New member invalid_recipients,
5754 rename no_recipients to no_valid_recipients.
5755 (_gpgme_encrypt_status_handler): Include error for invalid
5757 * engine-gpgsm.c (gpgsm_set_recipients): Change type of first
5758 argument to GpgsmObject. Use that to report back the status about
5761 2002-02-26 Marcus Brinkmann <marcus@g10code.de>
5763 * verify.c (_gpgme_verify_status_handler): Fix the last change.
5765 2002-02-25 Marcus Brinkmann <marcus@g10code.de>
5767 * engine.c (_gpgme_engine_op_encrypt_sign): New function.
5768 * engine.h (_gpgme_engine_op_encrypt_sign): New prototype.
5769 * rungpg.c (_gpgme_append_gpg_args_from_signers): New function.
5770 (_gpgme_gpg_op_sign): Use that new function.
5771 (_gpgme_gpg_op_encrypt_sign): New function.
5772 * rungpg.h (_gpgme_gpg_op_encrypt_sign): New prototype.
5773 * gpgme.h (gpgme_op_encrypt_sign_start): New prototype.
5774 (gpgme_op_encrypt_sign): Likewise.
5775 * Makefile.am (libgpgme_la_SOURCES): Add encrypt-sign.c.
5776 * ops.h (_gpgme_encrypt_status_handler): Add prototype.
5777 (_gpgme_sign_status_handler): Add prototype.
5778 * sign.c (sign_status_handler): Rename to ...
5779 (_gpgme_sign_status_handler): ... this and make non-static.
5780 * encrypt.c (encrypt_status_handler): Rename to ...
5781 (_gpgme_encrypt_status_handler): ... this and make non-static.
5782 * encrypt.c (gpgme_op_encrypt_start): Use new status handler name.
5783 * sign.c (gpgme_op_sign_start): Likewise.
5785 2002-02-25 Marcus Brinkmann <marcus@g10code.de>
5787 * verify.c (_gpgme_verify_status_handler): Parse the args line to
5788 see if the problem is due to a missing key, and report that back
5791 2002-02-25 Marcus Brinkmann <marcus@g10code.de>
5793 * context.h (struct gpgme_context_s): New member include_certs.
5794 * gpgme.h (gpgme_set_include_certs): Add prototype.
5795 (gpgme_get_include_certs): Likewise.
5796 * gpgme.c (gpgme_set_include_certs): New function.
5797 (gpgme_get_include_certs): Likewise.
5798 (gpgme_new): Set include_certs to 1 (the default).
5799 * engine.c (_gpgme_engine_op_sign): Accept new argument include_certs,
5800 and pass it to _gpgme_gpgsm_op_sign.
5801 * engine.h (_gpgme_engine_op_sign): Likewise for prototype.
5802 * engine-gpgsm.c (_gpgme_gpgsm_op_sign): Accept new argument
5803 include_certs and handle it.
5804 * engine-gpgsm.h (_gpgme_gpgsm_start): Add new argument include_certs.
5805 * sign.c (gpgme_op_sign_start): Add new argument to
5806 _gpgme_engine_op_sign call.
5808 2002-02-14 Werner Koch <wk@gnupg.org>
5810 * keylist.c (gpgme_op_keylist_start): Do not use a verbose listing.
5812 2002-02-13 Werner Koch <wk@gnupg.org>
5814 * vasprintf.c, fopencookie.c: Add replacement functions.
5815 * util.h: Add prototypes for them.
5817 2002-02-09 Marcus Brinkmann <marcus@g10code.de>
5819 * engine-gpgsm.c (gpgsm_assuan_simple_command): Return 0 if we
5820 reach the end of the function.
5822 2002-02-09 Marcus Brinkmann <marcus@g10code.de>
5824 * genkey.c (gpgme_op_genkey_start): Fix logic in validity check.
5825 (gpgme_op_genkey_start): Skip newlines after opening tag.
5827 * engine-gpgsm.c (_gpgme_gpgsm_start): Remove cruft.
5829 2002-02-08 Marcus Brinkmann <marcus@g10code.de>
5831 * genkey.c (gpgme_op_genkey_start): Allow PUBKEY and SECKEY to be
5832 set, and pass them down to the crypto engine.
5833 * engine-gpgsm.h (_gpgme_gpgsm_start): New arguments PUBKEY and SECKEY.
5834 * engine.h: Likewise.
5835 * rungpg.h (_gpgme_gpg_spawn): Likewise.
5836 * engine.c (_gpgme_engine_op_genkey): Likewise. Use those
5838 * rungpg.c (_gpgme_gpg_op_genkey): Likewise. Complain if those
5840 * engine-gpgsm.c (_gpgme_gpgsm_op_genkey): Likewise. Implement
5843 * engine-gpgsm.c (_gpgme_gpgsm_op_keylist): Beautify comment.
5845 2002-02-06 Marcus Brinkmann <marcus@g10code.de>
5847 * rungpg.c (_gpgme_gpg_op_keylist): Remove handling of keylist
5850 2002-02-06 Marcus Brinkmann <marcus@g10code.de>
5852 * wait.c (gpgme_wait): Add new argument STATUS, in which the
5853 status of the returned context is returned.
5854 (_gpgme_wait_on_condition): Rework the function a bit, to make it
5855 aware of cancelled processes, and to allow to use gpgme_wait with
5856 CTX being NULL (as documented in the source).
5857 (struct proc_s): New member REPORTED.
5858 * gpgme.h: Fix prototype.
5859 * verify.c (gpgme_op_verify): Fix use of gpgme_wait.
5860 * sign.c (gpgme_op_sign): Likewise.
5861 * import.c (gpgme_op_import): Likewise.
5862 * genkey.c (gpgme_op_genkey): Likewise.
5863 * export.c (gpgme_op_export): Likewise.
5864 * encrypt.c (gpgme_op_encrypt): Likewise.
5865 * delete.c (gpgme_op_delete): Likewise.
5866 * decrypt-verify.c (gpgme_op_decrypt_verify): Likewise.
5868 2002-02-06 Marcus Brinkmann <marcus@g10code.de>
5870 * gpgme.c (gpgme_set_keylist_mode): Possibly return an error
5872 (gpgme_get_keylist_mode): New function.
5873 (gpgme_new): Set the default for keylist_mode member of CTX.
5875 * gpgme.h (gpgme_set_keylist_mode): Fix prototype.
5876 (gpgme_get_keylist_mode): New prototype.
5877 (GPGME_KEYLIST_MODE_LOCAL): New macro.
5878 (GPGME_KEYLIST_MODE_EXTERN): Likewise..
5880 2002-02-02 Marcus Brinkmann <marcus@g10code.de>
5882 This patch has gotten a bit large... mmh. The main thing that
5883 happens here is that error values are now not determined in the
5884 operation function after gpgme_wait completed, but in the status
5885 handler when EOF is received. It should always be the case that
5886 either an error is flagged or EOF is received, so that after a
5887 gpgme_wait you should never have the situation that no error is
5888 flagged and EOF is not received. One problem is that the engine
5889 status handlers don't have access to the context, a horrible
5890 kludge works around this for now. All errors that happen during a
5891 pending operation should be catched and reported in ctx->error,
5892 including out-of-core and cancellation. This rounds up neatly a
5893 couple of loose ends, and makes it possible to pass up any errors
5894 in the communication with the backend as well. As a bonus, there
5895 will be a function to access gpgme->wait, so that the operations
5896 can truly be implemented with their _start function.
5898 * engine-gpgsm.c (gpgsm_status_handler): Horrible kludge to report
5899 error back to the context.
5900 * rungpg.c (gpg_status_handler): Same horrible kludge applied here.
5902 * engine-gpgsm.c (gpgsm_assuan_simple_command): Add error checking.
5904 * wait.c (_gpgme_wait_on_condition): If canceled, set CTX->error
5905 to a value indication that.
5907 * verify.c (add_notation): Set error, not out_of_core.
5908 (finish_sig): Likewise.
5909 (gpgme_op_verify_start): Don't clear out_of_core.
5910 (_gpgme_verify_status_handler): At EOF, clean up the notation data.
5911 (gpgme_op_verify): And don't do it here.
5913 * trustlist.c (trustlist_status_handler): Check error, not out_of_core.
5914 (gpgme_op_trustlist_start): Don't clear out_of_core.
5915 (gpgme_op_trustlist_next): Check error, not out_of_core.
5916 (gpgme_op_trustlist_end): Likewise.
5918 * ops.h (test_and_allocate_result): New macro.
5919 (_gpgme_passphrase_result): Remove prototype.
5920 * delete.c (gpgme_op_delete): Return error from context.
5921 (delete_status_handler): Use macro test_and_allocate_result.
5922 Perform error checking at EOF.
5923 (gpgme_op_delete_start): Release result.
5924 * passphrase.c (_gpgme_passphrase_status_handler): Use macro
5925 test_and_allocate_result, and perform error checking here.
5926 (_gpgme_passphrase_result): Function removed.
5927 * sign.c (gpgme_op_sign_start): Do not set out_of_core to zero.
5928 (gpgme_op_sign): Just return the error value from the context.
5929 (sign_status_handler): Only progress if no error is set yet. If
5930 we process an EOF, set the resulting error value (if any).
5931 * decrypt.c (_gpgme_decrypt_result): Function removed.
5932 (create_result_struct): Function removed.
5933 (_gpgme_decrypt_status_handler): Use macro test_and_allocate_result,
5934 caclulate error on EOF, do not progress with errors.
5935 (_gpgme_decrypt_start): Do not set out_of_core to zero.
5936 (gpgme_op_decrypt): Just return the error value from the context.
5937 * encrypt.c (encrypt_status_handler): Perform the error checking
5939 (gpgme_op_encrypt_start): Do not clear out_of_core.
5940 * export.c (export_status_handler): Return if error is set in context.
5941 (gpgme_op_export_start): Release result.
5942 (gpgme_op_export): Return error from context.
5943 * decrypt-verify.c (gpgme_op_decrypt_verify): Return the error in
5945 * genkey.c (genkey_status_handler): Use macro
5946 test_and_allocate_result. Perform error checking at EOF.
5947 (gpgme_op_genkey): Just return the error from context.
5948 * import.c (gpgme_op_import): Return the error from context.
5949 (import_status_handler): Use macro test_and_allocate_result.
5950 * keylist.c (gpgme_op_keylist_start): Do not clear out_of_core.
5951 (gpgme_op_keylist_next): Return error of context.
5952 (keylist_colon_handler): Set error instead out_of_code.
5953 (finish_key): Likewise.
5955 * context.h: Remove member out_of_core, add member error.
5956 * gpgme.c (_gpgme_release_result): Clear error flag.
5958 * engine.h (_gpgme_engine_get_error): New prototype.
5959 * engine.c (_gpgme_engine_get_error): New function.
5960 * engine-gpgsm.c (_gpgme_gpgsm_get_error): New function.
5962 * engine-gpgsm.c (map_assuan_error): New function.
5963 (gpgsm_assuan_simple_command): Change return type to GpgmeError,
5964 use the new function to map error values.
5965 (gpgsm_set_fd): Change return type tp GpgmeError.
5966 (_gpgme_gpgsm_op_decrypt): Change type of ERR to GpgmeError.
5967 (gpgsm_set_recipients): Likewise. Change type of return value
5968 equivalently. Adjust error values.
5969 (_gpgme_gpgsm_op_import): Likewise.
5970 (_gpgme_gpgsm_op_sign): Likewise.
5971 (struct gpgsm_object_s): New member error.
5972 (gpgsm_status_handler): Set error if error occurs. Determine
5973 error number from ERR line received. If assuan_read_line fails,
5974 terminate the connection.
5976 2002-02-01 Marcus Brinkmann <marcus@g10code.de>
5978 * Makefile.am (MOSTLYCLEANFILES): New variable.
5980 2002-02-01 Marcus Brinkmann <marcus@g10code.de>
5982 * engine-gpgsm.c (gpgsm_status_handler): At error, terminate the
5983 connection to the server.
5985 2002-01-31 Marcus Brinkmann <marcus@g10code.de>
5987 * rungpg.h: Add STATUS_KEY_CREATED.
5989 * progress.c: New file.
5990 * Makefile.am (libgpgme_la_SOURCES): Add progress.c.
5992 * genkey.c (genkey_status_handler): Use
5993 _gpgme_progress_status_handler. Add check for status.
5994 (struct genkey_result_s): New structure.
5995 (_gpgme_release_genkey_result): New function.
5996 (gpgme_op_genkey): Check for error.
5997 * gpgme.c (_gpgme_release_result): Call
5998 _gpgme_release_genkey_result.
5999 * ops.h (_gpgme_release_genkey_result): Add prototype.
6000 * types.h (GenKeyResult): New type.
6001 * context.h (gpgme_context_s): Add GenKeyResult to member result.
6003 2002-01-30 Marcus Brinkmann <marcus@g10code.de>
6005 * gpgme.c (_gpgme_release_result): Call
6006 _gpgme_release_delete_result.
6007 * ops.h (_gpgme_release_delete_result): Add prototype.
6008 * types.h (DeleteResult): New type.
6009 * context.h (gpgme_context_s): Add DeleteResult to member result.
6011 * delete.c (enum delete_problem): New type.
6012 (struct delete_result_s): New structure.
6013 (_gpgme_release_delete_result): New function.
6014 (delete_status_handler): Implement more status codes.
6015 (gpgme_op_delete): Return error on failure.
6017 * import.c (MAX_IMPORTED_FIELDS): Bump up to 14.
6019 2002-01-30 Marcus Brinkmann <marcus@g10code.de>
6021 * import.c (struct import_result_s): New structure.
6022 (_gpgme_release_import_result): New function.
6023 (append_xml_impinfo): Likewise.
6024 (import_status_handler): Implement.
6025 * gpgme.c (_gpgme_release_result): Add call to
6026 _gpgme_release_import_result.
6027 * ops.h (_gpgme_release_import_result): Add prototype.
6028 * types.h (ImportResult): New type.
6029 * context.h (gpgme_context_s): Add ImportResult to member result.
6031 * encrypt.c (gpgme_op_encrypt): Code clean up.
6033 2002-01-30 Marcus Brinkmann <marcus@g10code.de>
6035 * gpgme.h: Add lots of comment and fix the formatting. Add
6036 gpgme_trustlist_end prototype.
6038 2002-01-29 Marcus Brinkmann <marcus@g10code.de>
6040 * gpgme.h: Add new type GpgmeIdleFunc. Change type of
6041 gpgme_register_idle to return and accept this type.
6042 * wait.c (gpgme_register_idle): Fix type.
6043 Save and return old value of idle_function.
6045 2002-01-29 Werner Koch <wk@gnupg.org>
6047 * engine-gpgsm.c (_gpgme_gpgsm_op_keylist): Implement secret only mode.
6049 * keylist.c (keylist_colon_handler): Add support for the new "crs"
6052 2002-01-22 Marcus Brinkmann <marcus@g10code.de>
6054 * engine-gpgsm.c (_gpgme_gpgsm_release): Call assuan_disconnect,
6055 not assuan_pipe_disconnect.
6057 * Makefile.am (libgpgme_la_LIBADD): Change to link assuan and
6058 jnlib (needed by assuan) statically into libgpgme. Linking a
6059 static library into a shared library this way is not portable.
6061 2002-01-22 Marcus Brinkmann <marcus@g10code.de>
6063 * gpgme.h (GpgmePassphraseCb): Change type of R_HD from void* to
6066 2002-01-22 Marcus Brinkmann <marcus@g10code.de>
6068 * data.c (gpgme_data_new_from_filepart): Change type of LENGTH
6069 from off_t to size_t.
6070 * gpgme.h: Likewise.
6072 2002-01-22 Marcus Brinkmann <marcus@g10code.de>
6074 * wait.c (_gpgme_wait_on_condition): If the process finished,
6075 reset the pending flag. Also if the operation was cancelled.
6077 (struct proc_s): Rename READY to DONE.
6078 (wait_item_s): Likewise.
6079 (set_process_ready): Rename to ...
6080 (set_process_done): ... this.
6081 (_gpgme_remove_proc_from_wait_queue): Call set_process_done
6082 instead set_process_ready.
6083 (_gpgme_wait_on_condition): Likewise.
6084 (do_select): Rename READY to DONE.
6086 * verify.c (gpgme_op_verify): Do not set pending to zero here.
6087 * sign.c (gpgme_op_sign): Likewise.
6088 * import.c (gpgme_op_import): Likewise.
6089 * genkey.c (gpgme_op_genkey): Likewise.
6090 * export.c (gpgme_op_export): Likewise.
6091 * encrypt.c (gpgme_op_encrypt): Likewise.
6092 * delete.c (gpgme_op_delete): Likewise.
6093 * decrypt-verify.c (gpgme_op_decrypt_verify): Likewise.
6094 * decrypt.c (gpgme_op_decrypt): Likewise.
6096 2002-01-22 Marcus Brinkmann <marcus@g10code.de>
6098 * export.c: Cleanup.
6100 2002-01-15 Marcus Brinkmann <marcus@g10code.de>
6102 * trustlist.c: Various source clean ups.
6103 (my_isdigit): Removed.
6104 (gpgme_op_trustlist_end): New function.
6106 2002-01-13 Marcus Brinkmann <marcus@g10code.de>
6108 * gpgme.c: Various source clean ups, like renaming C to CTX where
6110 (gpgme_new): Clear R_CTX before starting the work.
6111 (my_isdigit): Removed.
6112 (my_isxdigit): Likewise.
6114 * data.c: Various source clean ups.
6115 (gpgme_data_new_from_mem): Check BUFFER after clearing R_DH.
6116 (gpgme_data_new_with_read_cb): Similar for READ_CB.
6117 (gpgme_data_new_from_file): Loop over fread while EINTR.
6118 (gpgme_data_new_from_filepart): Rediddled a bit. Allow LENGTH to
6119 be zero. Loop over fread while EINTR.
6121 (my_isdigit): Removed.
6122 (my_isxdigit): Likewise.
6124 2001-12-21 Marcus Brinkmann <marcus@g10code.de>
6126 * engine-gpgsm.c (_gpgme_gpgsm_new): Replace General_Error with
6127 Pipe_Error where appropriate.
6129 2001-12-19 Marcus Brinkmann <marcus@g10code.de>
6131 * engine.c: Include `string.h'. Reported by Stéphane Corthésy.
6133 * version.c (get_engine_info): Remove prototype.
6135 2001-12-19 Marcus Brinkmann <marcus@g10code.de>
6137 * engine-gpgsm.c (_gpgme_gpgsm_new): New variable CHILD_FDS.
6138 Fill it with the servers fds, and pass it to assuan_pipe_connect.
6140 2001-12-18 Marcus Brinkmann <marcus@g10code.de>
6142 * keylist.c (gpgme_op_keylist_end): New function.
6143 * gpgme.h (gpgme_op_keylist_end): New prototype.
6145 * engine.h (gpgme_engine_check_version): Move prototype to ...
6146 * gpgme.h (gpgme_engine_check_version): ... here.
6148 * genkey.c (gpgme_op_genkey_start): Remove unused variable.
6150 2001-12-18 Marcus Brinkmann <marcus@g10code.de>
6152 * version.c (gpgme_get_engine_info): Reimplemented.
6153 (gpgme_check_engine): Reimplemented.
6154 (_gpgme_compare_versions): Return NULL if MY_VERSION is NULL.
6156 * engine.c: Include `io.h'.
6157 (gpgme_engine_get_info): New function.
6158 * engine.h (gpgme_engine_check_version, _gpgme_engine_get_info):
6161 2001-12-18 Marcus Brinkmann <marcus@g10code.de>
6163 * rungpg.c (struct reap_s, reap_list, reap_list_lock): Moved to ...
6164 * engine.c (struct reap_s, reap_list, reap_list_lock): ... here.
6165 Include `time.h', `sys/types.h', `assert.h', and `sema.h'.
6167 * rungpg.c (_gpgme_engine_add_child_to_reap_list): New function.
6168 (do_reaping, _gpgme_gpg_housecleaning): Moved to ...
6169 * engine.c (do_reaping, _gpgme_engine_housecleaning): ... here.
6170 * rungpg.c (_gpgme_gpg_release): Replace code that is now in its
6171 own function by call to _gpgme_engine_add_child_to_reap_list().
6173 * wait.c: Include `engine.h'.
6174 (run_idle): Call _gpgme_engine_housecleaning(), not
6175 _gpgme_gpg_housecleaning().
6177 2001-12-18 Marcus Brinkmann <marcus@g10code.de>
6179 * key.c (_gpgme_key_append_name): Append, not prepend, the uid.
6180 Initialize the next field of the uid structure.
6181 (gpgme_key_get_as_xml): Do not list last uid first.
6183 2001-12-17 Marcus Brinkmann <marcus@g10code.de>
6185 * engine-gpgsm.c (_gpgme_gpgsm_set_colon_line_handler): New
6186 function [!ENABLE_GPGSM].
6188 2001-12-14 Marcus Brinkmann <marcus@g10code.de>
6190 * engine-gpgsm.c (_gpgme_gpgsm_op_verify): Put TEXT into
6191 message_data, not SIG.
6192 (_gpgme_gpgsm_op_sign): Use `--detached', not `--detach'.
6194 * sign.c (sign_status_handler): Call
6195 _gpgme_passphrase_status_handler early.
6197 2001-12-14 Marcus Brinkmann <marcus@g10code.de>
6199 * engine-gpgsm.c: Revert last change.
6201 2001-12-14 Marcus Brinkmann <marcus@g10code.de>
6203 * engine-gpgsm.c (gpgsm_status_handler): Freeze the output file
6204 handler when ending this operation, otherwise the wait function
6207 2001-12-14 Marcus Brinkmann <marcus@g10code.de>
6209 * engine-gpgsm.c (struct gpgsm_object_s): New member colon.attic.
6210 (_gpgme_gpgsm_new): Initialize some more members.
6211 (_gpgme_gpgsm_release): Free the colon line handler's attic line.
6212 (gpgsm_status_handler): Rework the inline-data processing.
6214 2001-12-13 Marcus Brinkmann <marcus@g10code.de>
6216 * rungpg.c (_gpgme_gpg_spawn): Do not add the fds to the child
6217 list that are not dup'ed, for those the close-on-exec flag is set
6219 * version.c (_gpgme_get_program_version): Remove first entry in
6220 CFD, as the close-on-exec flag is now set for this fd.
6222 2001-12-13 Marcus Brinkmann <marcus@g10code.de>
6224 * engine-gpgsm.c (_gpgme_gpgsm_op_encrypt): Do not add `armor'
6225 option to `ENCRYPT'.
6226 * engine-gpgsm.c (gpgsm_set_recipients): Free LINE when returning
6229 2001-12-13 Marcus Brinkmann <marcus@g10code.de>
6231 * engine-gpgsm.c (close_notify_handler): New function.
6232 (_gpgme_gpgsm_new): Manage the file descriptors a
6233 bit differently. Do not set close-on-exec flags.
6234 (_gpgme_gpgsm_op_decrypt): Do not set message_fd
6235 to -1, this is done by the close handler.
6236 (_gpgme_gpgsm_op_encrypt): Likewise.
6237 (_gpgme_gpgsm_op_import): Likewise (also for output_fd).
6238 (_gpgme_gpgsm_op_keylist): Likewise (also for input_fd and output_fd).
6239 (_gpgme_gpgsm_op_sign): Likewise.
6240 (_gpgme_gpgsm_op_verify): Likewise, but for output_fd.
6242 * posix-io.c (_gpgme_io_pipe): Set the close-on-exec flag for the
6243 non-inherited file descriptor index of the pipe.
6245 2001-12-13 Werner Koch <wk@gnupg.org>
6247 * engine-gpgsm.c (_gpgme_gpgsm_set_colon_line_handler): New.
6248 (gpgsm_status_handler): Pass datalines to a colon handler
6249 * engine.c (_gpgme_engine_set_colon_line_handler): Set the colon
6252 * engine-gpgsm.c (_gpgme_gpgsm_op_keylist): Allow NULL for
6254 (gpgsm_assuan_simple_command): Removed underscore from
6256 (_gpgme_gpgsm_start): Ditto.
6257 (gpgsm_assuan_simple_command): Replaced interal Assuan read
6258 function by the new assuan_read_line. Removed the use of the
6260 (gpgsm_status_handler): Ditto. Use the new assuan_pending_line.
6261 (_gpgme_gpgsm_start): Use the documented way to get an fd from
6264 * keylist.c (keylist_colon_handler): Handle "crt" records
6265 * key.h (gpgme_key_s): Add an x509 flag.
6266 * key.c (parse_x509_user_id): New.
6267 (_gpgme_key_append_name): Handle x.509 names.
6269 2001-12-05 Marcus Brinkmann <marcus@g10code.de>
6271 * engine-gpgsm.c (gpgsm_status_handler): Make it work with current
6274 2001-12-05 Marcus Brinkmann <marcus@g10code.de>
6276 * engine-gpgsm.c (gpgsm_set_fd): Accept one more argument OPT.
6277 (_gpgme_gpgsm_op_encrypt): Pass armor argument to gpgsm_set_fd for
6279 (_gpgme_gpgsm_op_sign): Likewise.
6281 2001-12-05 Marcus Brinkmann <marcus@g10code.de>
6283 * keylist.c (gpgme_op_keylist_next): Set pending to 0 if EOF
6286 2001-11-26 Marcus Brinkmann <marcus@g10code.de>
6288 * engine-gpgsm.c (_gpgme_gpgsm_op_sign): Fix stupid typo.
6290 2001-11-24 Marcus Brinkmann <marcus@g10code.de>
6292 * engine-gpgsm.c (gpgsm_status_handler): Don't break if bsearch fails.
6293 Deal with assuan read line returning more than one line (for now).
6295 2001-11-23 Marcus Brinkmann <marcus@g10code.de>
6297 * engine-gpgsm.c (_gpgme_gpgsm_op_sign): Implement it according to
6298 the current protocol definition.
6300 2001-11-23 Marcus Brinkmann <marcus@g10code.de>
6302 * engine-gpgsm.c (_gpgme_gpgsm_new): Set CLOEXEC flag for parent
6305 2001-11-22 Marcus Brinkmann <marcus@g10code.de>
6307 * engine-gpgsm.c: Include stdlib.h and string.h. Also include,
6308 for now, rungpg.h and status-table.h.
6309 (gpgsm_status_handler): Implement more of the status handler.
6311 2001-11-22 Marcus Brinkmann <marcus@g10code.de>
6313 * engine.c (_gpgme_engine_op_decrypt): Implement CMS case.
6314 (_gpgme_engine_op_delete): Likewise.
6315 (_gpgme_engine_op_encrypt): Likewise.
6316 (_gpgme_engine_op_export): Likewise.
6317 (_gpgme_engine_op_genkey): Likewise.
6318 (_gpgme_engine_op_keylist): Likewise.
6319 (_gpgme_engine_op_sign): Likewise.
6320 (_gpgme_engine_op_trustlist): Likewise.
6322 * engine-gpgsm.c (_gpgme_gpgsm_op_encrypt): New function.
6323 (gpgsm_assuan_simple_command): Likewise.
6324 (gpgsm_set_recipients): Likewise.
6325 (gpgsm_set_fd): Reimplement using gpgsm_assuan_simple_command.
6326 (_gpgme_gpgsm_op_delete): New function.
6327 (_gpgme_gpgsm_op_export): Likewise.
6328 (_gpgme_gpgsm_op_genkey): Likewise.
6329 (_gpgme_gpgsm_op_sign): Likewise.
6330 (_gpgme_gpgsm_op_keylist): Likewise.
6331 (_gpgme_gpgsm_op_trustlist): Likewise.
6332 (_gpgme_gpgsm_release): Release command.
6333 (_gpgme_gpgsm_op_decrypt): Allocate command.
6334 (_gpgme_gpgsm_op_import): Likewise.
6335 (gpgsm_status_handler): Also treat `ERR' strings as EOF.
6337 2001-11-22 Marcus Brinkmann <marcus@g10code.de>
6339 * gpgme.h (gpgme_set_protocol): New prototype.
6341 2001-11-22 Marcus Brinkmann <marcus@g10code.de>
6343 * engine-gpgsm.c (_gpgme_gpgsm_op_decrypt): New function.
6344 (_gpgme_gpgsm_op_import): Likewise.
6346 2001-11-22 Marcus Brinkmann <marcus@g10code.de>
6348 * engine-gpgsm.c: Shuffle around header inclusion a bit, to still
6350 (_gpgme_set_status_handler) [!ENABLE_GPGSM]: New function.
6352 2001-11-22 Werner Koch <wk@gnupg.org>
6354 * engine-gpgsm.c: Include more headers so that NULL and mk_error
6355 is defined even with an undefined GPGSM_PATH.
6357 2001-11-22 Marcus Brinkmann <marcus@g10code.de>
6359 * rungpg.c (gpg_inbound_handler, write_mem_data, write_cb_data,
6360 gpg_outbound_handler): Moved to ...
6361 * data.c (_gpgme_data_inbound_handler, write_mem_data,
6362 write_cb_data, _gpgme_data_outbound_handler): ... here. Make the
6363 _gpgme_* ones non-static.
6364 * data.c: Include io.h.
6366 * ops.h (_gpgme_data_inbound_handler): New prototype.
6367 (_gpgme_data_outbound_handler): Likewise.
6368 (_gpgme_gpg_spawn): Use these new functions.
6370 * engine-gpgsm.h (_gpgme_gpgsm_op_decrypt, _gpgme_gpgsm_op_delete,
6371 _gpgme_gpgsm_op_encrypt, _gpgme_gpgsm_op_export,
6372 _gpgme_gpgsm_op_genkey, _gpgme_gpgsm_op_import,
6373 _gpgme_gpgsm_op_keylist, _gpgme_gpgsm_op_sign,
6374 _gpgme_gpgsm_op_trustlist, _gpgme_gpgsm_op_verify,
6375 _gpgme_gpgsm_start, _gpgme_gpgsm_set_status_handler): New prototype.
6376 Include <rungpg.h> for status handler function.
6378 * engine-gpgsm.c (struct gpgsm_object_s): New members input_fd,
6379 input_data, output_fd, output_data, message_fd, message_data, command
6381 (_gpgme_gpgsm_new): Open input, output and message pipes before
6382 connecting to the client. Close server's ends afterwards.
6383 (_gpgme_gpgsm_release): Close open file descriptors. Remove
6384 server process from wait queue.
6385 (_gpgme_gpgsm_op_verify, _gpgme_gpgsm_start,
6386 _gpgme_gpgsm_set_status_handler, gpgms_status_handler): New function.
6388 * engine.c (_gpgme_engine_start): Implement for GPGME_PROTOCOL_CMS.
6389 (_gpgme_engine_set_status_handler): Likewise.
6390 (_gpgme_engine_op_verify): Likewise.
6392 2001-11-21 Marcus Brinkmann <marcus@g10code.de>
6394 * context.h: Do not include rungpg.h, but engine.h.
6395 (struct gpgme_context_s): Replace member gpg with engine.
6396 * gpgme.c (gpgme_release): Release engine, not gpg.
6398 * recipient.c (_gpgme_append_gpg_args_from_recifgpients): Function
6400 * rungpg.c (_gpgme_append_gpg_args_from_recipients): ... here.
6401 Make static, change order of arguments, and return an error value.
6402 * ops.h (_gpgme_append_gpg_args_from_recipients): Removed prototype.
6404 * rungpg.h (_gpgme_gpg_op_verify): Add prototype.
6405 (_gpgme_gpg_op_encrypt): Likewise.
6406 (_gpgme_gpg_op_decrypt): Likewise.
6407 (_gpgme_gpg_op_delete): Likewise.
6408 (_gpgme_gpg_op_export): Likewise.
6409 (_gpgme_gpg_op_genkey): Likewise.
6410 (_gpgme_gpg_op_import): Likewise.
6411 (_gpgme_gpg_op_keylist): Likewise.
6412 (_gpgme_gpg_op_sign): Likewise.
6413 (_gpgme_gpg_op_trustlist): Likewise.
6414 * rungpg.c (_gpgme_gpg_op_verify): New function.
6415 (_gpgme_gpg_op_encrypt): Likewise.
6416 (_gpgme_gpg_op_decrypt): Likewise.
6417 (_gpgme_gpg_op_delete): Likewise.
6418 (_gpgme_gpg_op_export): Likewise.
6419 (_gpgme_gpg_op_genkey): Likewise.
6420 (_gpgme_gpg_op_import): Likewise.
6421 (_gpgme_gpg_op_keylist): Likewise.
6422 (_gpgme_gpg_op_sign): Likewise.
6423 (_gpgme_gpg_op_trustlist): Likewise.
6425 * engine.h (_gpgme_engine_set_status_handler): Add prototype.
6426 (_gpgme_engine_set_command_handler): Likewise.
6427 (_gpgme_engine_set_colon_line_handler): Likewise.
6428 (_gpgme_engine_op_decrypt): Likewise.
6429 (_gpgme_engine_op_delete): Likewise.
6430 (_gpgme_engine_op_encrypt): Likewise.
6431 (_gpgme_engine_op_export): Likewise.
6432 (_gpgme_engine_op_genkey): Likewise.
6433 (_gpgme_engine_op_import): Likewise.
6434 (_gpgme_engine_op_keylist): Likewise.
6435 (_gpgme_engine_op_sign): Likewise.
6436 (_gpgme_engine_op_trustlist): Likewise.
6437 (_gpgme_engine_op_verify): Likewise.
6438 (_gpgme_engine_start): Likewise.
6439 * engine.c (_gpgme_engine_set_status_handler): New function.
6440 (_gpgme_engine_set_command_handler): Likewise.
6441 (_gpgme_engine_set_colon_line_handler): Likewise.
6442 (_gpgme_engine_op_decrypt): Likewise.
6443 (_gpgme_engine_op_delete): Likewise.
6444 (_gpgme_engine_op_encrypt): Likewise.
6445 (_gpgme_engine_op_export): Likewise.
6446 (_gpgme_engine_op_genkey): Likewise.
6447 (_gpgme_engine_op_import): Likewise.
6448 (_gpgme_engine_op_keylist): Likewise.
6449 (_gpgme_engine_op_sign): Likewise.
6450 (_gpgme_engine_op_trustlist): Likewise.
6451 (_gpgme_engine_op_verify): Likewise.
6452 (_gpgme_engine_start): Likewise.
6454 * verify.c (gpgme_op_verify_start): Reimplement in terms of above
6456 * encrypt.c (gpgme_op_encrypt_start): Likewise.
6457 * decrypt.c (_gpgme_decrypt_start): Likewise.
6458 * passphrase.c (_gpgme_passphrase_start): Likewise.
6459 * keylist.c (gpgme_op_keylist_start): Likewise.
6461 2001-11-20 Marcus Brinkmann <marcus@g10code.de>
6463 * types.h: Add types EngineObject and GpgsmObject.
6465 * Makefile.am (libgpgme_la_SOURCES): Add engine-gpgsm.h,
6466 engine-gpgsm.c, engine.h and engine.c.
6467 * engine.h: New file.
6468 * engine.c: Likewise.
6469 * engine-gpgsm.h: Likewise.
6470 * engine-gpgsm.c: Likewise.
6472 * rungpg.c (_gpgme_gpg_get_version): New function.
6473 (_gpgme_gpg_check_version): Likewise.
6474 * rungpg.h: Add prototypes for _gpgme_gpg_get_version and
6475 _gpgme_gpg_check_version.
6477 * version.c (compare_versions): Rename to ...
6478 (_gpgme_compare_versions): ... this. Make non-static.
6479 (gpgme_check_version): Use _gpgme_compare_versions rather than
6481 (gpgme_check_engine): Likewise.
6482 * ops.h (_gpgme_get_program_version): Add prototype.
6484 2001-11-20 Marcus Brinkmann <marcus@g10code.de>
6486 * Makefile.am (libgpgme_la_INCLUDES): Remove obsolete directive.
6487 (AM_CPPFLAGS): New directive [BUILD_ASSUAN].
6488 (libgpgme_la_LIBADD): Likewise.
6490 2001-11-20 Marcus Brinkmann <marcus@g10code.de>
6492 * version.c: Remove global variables lineno and
6494 (version_handler): Removed.
6495 (_gpgme_get_program_version): New function.
6496 (get_engine_info): Don't use context and version_handler,
6497 but _gpgme_get_program_version.
6498 * ops.h (_gpgme_get_program_version): Add prototype for
6499 _gpgme_get_program_version (we expect to use it elsewhere soon).
6501 2001-11-18 Marcus Brinkmann <marcus@g10code.de>
6503 * version.c (get_engine_info): If GnuPG is not available, return
6505 * posix-util.c (_gpgme_get_gpg_path): Allow GPG_PATH to be
6507 (_gpgme_get_gpgsm_path): New function.
6508 * w32-util.c (find_program_in_registry): New static function.
6509 (_gpgme_get_gpg_path): Allow GPG_PATH to be undefined. Rework
6510 to use find_program_in_registry.
6511 (_gpgme_get_gpgsm_path): New function.
6512 (util.h): Prototype _gpgme_get_gpgsm_path).
6513 * rungpg.c (_gpgme_gpg_spawn): Verify that _gpgme_get_gpg_path()
6516 2001-11-16 Marcus Brinkmann <marcus@g10code.de>
6518 * decrypt-verify.c: New file.
6519 * Makefile.am (libgpgme_la_SOURCES): Add decrypt-verify.c.
6520 * types.h: Add decrypt-verify types.
6522 * context.h: Add result type for decrypt-verify.
6523 * gpgme.h: Add decrypt-verify prototypes.
6525 * decrypt.c (decrypt_status_handler): Renamed to ...
6526 (_gpgme_decrypt_status_handler): ... this. Make non-static.
6527 (_gpgme_decrypt_start): New function, derived from
6528 gpgme_op_decrypt_start.
6529 (gpgme_op_decrypt_start): Reimplement in terms of
6530 _gpgme_decrypt_start.
6531 (_gpgme_decrypt_result): New function to retrieve error value.
6532 (gpgme_op_decrypt): Use _gpgme_decrypt_result.
6533 * ops.h: Add prototypes for new functions.
6535 * verify.c (verify_status_handler): Renamed to ...
6536 (_gpgme_verify_status_handler): ... this. Make non-static.
6537 (gpgme_op_verify_start): Use new function name.
6538 (intersect_stati): Renamed to ...
6539 (_gpgme_intersect_stati): ... this. Make non-static.
6540 (gpgme_op_verify): Use new name.
6541 * ops.h: Add prototypes for new functions.
6543 2001-11-16 Marcus Brinkmann <marcus@g10code.de>
6545 * passphrase.c: New file.
6546 * Makefile.am (libgpgme_la_SOURCES): Add passphrase.c.
6547 * ops.h (_gpgme_passphrase_result): Add prototypes from
6549 * types.h: Likewise.
6550 * context.h: Add member passphrase to result.
6551 * gpgme.c (_gpgme_release_result): Release passphrase member.
6553 * decrypt.c: Some formatting and variable name changes (like
6555 (struct decrypt_result_s): Remove members now found in
6557 (_gpgme_release_decrypt_result): Don't release removed members.
6558 (decrypt_status_handler): Call _gpgme_passphrase_status_handler,
6559 and don't handle the cases catched there.
6560 (command_handler): Removed.
6561 (gpgme_op_decrypt_start): Don't set command handler, but invoke
6562 _gpgme_passphrase_start which does it.
6563 (gpgme_op_decrypt): Invoke _gpgme_passphrase_result and drop the
6564 cases covered by it.
6566 * sign.c Some formatting and variable name changes (like
6568 (struct sign_result_s): Remove members now found in
6570 (_gpgme_release_sign_result): Don't release removed members.
6571 (sign_status_handler): Call _gpgme_passphrase_status_handler,
6572 and don't handle the cases catched there.
6573 (command_handler): Removed.
6574 (gpgme_op_sign_start): Don't set command handler, but invoke
6575 _gpgme_passphrase_start which does it.
6576 (gpgme_op_sign): Invoke _gpgme_passphrase_result and drop the
6577 cases covered by it.
6579 2001-11-15 Marcus Brinkmann <marcus@g10code.de>
6581 * decrypt.c (command_handler): Fix last change.
6583 2001-11-15 Marcus Brinkmann <marcus@g10code.de>
6585 * verify.c (_gpgme_release_verify_result): Rename RES to RESULT.
6586 Rename R2 to NEXT_RESULT.
6587 (intersect_stati): Rename RES to RESULT.
6588 (gpgme_get_sig_status): Likewise. Do not check return_type, but
6589 the member verify of result.
6590 (gpgme_get_sig_key): Likewise.
6592 * sign.c (_gpgme_release_sign_result): Rename RES to RESULT. If
6593 RESULT is zero, return.
6594 (sign_status_handler, command_handler): Do not check return_type,
6595 but the member sign of result.
6596 (gpgme_op_sign): Likewise. Drop assertion.
6598 * encrypt.c (_gpgme_release_encrypt_result): Rename RES to RESULT.
6599 If RESULT is zero, return.
6600 (encrypt_status_handler): Do not check return_type, but the member
6602 (gpgme_op_encrypt): Likewise. Drop assertion.
6604 * decrypt.c (_gpgme_release_decrypt_result): Rename RES to RESULT.
6605 (create_result_struct): Do not set result_type.
6606 (command_handler, decrypt_status_handler): Do not check
6607 return_type, but the member decrypt of result.
6608 (gpgme_op_decrypt): Likewise. Drop assertion.
6610 * context.h (enum ResultType): Removed.
6611 (struct gpgme_context_s): Remove member result_type.
6612 (struct result): Replaces union result.
6613 * gpgme.c: Include string.h.
6614 (_gpgme_release_result): Release all members of c->result, which
6615 is now a struct. Zero out all members of the struct afterwards.
6617 2001-11-11 Marcus Brinkmann <marcus@g10code.de>
6619 * rungpg.c (_gpgme_gpg_release): Release GPG->cmd.cb_data.
6620 Release all members of the list GPG->arglist.
6621 Reported by Michael Schmidt <mschmidt@cs.uni-sb.de>.
6623 2001-11-02 Marcus Brinkmann <marcus@g10code.de>
6625 * rungpg.c (pipemode_copy): Change type of NBYTES to size_t.
6627 * key.c: Include string.h.
6629 * recipient.c: Likewise.
6631 2001-10-29 Marcus Brinkmann <marcus@g10code.de>
6633 * context.h: New member signers_len.
6634 * signers.c (gpgme_signers_clear): Require that signers are
6635 non-NULL with assertion. Use signers_len to determine how much
6636 keys to release. Add documentation.
6637 (gpgme_signers_add): Use signers_len to determine if the buffer is
6638 large enough. Use xtryrealloc rather than xtrymalloc and copying.
6640 (gpgme_signers_enum): Use signers_len to determine if key is
6641 available. Add documentation.
6643 2001-10-22 Marcus Brinkmann <marcus@g10code.de>
6645 * data.c (_gpgme_data_append): Check if LENGTH is smaller than
6646 ALLOC_CHUNK, not DH->length.
6648 2001-10-17 Marcus Brinkmann <marcus@g10code.de>
6650 * gpgme.c (gpgme_set_protocol): Fix last change.
6652 2001-10-15 Werner Koch <wk@gnupg.org>
6654 * gpgme.h (GpgmeProtocol): New.
6655 * gpgme.c (gpgme_set_protocol): New.
6657 2001-09-26 Werner Koch <wk@gnupg.org>
6659 * gpgme.c (gpgme_set_passphrase_cb): Ignore a NULL context.
6660 (gpgme_set_progress_cb): Ditto. Suggested by Mark Mutz.
6662 2001-09-17 Werner Koch <wk@gnupg.org>
6664 * keylist.c (finish_key): Shortcut for no tmp_key. Changed all
6665 callers to use this function without a check for tmp_key.
6667 * keylist.c (gpgme_op_keylist_next): Reset the key_cond after
6668 emptying the queue. Bug reported by Stéphane Corthésy.
6670 2001-09-12 Werner Koch <wk@gnupg.org>
6672 * data.c (gpgme_data_rewind): Allow rewind for callbacks.
6674 2001-09-07 Werner Koch <wk@gnupg.org>
6676 * rungpg.h: Add NO_RECP.
6677 * encrypt.c (encrypt_status_handler): Take on No_RECP.
6678 (gpgme_op_encrypt): Better error return.
6680 * verify.c (verify_status_handler): Take on NODATA.
6682 2001-09-03 Werner Koch <wk@gnupg.org>
6684 * rungpg.h: Added STATUS_INV_RECP.
6685 * gpgme.c (_gpgme_release_result): Add support for new
6686 EncryptResult object.
6687 * encrypt.c (append_xml_encinfo): New.
6688 (encrypt_status_handler): Add some status parsing.
6689 (_gpgme_release_encrypt_result): New.
6691 2001-08-29 Werner Koch <wk@gnupg.org>
6693 * recipient.c (gpgme_recipients_release): Free the list. By Timo.
6695 * keylist.c (keylist_colon_handler): Do a finish key if we receive
6696 an EOF here. This is probably the reason for a lot of bugs
6697 related to keylisting. It is so obvious. Kudos to Enno Cramer
6698 for pointing that out.
6700 2001-08-28 Werner Koch <wk@gnupg.org>
6702 * gpgme.c, gpgme.h (gpgme_get_op_info): New.
6703 (_gpgme_set_op_info): New.
6704 (_gpgme_release_result): Reset the op_info here.
6705 * sign.c (append_xml_siginfo): New.
6706 (sign_status_handler): Store the sig create information.
6708 2001-07-31 Werner Koch <wk@gnupg.org>
6710 * encrypt.c (gpgme_op_encrypt): Hack to detect no valid recipients.
6712 2001-07-30 Werner Koch <wk@gnupg.org>
6714 * gpgme.c (gpgme_get_armor,gpgme_get_textmode): New.
6716 * rungpg.c (build_argv): Disable armor comments
6717 * w32-io.c (build_commandline): Need to add quotes here
6719 2001-07-24 Werner Koch <wk@gnupg.org>
6721 * data.c (gpgme_data_read): Add a a way to return the available bytes.
6723 2001-07-23 Werner Koch <wk@gnupg.org>
6725 * util.c: Removed stpcpy() because we use the version from jnlib.
6727 2001-07-19 Werner Koch <wk@gnupg.org>
6729 * mkstatus: Define the collating sequence for sort.
6731 2001-06-26 Werner Koch <wk@gnupg.org>
6733 * rungpg.h: Add STATUS_UNEXPECTED as suggested by Timo.
6735 2001-06-15 Werner Koch <wk@gnupg.org>
6737 * keylist.c (set_userid_flags): Fixed the assigned values. Kudos
6738 to Timo for pointing this out.
6740 2001-06-01 Werner Koch <wk@gnupg.org>
6742 * debug.c (_gpgme_debug_begin): Fixed a /tmp race. Noted by
6745 2001-05-28 Werner Koch <wk@gnupg.org>
6747 * version.c (gpgme_check_engine): Stop version number parsing at
6748 the opening angle and not the closing one. By Tommy Reynolds.
6750 2001-05-01 José Carlos García Sogo <jose@jaimedelamo.eu.org>
6752 * encrypt.c (gpgme_op_encrypt_start): Deleted the assert ( !c->gpg )
6753 line, because it gave an error if another operation had been made
6754 before using the same context.
6756 * decrypt.c (gpgme_op_decrypt_start): The same as above. Also added
6757 one line to release the gpg object in the context (if any).
6759 2001-04-26 Werner Koch <wk@gnupg.org>
6761 * key.c, key.h (_gpgme_key_cache_init): New.
6762 (_gpgme_key_cache_add): New.
6763 (_gpgme_key_cache_get): New.
6764 * version.c (do_subsystem_inits): Init the cache.
6765 * keylist.c (finish_key): Put key into the cache
6766 * verify.c (gpgme_get_sig_key): First look into the cache.
6768 2001-04-19 Werner Koch <wk@gnupg.org>
6770 * keylist.c (parse_timestamp): Adjusted for the changed
6771 --fixed-list-mode of gpg 1.0.4h.
6773 2001-04-05 Werner Koch <wk@gnupg.org>
6775 * verify.c (gpgme_op_verify_start): Enabled pipemode for detached sigs.
6777 2001-04-04 Werner Koch <wk@gnupg.org>
6779 * w32-io.c (_gpgme_io_select): Don't select on the writer if there
6780 are still bytes pending. Timo found this not easy to track down
6783 2001-04-02 Werner Koch <wk@gnupg.org>
6785 * gpgme.h: Add GPGME_ATTR_KEY_{EXPIRED,DISABLED}.
6786 * key.c (gpgme_key_get_ulong_attr): And return those attribs.
6788 * verify.c (gpgme_get_sig_key): Set keyliosting mode depending on
6789 the mode set in the current context. Suggested by Timo.
6791 * key.c (gpgme_key_get_ulong_attr): Return can_certify and not
6792 can_encrypt. By Timo.
6794 2001-03-30 Werner Koch <wk@gnupg.org>
6796 * debug.c (debug_init): Allow to specify a debug file.
6797 (_gpgme_debug_level): New.
6799 * posix-io.c (_gpgme_io_read, _gpgme_io_write): Print output.
6800 (_gpgme_io_select): Debug only with level > 2.
6802 2001-03-15 Werner Koch <wk@gnupg.org>
6804 * rungpg.c: Included time.h.
6806 * key.h: New keyflags for capabilities.
6807 * keylist.c (set_mainkey_capability, set_subkey_capability): New.
6808 (keylist_colon_handler): Parse them.
6809 * gpgme.h: New attribute values for capabilties.
6810 * key.c (gpgme_key_get_string_attr): Return them.
6811 (capabilities_to_string): New.
6812 (gpgme_key_get_ulong_attr): Return the global caps.
6814 2001-03-14 Werner Koch <wk@gnupg.org>
6816 * w32-io.c (destroy_reader,destroy_writer): Fixed syntax error.
6817 Thanks to Jan Oliver Wagner.
6819 2001-03-13 Werner Koch <wk@gnupg.org>
6821 * context.h: Add invalid and revoke flags to user_id structure.
6822 * keylist.c (gpgme_op_keylist_start): Use --fixed-list-mode.
6823 (keylist_colon_handler): Adjust for that.
6824 (set_userid_flags): New.
6825 (set_mainkey_trust_info): Handle new key invalid flag
6826 (set_subkey_trust_info): Ditto.
6827 * gpgme.h: Add new attributes for key and user ID flags.
6828 * key.c (_gpgme_key_append_name): Init these flags
6829 (gpgme_key_get_as_xml): Print them.
6830 (one_uid_as_xml): New helper for above.
6831 (gpgme_key_get_string_attr, gpgme_key_get_ulong_attr):
6832 Return the new attributes. Enhanced, so that subkey information
6833 can be returned now.
6835 2001-02-28 Werner Koch <wk@gnupg.org>
6837 * w32-io.c (destroy_reader): Set stop_me flag.
6838 (writer,create_writer,destroy_writer,find_writer,kill_writer): New.
6839 (_gpgme_io_write): Use a writer thread to avaoid blocking.
6840 (_gpgme_io_close): Cleanup a writer thread
6841 (_gpgme_io_select): Repalce tthe faked wait on writing by a real
6842 waiting which is now possible due to the use of a writer thread.
6844 2001-02-20 Werner Koch <wk@gnupg.org>
6846 * w32-io.c (destroy_reader,kill_reader): New.
6847 (create_reader, reader): Add a new event to stop the thread.
6848 (_gpgme_io_close): Kill the reader thread.
6850 * posix-io.c (_gpgme_io_select): Handle frozen fds here.
6851 * 32-io.c (_gpgme_io_select): Ditto. Removed a bunch of unused code.
6853 * wait.c: Reworked the whole thing.
6854 * rungpg.c (_gpgme_gpg_new): Init pid to -1.
6855 (_gpgme_gpg_release): Remove the process from the wait queue.
6857 2001-02-19 Werner Koch <wk@gnupg.org>
6859 * w32-io.c (_gpgme_io_set_close_notify): New.
6860 (_gpgme_io_close): Do the notification.
6862 * posix-io.c (_gpgme_io_select): Use a 1 sec timeout and not 200
6865 * wait.c (remove_process): Don't close the fd here.
6866 (do_select): Set the fd to -1 and remove the is_closed flag everywhere.
6867 (_gpgme_wait_on_condition): Remove the assert on the queue and
6868 break out if we could not find the queue. The whole thing should
6871 * posix-io.c (_gpgme_io_set_close_notify): New.
6872 (_gpgme_io_close): Do the notification.
6874 * rungpg.c (close_notify_handler): New.
6875 (_gpgme_gpg_new): Register a callback for the fd.
6876 (_gpgme_gpg_set_colon_line_handler): Ditto.
6879 2001-02-13 Werner Koch <wk@gnupg.org>
6881 * rungpg.c (struct reap_s): Replaced pid_t by int.
6883 * types.h: Add ulong typedef.
6885 * rungpg.c (do_reaping,_gpgme_gpg_housecleaning): New.
6886 (_gpgme_gpg_release): Reap children.
6887 * io.h, posix-io.c (_gpgme_io_kill): New.
6888 * w32-io.c (_gpgme_io_kill): New (dummy).
6890 * keylist.c (gpgme_op_keylist_start): Cancel a pending request.
6892 * posix-io.c (_gpgme_io_read): Add some debug output.
6893 (_gpgme_io_write): Ditto.
6894 (_gpgme_io_select): Increased the timeout.
6896 2001-02-12 Werner Koch <wk@gnupg.org>
6898 Enhanced the signature verification, so that it can how handle
6899 more than one signature and is able to return more information on
6901 * verify.c (gpgme_get_sig_key): New.
6902 (gpgme_get_sig_status): New.
6904 * gpgme.h: Add stdio.h.
6905 (GpgmeSigStat): New status DIFF.
6907 2001-02-01 Werner Koch <wk@gnupg.org>
6909 * w32-io.c (set_synchronize): Add EVENT_MODIFY_STATE. Add Debug
6910 code to all Set/ResetEvent().
6912 * rungpg.c (read_status): Check for end of stream only if we have
6915 2001-01-31 Werner Koch <wk@gnupg.org>
6917 * wait.c (_gpgme_wait_on_condition): Removed all exit code processing.
6918 (propagate_term_results,clear_active_fds): Removed.
6919 (count_active_fds): Renamed to ..
6920 (count_active_and_thawed_fds): .. this and count only thawed fds.
6922 * rungpg.c (gpg_colon_line_handler): Return colon.eof and not
6925 2001-01-30 Werner Koch <wk@gnupg.org>
6927 * w32-io.c (_gpgme_io_spawn): Use the supplied path arg.
6929 * version.c (get_engine_info): Return better error information.
6931 * posix-util.c, w32-util.c: New.
6932 (_gpgme_get_gpg_path): New, suggested by Jan-Oliver.
6933 * rungpg.c (_gpgme_gpg_spawn): Use new function to get GPG's path.
6935 * signers.c (gpgme_signers_add): Ooops, one should test code and
6936 not just write it; the newarr was not assigned. Thanks to José
6937 for pointing this out. Hmmm, still not tested, why should a coder
6940 * w32-io.c: Does now use reader threads, so that we can use
6941 WaitForMultipleObjects.
6942 * sema.h, posix-sema.c, w32-sema.c: Support for Critcial sections.
6943 Does currently only work for W32.
6945 * debug.c, util.h : New. Changed all fprintfs to use this new
6946 set of debugging functions.
6948 2001-01-23 Werner Koch <wk@gnupg.org>
6950 * data.c (_gpgme_data_release_and_return_string): Fixed string
6953 2001-01-22 Werner Koch <wk@gnupg.org>
6958 * key.c (gpgme_key_ref, gpgme_key_unref): New.
6959 * sign.c (gpgme_op_sign_start): Allow the use of other keys.
6961 * version.c (gpgme_get_engine_info,gpgme_check_engine): New.
6962 * rungpg.c (_gpgme_gpg_set_simple_line_handler): New.
6964 2001-01-05 Werner Koch <wk@gnupg.org>
6966 * data.c (gpgme_data_rewind): Allow to rewind data_type_none.
6969 Copyright 2001,2002,2003,2004,2005,2006,2007,2008,2009 g10 Code GmbH
6971 This file is free software; as a special exception the author gives
6972 unlimited permission to copy and/or distribute it, with or without
6973 modifications, as long as this notice is preserved.
6975 This file is distributed in the hope that it will be useful, but
6976 WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
6977 implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.