1 2002-03-08 Werner Koch <wk@gnupg.org>
3 * util.h [!HAVE_FOPENCOOKIE]: Fixed type. Thanks to Frank Heckenbach.
5 2002-03-07 Werner Koch <wk@gnupg.org>
7 * gpgme.h (gpgme_op_keylist_ext_start): Add prototype.
9 2002-03-06 Marcus Brinkmann <marcus@g10code.de>
11 * encrypt.c (_gpgme_encrypt_sym_status_handler): New function.
12 (gpgme_op_encrypt_start): New variable SYMMETRIC, set it if RECP
13 is null, and if it is set, use _gpgme_encrypt_sym_status_handler
14 as status handler and run _gpgme_passphrase_start.
15 * rungpg.c (_gpgme_gpg_op_encrypt): If RECP is zero, do symmetric
17 * engine-gpgsm.c (_gpgme_gpgsm_op_encrypt): If RECP is zero,
20 * rungpg.c (_gpgme_gpg_op_verify): Add "--" argument.
22 2002-03-03 Marcus Brinkmann <marcus@g10code.de>
24 * passphrase.c (_gpgme_passphrase_status_handler): Also set the
25 error No_Passphrase if only a bad passphrase was provided.
27 2002-03-03 Marcus Brinkmann <marcus@g10code.de>
29 * rungpg.c (_gpgme_gpg_op_verify): If TEXT is of mode
30 GPGME_DATA_MODE_IN, construct a command line that stores the
32 * verify.c (gpgme_op_verify_start): Accept TEXT being
33 uninitialized, and in this case interpret SIG as a normal or
34 cleartext signature and TEXT as a return data object.
35 * engine-gpgsm.c (_gpgme_gpgsm_op_verify): Likewise.
37 2002-03-03 Marcus Brinkmann <marcus@g10code.de>
39 * engine-gpgsm.c (_gpgme_gpgsm_op_keylist_ext) [!ENABLE_GPGSM]:
42 2002-02-28 Werner Koch <wk@gnupg.org>
44 * key.h (subkey_s): New member expires_at.
45 * keylist.c (keylist_colon_handler): Set it here
46 * key.c (gpgme_key_get_as_xml,gpgme_key_get_ulong_attr): Return it.
48 2002-02-27 Marcus Brinkmann <marcus@g10code.de>
50 * rungpg.h (_gpgme_gpg_op_keylist_ext): New prototype.
51 * rungpg.c (_gpgme_gpg_op_keylist_ext): New function.
52 * engine-gpgsm.h (_gpgme_gpgsm_op_keylist_ext): New prototype.
53 * engine-gpgsm.c (_gpgme_gpgsm_op_keylist_ext): New function.
54 * engine.h (_gpgme_engine_op_keylist_ext): New prototype.
55 * engine.c (_gpgme_engine_op_keylist_ext): New function.
56 * keylist.c (gpgme_op_keylist_ext_start): New function.
58 2002-02-27 Marcus Brinkmann <marcus@g10code.de>
60 * gpgme.h: Add new error code GPGME_Invalid_Recipient.
61 * encrypt.c (struct encrypt_result_s): New member invalid_recipients,
62 rename no_recipients to no_valid_recipients.
63 (_gpgme_encrypt_status_handler): Include error for invalid
65 * engine-gpgsm.c (gpgsm_set_recipients): Change type of first
66 argument to GpgsmObject. Use that to report back the status about
69 2002-02-26 Marcus Brinkmann <marcus@g10code.de>
71 * verify.c (_gpgme_verify_status_handler): Fix the last change.
73 2002-02-25 Marcus Brinkmann <marcus@g10code.de>
75 * engine.c (_gpgme_engine_op_encrypt_sign): New function.
76 * engine.h (_gpgme_engine_op_encrypt_sign): New prototype.
77 * rungpg.c (_gpgme_append_gpg_args_from_signers): New function.
78 (_gpgme_gpg_op_sign): Use that new function.
79 (_gpgme_gpg_op_encrypt_sign): New function.
80 * rungpg.h (_gpgme_gpg_op_encrypt_sign): New prototype.
81 * gpgme.h (gpgme_op_encrypt_sign_start): New prototype.
82 (gpgme_op_encrypt_sign): Likewise.
83 * Makefile.am (libgpgme_la_SOURCES): Add encrypt-sign.c.
84 * ops.h (_gpgme_encrypt_status_handler): Add prototype.
85 (_gpgme_sign_status_handler): Add prototype.
86 * sign.c (sign_status_handler): Rename to ...
87 (_gpgme_sign_status_handler): ... this and make non-static.
88 * encrypt.c (encrypt_status_handler): Rename to ...
89 (_gpgme_encrypt_status_handler): ... this and make non-static.
90 * encrypt.c (gpgme_op_encrypt_start): Use new status handler name.
91 * sign.c (gpgme_op_sign_start): Likewise.
93 2002-02-25 Marcus Brinkmann <marcus@g10code.de>
95 * verify.c (_gpgme_verify_status_handler): Parse the args line to
96 see if the problem is due to a missing key, and report that back
99 2002-02-25 Marcus Brinkmann <marcus@g10code.de>
101 * context.h (struct gpgme_context_s): New member include_certs.
102 * gpgme.h (gpgme_set_include_certs): Add prototype.
103 (gpgme_get_include_certs): Likewise.
104 * gpgme.c (gpgme_set_include_certs): New function.
105 (gpgme_get_include_certs): Likewise.
106 (gpgme_new): Set include_certs to 1 (the default).
107 * engine.c (_gpgme_engine_op_sign): Accept new argument include_certs,
108 and pass it to _gpgme_gpgsm_op_sign.
109 * engine.h (_gpgme_engine_op_sign): Likewise for prototype.
110 * engine-gpgsm.c (_gpgme_gpgsm_op_sign): Accept new argument
111 include_certs and handle it.
112 * engine-gpgsm.h (_gpgme_gpgsm_start): Add new argument include_certs.
113 * sign.c (gpgme_op_sign_start): Add new argument to
114 _gpgme_engine_op_sign call.
116 2002-02-14 Werner Koch <wk@gnupg.org>
118 * keylist.c (gpgme_op_keylist_start): Do not use a verbose listing.
120 2002-02-13 Werner Koch <wk@gnupg.org>
122 * vasprintf.c, fopencookie.c: Add replacement functions.
123 * util.h: Add prototypes for them.
125 2002-02-09 Marcus Brinkmann <marcus@g10code.de>
127 * engine-gpgsm.c (gpgsm_assuan_simple_command): Return 0 if we
128 reach the end of the function.
130 2002-02-09 Marcus Brinkmann <marcus@g10code.de>
132 * genkey.c (gpgme_op_genkey_start): Fix logic in validity check.
133 (gpgme_op_genkey_start): Skip newlines after opening tag.
135 * engine-gpgsm.c (_gpgme_gpgsm_start): Remove cruft.
137 2002-02-08 Marcus Brinkmann <marcus@g10code.de>
139 * genkey.c (gpgme_op_genkey_start): Allow PUBKEY and SECKEY to be
140 set, and pass them down to the crypto engine.
141 * engine-gpgsm.h (_gpgme_gpgsm_start): New arguments PUBKEY and SECKEY.
142 * engine.h: Likewise.
143 * rungpg.h (_gpgme_gpg_spawn): Likewise.
144 * engine.c (_gpgme_engine_op_genkey): Likewise. Use those
146 * rungpg.c (_gpgme_gpg_op_genkey): Likewise. Complain if those
148 * engine-gpgsm.c (_gpgme_gpgsm_op_genkey): Likewise. Implement
151 * engine-gpgsm.c (_gpgme_gpgsm_op_keylist): Beautify comment.
153 2002-02-06 Marcus Brinkmann <marcus@g10code.de>
155 * rungpg.c (_gpgme_gpg_op_keylist): Remove handling of keylist
158 2002-02-06 Marcus Brinkmann <marcus@g10code.de>
160 * wait.c (gpgme_wait): Add new argument STATUS, in which the
161 status of the returned context is returned.
162 (_gpgme_wait_on_condition): Rework the function a bit, to make it
163 aware of cancelled processes, and to allow to use gpgme_wait with
164 CTX being NULL (as documented in the source).
165 (struct proc_s): New member REPORTED.
166 * gpgme.h: Fix prototype.
167 * verify.c (gpgme_op_verify): Fix use of gpgme_wait.
168 * sign.c (gpgme_op_sign): Likewise.
169 * import.c (gpgme_op_import): Likewise.
170 * genkey.c (gpgme_op_genkey): Likewise.
171 * export.c (gpgme_op_export): Likewise.
172 * encrypt.c (gpgme_op_encrypt): Likewise.
173 * delete.c (gpgme_op_delete): Likewise.
174 * decrypt-verify.c (gpgme_op_decrypt_verify): Likewise.
176 2002-02-06 Marcus Brinkmann <marcus@g10code.de>
178 * gpgme.c (gpgme_set_keylist_mode): Possibly return an error
180 (gpgme_get_keylist_mode): New function.
181 (gpgme_new): Set the default for keylist_mode member of CTX.
183 * gpgme.h (gpgme_set_keylist_mode): Fix prototype.
184 (gpgme_get_keylist_mode): New prototype.
185 (GPGME_KEYLIST_MODE_LOCAL): New macro.
186 (GPGME_KEYLIST_MODE_EXTERN): Likewise..
188 2002-02-02 Marcus Brinkmann <marcus@g10code.de>
190 This patch has gotten a bit large... mmh. The main thing that
191 happens here is that error values are now not determined in the
192 operation function after gpgme_wait completed, but in the status
193 handler when EOF is received. It should always be the case that
194 either an error is flagged or EOF is received, so that after a
195 gpgme_wait you should never have the situation that no error is
196 flagged and EOF is not received. One problem is that the engine
197 status handlers don't have access to the context, a horrible
198 kludge works around this for now. All errors that happen during a
199 pending operation should be catched and reported in ctx->error,
200 including out-of-core and cancellation. This rounds up neatly a
201 couple of loose ends, and makes it possible to pass up any errors
202 in the communication with the backend as well. As a bonus, there
203 will be a function to access gpgme->wait, so that the operations
204 can truly be implemented with their _start function.
206 * engine-gpgsm.c (gpgsm_status_handler): Horrible kludge to report
207 error back to the context.
208 * rungpg.c (gpg_status_handler): Same horrible kludge applied here.
210 * engine-gpgsm.c (gpgsm_assuan_simple_command): Add error checking.
212 * wait.c (_gpgme_wait_on_condition): If canceled, set CTX->error
213 to a value indication that.
215 * verify.c (add_notation): Set error, not out_of_core.
216 (finish_sig): Likewise.
217 (gpgme_op_verify_start): Don't clear out_of_core.
218 (_gpgme_verify_status_handler): At EOF, clean up the notation data.
219 (gpgme_op_verify): And don't do it here.
221 * trustlist.c (trustlist_status_handler): Check error, not out_of_core.
222 (gpgme_op_trustlist_start): Don't clear out_of_core.
223 (gpgme_op_trustlist_next): Check error, not out_of_core.
224 (gpgme_op_trustlist_end): Likewise.
226 * ops.h (test_and_allocate_result): New macro.
227 (_gpgme_passphrase_result): Remove prototype.
228 * delete.c (gpgme_op_delete): Return error from context.
229 (delete_status_handler): Use macro test_and_allocate_result.
230 Perform error checking at EOF.
231 (gpgme_op_delete_start): Release result.
232 * passphrase.c (_gpgme_passphrase_status_handler): Use macro
233 test_and_allocate_result, and perform error checking here.
234 (_gpgme_passphrase_result): Function removed.
235 * sign.c (gpgme_op_sign_start): Do not set out_of_core to zero.
236 (gpgme_op_sign): Just return the error value from the context.
237 (sign_status_handler): Only progress if no error is set yet. If
238 we process an EOF, set the resulting error value (if any).
239 * decrypt.c (_gpgme_decrypt_result): Function removed.
240 (create_result_struct): Function removed.
241 (_gpgme_decrypt_status_handler): Use macro test_and_allocate_result,
242 caclulate error on EOF, do not progress with errors.
243 (_gpgme_decrypt_start): Do not set out_of_core to zero.
244 (gpgme_op_decrypt): Just return the error value from the context.
245 * encrypt.c (encrypt_status_handler): Perform the error checking
247 (gpgme_op_encrypt_start): Do not clear out_of_core.
248 * export.c (export_status_handler): Return if error is set in context.
249 (gpgme_op_export_start): Release result.
250 (gpgme_op_export): Return error from context.
251 * decrypt-verify.c (gpgme_op_decrypt_verify): Return the error in
253 * genkey.c (genkey_status_handler): Use macro
254 test_and_allocate_result. Perform error checking at EOF.
255 (gpgme_op_genkey): Just return the error from context.
256 * import.c (gpgme_op_import): Return the error from context.
257 (import_status_handler): Use macro test_and_allocate_result.
258 * keylist.c (gpgme_op_keylist_start): Do not clear out_of_core.
259 (gpgme_op_keylist_next): Return error of context.
260 (keylist_colon_handler): Set error instead out_of_code.
261 (finish_key): Likewise.
263 * context.h: Remove member out_of_core, add member error.
264 * gpgme.c (_gpgme_release_result): Clear error flag.
266 * engine.h (_gpgme_engine_get_error): New prototype.
267 * engine.c (_gpgme_engine_get_error): New function.
268 * engine-gpgsm.c (_gpgme_gpgsm_get_error): New function.
270 * engine-gpgsm.c (map_assuan_error): New function.
271 (gpgsm_assuan_simple_command): Change return type to GpgmeError,
272 use the new function to map error values.
273 (gpgsm_set_fd): Change return type tp GpgmeError.
274 (_gpgme_gpgsm_op_decrypt): Change type of ERR to GpgmeError.
275 (gpgsm_set_recipients): Likewise. Change type of return value
276 equivalently. Adjust error values.
277 (_gpgme_gpgsm_op_import): Likewise.
278 (_gpgme_gpgsm_op_sign): Likewise.
279 (struct gpgsm_object_s): New member error.
280 (gpgsm_status_handler): Set error if error occurs. Determine
281 error number from ERR line received. If assuan_read_line fails,
282 terminate the connection.
284 2002-02-01 Marcus Brinkmann <marcus@g10code.de>
286 * Makefile.am (MOSTLYCLEANFILES): New variable.
288 2002-02-01 Marcus Brinkmann <marcus@g10code.de>
290 * engine-gpgsm.c (gpgsm_status_handler): At error, terminate the
291 connection to the server.
293 2002-01-31 Marcus Brinkmann <marcus@g10code.de>
295 * rungpg.h: Add STATUS_KEY_CREATED.
297 * progress.c: New file.
298 * Makefile.am (libgpgme_la_SOURCES): Add progress.c.
300 * genkey.c (genkey_status_handler): Use
301 _gpgme_progress_status_handler. Add check for status.
302 (struct genkey_result_s): New structure.
303 (_gpgme_release_genkey_result): New function.
304 (gpgme_op_genkey): Check for error.
305 * gpgme.c (_gpgme_release_result): Call
306 _gpgme_release_genkey_result.
307 * ops.h (_gpgme_release_genkey_result): Add prototype.
308 * types.h (GenKeyResult): New type.
309 * context.h (gpgme_context_s): Add GenKeyResult to member result.
311 2002-01-30 Marcus Brinkmann <marcus@g10code.de>
313 * gpgme.c (_gpgme_release_result): Call
314 _gpgme_release_delete_result.
315 * ops.h (_gpgme_release_delete_result): Add prototype.
316 * types.h (DeleteResult): New type.
317 * context.h (gpgme_context_s): Add DeleteResult to member result.
319 * delete.c (enum delete_problem): New type.
320 (struct delete_result_s): New structure.
321 (_gpgme_release_delete_result): New function.
322 (delete_status_handler): Implement more status codes.
323 (gpgme_op_delete): Return error on failure.
325 * import.c (MAX_IMPORTED_FIELDS): Bump up to 14.
327 2002-01-30 Marcus Brinkmann <marcus@g10code.de>
329 * import.c (struct import_result_s): New structure.
330 (_gpgme_release_import_result): New function.
331 (append_xml_impinfo): Likewise.
332 (import_status_handler): Implement.
333 * gpgme.c (_gpgme_release_result): Add call to
334 _gpgme_release_import_result.
335 * ops.h (_gpgme_release_import_result): Add prototype.
336 * types.h (ImportResult): New type.
337 * context.h (gpgme_context_s): Add ImportResult to member result.
339 * encrypt.c (gpgme_op_encrypt): Code clean up.
341 2002-01-30 Marcus Brinkmann <marcus@g10code.de>
343 * gpgme.h: Add lots of comment and fix the formatting. Add
344 gpgme_trustlist_end prototype.
346 2002-01-29 Marcus Brinkmann <marcus@g10code.de>
348 * gpgme.h: Add new type GpgmeIdleFunc. Change type of
349 gpgme_register_idle to return and accept this type.
350 * wait.c (gpgme_register_idle): Fix type.
351 Save and return old value of idle_function.
353 2002-01-29 Werner Koch <wk@gnupg.org>
355 * engine-gpgsm.c (_gpgme_gpgsm_op_keylist): Implement secret only mode.
357 * keylist.c (keylist_colon_handler): Add support for the new "crs"
360 2002-01-22 Marcus Brinkmann <marcus@g10code.de>
362 * engine-gpgsm.c (_gpgme_gpgsm_release): Call assuan_disconnect,
363 not assuan_pipe_disconnect.
365 * Makefile.am (libgpgme_la_LIBADD): Change to link assuan and
366 jnlib (needed by assuan) statically into libgpgme. Linking a
367 static library into a shared library this way is not portable.
369 2002-01-22 Marcus Brinkmann <marcus@g10code.de>
371 * gpgme.h (GpgmePassphraseCb): Change type of R_HD from void* to
374 2002-01-22 Marcus Brinkmann <marcus@g10code.de>
376 * data.c (gpgme_data_new_from_filepart): Change type of LENGTH
377 from off_t to size_t.
380 2002-01-22 Marcus Brinkmann <marcus@g10code.de>
382 * wait.c (_gpgme_wait_on_condition): If the process finished,
383 reset the pending flag. Also if the operation was cancelled.
385 (struct proc_s): Rename READY to DONE.
386 (wait_item_s): Likewise.
387 (set_process_ready): Rename to ...
388 (set_process_done): ... this.
389 (_gpgme_remove_proc_from_wait_queue): Call set_process_done
390 instead set_process_ready.
391 (_gpgme_wait_on_condition): Likewise.
392 (do_select): Rename READY to DONE.
394 * verify.c (gpgme_op_verify): Do not set pending to zero here.
395 * sign.c (gpgme_op_sign): Likewise.
396 * import.c (gpgme_op_import): Likewise.
397 * genkey.c (gpgme_op_genkey): Likewise.
398 * export.c (gpgme_op_export): Likewise.
399 * encrypt.c (gpgme_op_encrypt): Likewise.
400 * delete.c (gpgme_op_delete): Likewise.
401 * decrypt-verify.c (gpgme_op_decrypt_verify): Likewise.
402 * decrypt.c (gpgme_op_decrypt): Likewise.
404 2002-01-22 Marcus Brinkmann <marcus@g10code.de>
408 2002-01-15 Marcus Brinkmann <marcus@g10code.de>
410 * trustlist.c: Various source clean ups.
411 (my_isdigit): Removed.
412 (gpgme_op_trustlist_end): New function.
414 2002-01-13 Marcus Brinkmann <marcus@g10code.de>
416 * gpgme.c: Various source clean ups, like renaming C to CTX where
418 (gpgme_new): Clear R_CTX before starting the work.
419 (my_isdigit): Removed.
420 (my_isxdigit): Likewise.
422 * data.c: Various source clean ups.
423 (gpgme_data_new_from_mem): Check BUFFER after clearing R_DH.
424 (gpgme_data_new_with_read_cb): Similar for READ_CB.
425 (gpgme_data_new_from_file): Loop over fread while EINTR.
426 (gpgme_data_new_from_filepart): Rediddled a bit. Allow LENGTH to
427 be zero. Loop over fread while EINTR.
429 (my_isdigit): Removed.
430 (my_isxdigit): Likewise.
432 2001-12-21 Marcus Brinkmann <marcus@g10code.de>
434 * engine-gpgsm.c (_gpgme_gpgsm_new): Replace General_Error with
435 Pipe_Error where appropriate.
437 2001-12-19 Marcus Brinkmann <marcus@g10code.de>
439 * engine.c: Include `string.h'. Reported by Stéphane Corthésy.
441 * version.c (get_engine_info): Remove prototype.
443 2001-12-19 Marcus Brinkmann <marcus@g10code.de>
445 * engine-gpgsm.c (_gpgme_gpgsm_new): New variable CHILD_FDS.
446 Fill it with the servers fds, and pass it to assuan_pipe_connect.
448 2001-12-18 Marcus Brinkmann <marcus@g10code.de>
450 * keylist.c (gpgme_op_keylist_end): New function.
451 * gpgme.h (gpgme_op_keylist_end): New prototype.
453 * engine.h (gpgme_engine_check_version): Move prototype to ...
454 * gpgme.h (gpgme_engine_check_version): ... here.
456 * genkey.c (gpgme_op_genkey_start): Remove unused variable.
458 2001-12-18 Marcus Brinkmann <marcus@g10code.de>
460 * version.c (gpgme_get_engine_info): Reimplemented.
461 (gpgme_check_engine): Reimplemented.
462 (_gpgme_compare_versions): Return NULL if MY_VERSION is NULL.
464 * engine.c: Include `io.h'.
465 (gpgme_engine_get_info): New function.
466 * engine.h (gpgme_engine_check_version, _gpgme_engine_get_info):
469 2001-12-18 Marcus Brinkmann <marcus@g10code.de>
471 * rungpg.c (struct reap_s, reap_list, reap_list_lock): Moved to ...
472 * engine.c (struct reap_s, reap_list, reap_list_lock): ... here.
473 Include `time.h', `sys/types.h', `assert.h', and `sema.h'.
475 * rungpg.c (_gpgme_engine_add_child_to_reap_list): New function.
476 (do_reaping, _gpgme_gpg_housecleaning): Moved to ...
477 * engine.c (do_reaping, _gpgme_engine_housecleaning): ... here.
478 * rungpg.c (_gpgme_gpg_release): Replace code that is now in its
479 own function by call to _gpgme_engine_add_child_to_reap_list().
481 * wait.c: Include `engine.h'.
482 (run_idle): Call _gpgme_engine_housecleaning(), not
483 _gpgme_gpg_housecleaning().
485 2001-12-18 Marcus Brinkmann <marcus@g10code.de>
487 * key.c (_gpgme_key_append_name): Append, not prepend, the uid.
488 Initialize the next field of the uid structure.
489 (gpgme_key_get_as_xml): Do not list last uid first.
491 2001-12-17 Marcus Brinkmann <marcus@g10code.de>
493 * engine-gpgsm.c (_gpgme_gpgsm_set_colon_line_handler): New
494 function [!ENABLE_GPGSM].
496 2001-12-14 Marcus Brinkmann <marcus@g10code.de>
498 * engine-gpgsm.c (_gpgme_gpgsm_op_verify): Put TEXT into
499 message_data, not SIG.
500 (_gpgme_gpgsm_op_sign): Use `--detached', not `--detach'.
502 * sign.c (sign_status_handler): Call
503 _gpgme_passphrase_status_handler early.
505 2001-12-14 Marcus Brinkmann <marcus@g10code.de>
507 * engine-gpgsm.c: Revert last change.
509 2001-12-14 Marcus Brinkmann <marcus@g10code.de>
511 * engine-gpgsm.c (gpgsm_status_handler): Freeze the output file
512 handler when ending this operation, otherwise the wait function
515 2001-12-14 Marcus Brinkmann <marcus@g10code.de>
517 * engine-gpgsm.c (struct gpgsm_object_s): New member colon.attic.
518 (_gpgme_gpgsm_new): Initialize some more members.
519 (_gpgme_gpgsm_release): Free the colon line handler's attic line.
520 (gpgsm_status_handler): Rework the inline-data processing.
522 2001-12-13 Marcus Brinkmann <marcus@g10code.de>
524 * rungpg.c (_gpgme_gpg_spawn): Do not add the fds to the child
525 list that are not dup'ed, for those the close-on-exec flag is set
527 * version.c (_gpgme_get_program_version): Remove first entry in
528 CFD, as the close-on-exec flag is now set for this fd.
530 2001-12-13 Marcus Brinkmann <marcus@g10code.de>
532 * engine-gpgsm.c (_gpgme_gpgsm_op_encrypt): Do not add `armor'
534 * engine-gpgsm.c (gpgsm_set_recipients): Free LINE when returning
537 2001-12-13 Marcus Brinkmann <marcus@g10code.de>
539 * engine-gpgsm.c (close_notify_handler): New function.
540 (_gpgme_gpgsm_new): Manage the file descriptors a
541 bit differently. Do not set close-on-exec flags.
542 (_gpgme_gpgsm_op_decrypt): Do not set message_fd
543 to -1, this is done by the close handler.
544 (_gpgme_gpgsm_op_encrypt): Likewise.
545 (_gpgme_gpgsm_op_import): Likewise (also for output_fd).
546 (_gpgme_gpgsm_op_keylist): Likewise (also for input_fd and output_fd).
547 (_gpgme_gpgsm_op_sign): Likewise.
548 (_gpgme_gpgsm_op_verify): Likewise, but for output_fd.
550 * posix-io.c (_gpgme_io_pipe): Set the close-on-exec flag for the
551 non-inherited file descriptor index of the pipe.
553 2001-12-13 Werner Koch <wk@gnupg.org>
555 * engine-gpgsm.c (_gpgme_gpgsm_set_colon_line_handler): New.
556 (gpgsm_status_handler): Pass datalines to a colon handler
557 * engine.c (_gpgme_engine_set_colon_line_handler): Set the colon
560 * engine-gpgsm.c (_gpgme_gpgsm_op_keylist): Allow NULL for
562 (gpgsm_assuan_simple_command): Removed underscore from
564 (_gpgme_gpgsm_start): Ditto.
565 (gpgsm_assuan_simple_command): Replaced interal Assuan read
566 function by the new assuan_read_line. Removed the use of the
568 (gpgsm_status_handler): Ditto. Use the new assuan_pending_line.
569 (_gpgme_gpgsm_start): Use the documented way to get an fd from
572 * keylist.c (keylist_colon_handler): Handle "crt" records
573 * key.h (gpgme_key_s): Add an x509 flag.
574 * key.c (parse_x509_user_id): New.
575 (_gpgme_key_append_name): Handle x.509 names.
577 2001-12-05 Marcus Brinkmann <marcus@g10code.de>
579 * engine-gpgsm.c (gpgsm_status_handler): Make it work with current
582 2001-12-05 Marcus Brinkmann <marcus@g10code.de>
584 * engine-gpgsm.c (gpgsm_set_fd): Accept one more argument OPT.
585 (_gpgme_gpgsm_op_encrypt): Pass armor argument to gpgsm_set_fd for
587 (_gpgme_gpgsm_op_sign): Likewise.
589 2001-12-05 Marcus Brinkmann <marcus@g10code.de>
591 * keylist.c (gpgme_op_keylist_next): Set pending to 0 if EOF
594 2001-11-26 Marcus Brinkmann <marcus@g10code.de>
596 * engine-gpgsm.c (_gpgme_gpgsm_op_sign): Fix stupid typo.
598 2001-11-24 Marcus Brinkmann <marcus@g10code.de>
600 * engine-gpgsm.c (gpgsm_status_handler): Don't break if bsearch fails.
601 Deal with assuan read line returning more than one line (for now).
603 2001-11-23 Marcus Brinkmann <marcus@g10code.de>
605 * engine-gpgsm.c (_gpgme_gpgsm_op_sign): Implement it according to
606 the current protocol definition.
608 2001-11-23 Marcus Brinkmann <marcus@g10code.de>
610 * engine-gpgsm.c (_gpgme_gpgsm_new): Set CLOEXEC flag for parent
613 2001-11-22 Marcus Brinkmann <marcus@g10code.de>
615 * engine-gpgsm.c: Include stdlib.h and string.h. Also include,
616 for now, rungpg.h and status-table.h.
617 (gpgsm_status_handler): Implement more of the status handler.
619 2001-11-22 Marcus Brinkmann <marcus@g10code.de>
621 * engine.c (_gpgme_engine_op_decrypt): Implement CMS case.
622 (_gpgme_engine_op_delete): Likewise.
623 (_gpgme_engine_op_encrypt): Likewise.
624 (_gpgme_engine_op_export): Likewise.
625 (_gpgme_engine_op_genkey): Likewise.
626 (_gpgme_engine_op_keylist): Likewise.
627 (_gpgme_engine_op_sign): Likewise.
628 (_gpgme_engine_op_trustlist): Likewise.
630 * engine-gpgsm.c (_gpgme_gpgsm_op_encrypt): New function.
631 (gpgsm_assuan_simple_command): Likewise.
632 (gpgsm_set_recipients): Likewise.
633 (gpgsm_set_fd): Reimplement using gpgsm_assuan_simple_command.
634 (_gpgme_gpgsm_op_delete): New function.
635 (_gpgme_gpgsm_op_export): Likewise.
636 (_gpgme_gpgsm_op_genkey): Likewise.
637 (_gpgme_gpgsm_op_sign): Likewise.
638 (_gpgme_gpgsm_op_keylist): Likewise.
639 (_gpgme_gpgsm_op_trustlist): Likewise.
640 (_gpgme_gpgsm_release): Release command.
641 (_gpgme_gpgsm_op_decrypt): Allocate command.
642 (_gpgme_gpgsm_op_import): Likewise.
643 (gpgsm_status_handler): Also treat `ERR' strings as EOF.
645 2001-11-22 Marcus Brinkmann <marcus@g10code.de>
647 * gpgme.h (gpgme_set_protocol): New prototype.
649 2001-11-22 Marcus Brinkmann <marcus@g10code.de>
651 * engine-gpgsm.c (_gpgme_gpgsm_op_decrypt): New function.
652 (_gpgme_gpgsm_op_import): Likewise.
654 2001-11-22 Marcus Brinkmann <marcus@g10code.de>
656 * engine-gpgsm.c: Shuffle around header inclusion a bit, to still
658 (_gpgme_set_status_handler) [!ENABLE_GPGSM]: New function.
660 2001-11-22 Werner Koch <wk@gnupg.org>
662 * engine-gpgsm.c: Include more headers so that NULL and mk_error
663 is defined even with an undefined GPGSM_PATH.
665 2001-11-22 Marcus Brinkmann <marcus@g10code.de>
667 * rungpg.c (gpg_inbound_handler, write_mem_data, write_cb_data,
668 gpg_outbound_handler): Moved to ...
669 * data.c (_gpgme_data_inbound_handler, write_mem_data,
670 write_cb_data, _gpgme_data_outbound_handler): ... here. Make the
671 _gpgme_* ones non-static.
672 * data.c: Include io.h.
674 * ops.h (_gpgme_data_inbound_handler): New prototype.
675 (_gpgme_data_outbound_handler): Likewise.
676 (_gpgme_gpg_spawn): Use these new functions.
678 * engine-gpgsm.h (_gpgme_gpgsm_op_decrypt, _gpgme_gpgsm_op_delete,
679 _gpgme_gpgsm_op_encrypt, _gpgme_gpgsm_op_export,
680 _gpgme_gpgsm_op_genkey, _gpgme_gpgsm_op_import,
681 _gpgme_gpgsm_op_keylist, _gpgme_gpgsm_op_sign,
682 _gpgme_gpgsm_op_trustlist, _gpgme_gpgsm_op_verify,
683 _gpgme_gpgsm_start, _gpgme_gpgsm_set_status_handler): New prototype.
684 Include <rungpg.h> for status handler function.
686 * engine-gpgsm.c (struct gpgsm_object_s): New members input_fd,
687 input_data, output_fd, output_data, message_fd, message_data, command
689 (_gpgme_gpgsm_new): Open input, output and message pipes before
690 connecting to the client. Close server's ends afterwards.
691 (_gpgme_gpgsm_release): Close open file descriptors. Remove
692 server process from wait queue.
693 (_gpgme_gpgsm_op_verify, _gpgme_gpgsm_start,
694 _gpgme_gpgsm_set_status_handler, gpgms_status_handler): New function.
696 * engine.c (_gpgme_engine_start): Implement for GPGME_PROTOCOL_CMS.
697 (_gpgme_engine_set_status_handler): Likewise.
698 (_gpgme_engine_op_verify): Likewise.
700 2001-11-21 Marcus Brinkmann <marcus@g10code.de>
702 * context.h: Do not include rungpg.h, but engine.h.
703 (struct gpgme_context_s): Replace member gpg with engine.
704 * gpgme.c (gpgme_release): Release engine, not gpg.
706 * recipient.c (_gpgme_append_gpg_args_from_recifgpients): Function
708 * rungpg.c (_gpgme_append_gpg_args_from_recipients): ... here.
709 Make static, change order of arguments, and return an error value.
710 * ops.h (_gpgme_append_gpg_args_from_recipients): Removed prototype.
712 * rungpg.h (_gpgme_gpg_op_verify): Add prototype.
713 (_gpgme_gpg_op_encrypt): Likewise.
714 (_gpgme_gpg_op_decrypt): Likewise.
715 (_gpgme_gpg_op_delete): Likewise.
716 (_gpgme_gpg_op_export): Likewise.
717 (_gpgme_gpg_op_genkey): Likewise.
718 (_gpgme_gpg_op_import): Likewise.
719 (_gpgme_gpg_op_keylist): Likewise.
720 (_gpgme_gpg_op_sign): Likewise.
721 (_gpgme_gpg_op_trustlist): Likewise.
722 * rungpg.c (_gpgme_gpg_op_verify): New function.
723 (_gpgme_gpg_op_encrypt): Likewise.
724 (_gpgme_gpg_op_decrypt): Likewise.
725 (_gpgme_gpg_op_delete): Likewise.
726 (_gpgme_gpg_op_export): Likewise.
727 (_gpgme_gpg_op_genkey): Likewise.
728 (_gpgme_gpg_op_import): Likewise.
729 (_gpgme_gpg_op_keylist): Likewise.
730 (_gpgme_gpg_op_sign): Likewise.
731 (_gpgme_gpg_op_trustlist): Likewise.
733 * engine.h (_gpgme_engine_set_status_handler): Add prototype.
734 (_gpgme_engine_set_command_handler): Likewise.
735 (_gpgme_engine_set_colon_line_handler): Likewise.
736 (_gpgme_engine_op_decrypt): Likewise.
737 (_gpgme_engine_op_delete): Likewise.
738 (_gpgme_engine_op_encrypt): Likewise.
739 (_gpgme_engine_op_export): Likewise.
740 (_gpgme_engine_op_genkey): Likewise.
741 (_gpgme_engine_op_import): Likewise.
742 (_gpgme_engine_op_keylist): Likewise.
743 (_gpgme_engine_op_sign): Likewise.
744 (_gpgme_engine_op_trustlist): Likewise.
745 (_gpgme_engine_op_verify): Likewise.
746 (_gpgme_engine_start): Likewise.
747 * engine.c (_gpgme_engine_set_status_handler): New function.
748 (_gpgme_engine_set_command_handler): Likewise.
749 (_gpgme_engine_set_colon_line_handler): Likewise.
750 (_gpgme_engine_op_decrypt): Likewise.
751 (_gpgme_engine_op_delete): Likewise.
752 (_gpgme_engine_op_encrypt): Likewise.
753 (_gpgme_engine_op_export): Likewise.
754 (_gpgme_engine_op_genkey): Likewise.
755 (_gpgme_engine_op_import): Likewise.
756 (_gpgme_engine_op_keylist): Likewise.
757 (_gpgme_engine_op_sign): Likewise.
758 (_gpgme_engine_op_trustlist): Likewise.
759 (_gpgme_engine_op_verify): Likewise.
760 (_gpgme_engine_start): Likewise.
762 * verify.c (gpgme_op_verify_start): Reimplement in terms of above
764 * encrypt.c (gpgme_op_encrypt_start): Likewise.
765 * decrypt.c (_gpgme_decrypt_start): Likewise.
766 * passphrase.c (_gpgme_passphrase_start): Likewise.
767 * keylist.c (gpgme_op_keylist_start): Likewise.
769 2001-11-20 Marcus Brinkmann <marcus@g10code.de>
771 * types.h: Add types EngineObject and GpgsmObject.
773 * Makefile.am (libgpgme_la_SOURCES): Add engine-gpgsm.h,
774 engine-gpgsm.c, engine.h and engine.c.
775 * engine.h: New file.
776 * engine.c: Likewise.
777 * engine-gpgsm.h: Likewise.
778 * engine-gpgsm.c: Likewise.
780 * rungpg.c (_gpgme_gpg_get_version): New function.
781 (_gpgme_gpg_check_version): Likewise.
782 * rungpg.h: Add prototypes for _gpgme_gpg_get_version and
783 _gpgme_gpg_check_version.
785 * version.c (compare_versions): Rename to ...
786 (_gpgme_compare_versions): ... this. Make non-static.
787 (gpgme_check_version): Use _gpgme_compare_versions rather than
789 (gpgme_check_engine): Likewise.
790 * ops.h (_gpgme_get_program_version): Add prototype.
792 2001-11-20 Marcus Brinkmann <marcus@g10code.de>
794 * Makefile.am (libgpgme_la_INCLUDES): Remove obsolete directive.
795 (AM_CPPFLAGS): New directive [BUILD_ASSUAN].
796 (libgpgme_la_LIBADD): Likewise.
798 2001-11-20 Marcus Brinkmann <marcus@g10code.de>
800 * version.c: Remove global variables lineno and
802 (version_handler): Removed.
803 (_gpgme_get_program_version): New function.
804 (get_engine_info): Don't use context and version_handler,
805 but _gpgme_get_program_version.
806 * ops.h (_gpgme_get_program_version): Add prototype for
807 _gpgme_get_program_version (we expect to use it elsewhere soon).
809 2001-11-18 Marcus Brinkmann <marcus@g10code.de>
811 * version.c (get_engine_info): If GnuPG is not available, return
813 * posix-util.c (_gpgme_get_gpg_path): Allow GPG_PATH to be
815 (_gpgme_get_gpgsm_path): New function.
816 * w32-util.c (find_program_in_registry): New static function.
817 (_gpgme_get_gpg_path): Allow GPG_PATH to be undefined. Rework
818 to use find_program_in_registry.
819 (_gpgme_get_gpgsm_path): New function.
820 (util.h): Prototype _gpgme_get_gpgsm_path).
821 * rungpg.c (_gpgme_gpg_spawn): Verify that _gpgme_get_gpg_path()
824 2001-11-16 Marcus Brinkmann <marcus@g10code.de>
826 * decrypt-verify.c: New file.
827 * Makefile.am (libgpgme_la_SOURCES): Add decrypt-verify.c.
828 * types.h: Add decrypt-verify types.
830 * context.h: Add result type for decrypt-verify.
831 * gpgme.h: Add decrypt-verify prototypes.
833 * decrypt.c (decrypt_status_handler): Renamed to ...
834 (_gpgme_decrypt_status_handler): ... this. Make non-static.
835 (_gpgme_decrypt_start): New function, derived from
836 gpgme_op_decrypt_start.
837 (gpgme_op_decrypt_start): Reimplement in terms of
838 _gpgme_decrypt_start.
839 (_gpgme_decrypt_result): New function to retrieve error value.
840 (gpgme_op_decrypt): Use _gpgme_decrypt_result.
841 * ops.h: Add prototypes for new functions.
843 * verify.c (verify_status_handler): Renamed to ...
844 (_gpgme_verify_status_handler): ... this. Make non-static.
845 (gpgme_op_verify_start): Use new function name.
846 (intersect_stati): Renamed to ...
847 (_gpgme_intersect_stati): ... this. Make non-static.
848 (gpgme_op_verify): Use new name.
849 * ops.h: Add prototypes for new functions.
851 2001-11-16 Marcus Brinkmann <marcus@g10code.de>
853 * passphrase.c: New file.
854 * Makefile.am (libgpgme_la_SOURCES): Add passphrase.c.
855 * ops.h (_gpgme_passphrase_result): Add prototypes from
858 * context.h: Add member passphrase to result.
859 * gpgme.c (_gpgme_release_result): Release passphrase member.
861 * decrypt.c: Some formatting and variable name changes (like
863 (struct decrypt_result_s): Remove members now found in
865 (_gpgme_release_decrypt_result): Don't release removed members.
866 (decrypt_status_handler): Call _gpgme_passphrase_status_handler,
867 and don't handle the cases catched there.
868 (command_handler): Removed.
869 (gpgme_op_decrypt_start): Don't set command handler, but invoke
870 _gpgme_passphrase_start which does it.
871 (gpgme_op_decrypt): Invoke _gpgme_passphrase_result and drop the
874 * sign.c Some formatting and variable name changes (like
876 (struct sign_result_s): Remove members now found in
878 (_gpgme_release_sign_result): Don't release removed members.
879 (sign_status_handler): Call _gpgme_passphrase_status_handler,
880 and don't handle the cases catched there.
881 (command_handler): Removed.
882 (gpgme_op_sign_start): Don't set command handler, but invoke
883 _gpgme_passphrase_start which does it.
884 (gpgme_op_sign): Invoke _gpgme_passphrase_result and drop the
887 2001-11-15 Marcus Brinkmann <marcus@g10code.de>
889 * decrypt.c (command_handler): Fix last change.
891 2001-11-15 Marcus Brinkmann <marcus@g10code.de>
893 * verify.c (_gpgme_release_verify_result): Rename RES to RESULT.
894 Rename R2 to NEXT_RESULT.
895 (intersect_stati): Rename RES to RESULT.
896 (gpgme_get_sig_status): Likewise. Do not check return_type, but
897 the member verify of result.
898 (gpgme_get_sig_key): Likewise.
900 * sign.c (_gpgme_release_sign_result): Rename RES to RESULT. If
901 RESULT is zero, return.
902 (sign_status_handler, command_handler): Do not check return_type,
903 but the member sign of result.
904 (gpgme_op_sign): Likewise. Drop assertion.
906 * encrypt.c (_gpgme_release_encrypt_result): Rename RES to RESULT.
907 If RESULT is zero, return.
908 (encrypt_status_handler): Do not check return_type, but the member
910 (gpgme_op_encrypt): Likewise. Drop assertion.
912 * decrypt.c (_gpgme_release_decrypt_result): Rename RES to RESULT.
913 (create_result_struct): Do not set result_type.
914 (command_handler, decrypt_status_handler): Do not check
915 return_type, but the member decrypt of result.
916 (gpgme_op_decrypt): Likewise. Drop assertion.
918 * context.h (enum ResultType): Removed.
919 (struct gpgme_context_s): Remove member result_type.
920 (struct result): Replaces union result.
921 * gpgme.c: Include string.h.
922 (_gpgme_release_result): Release all members of c->result, which
923 is now a struct. Zero out all members of the struct afterwards.
925 2001-11-11 Marcus Brinkmann <marcus@g10code.de>
927 * rungpg.c (_gpgme_gpg_release): Release GPG->cmd.cb_data.
928 Release all members of the list GPG->arglist.
929 Reported by Michael Schmidt <mschmidt@cs.uni-sb.de>.
931 2001-11-02 Marcus Brinkmann <marcus@g10code.de>
933 * rungpg.c (pipemode_copy): Change type of NBYTES to size_t.
935 * key.c: Include string.h.
937 * recipient.c: Likewise.
939 2001-10-29 Marcus Brinkmann <marcus@g10code.de>
941 * context.h: New member signers_len.
942 * signers.c (gpgme_signers_clear): Require that signers are
943 non-NULL with assertion. Use signers_len to determine how much
944 keys to release. Add documentation.
945 (gpgme_signers_add): Use signers_len to determine if the buffer is
946 large enough. Use xtryrealloc rather than xtrymalloc and copying.
948 (gpgme_signers_enum): Use signers_len to determine if key is
949 available. Add documentation.
951 2001-10-22 Marcus Brinkmann <marcus@g10code.de>
953 * data.c (_gpgme_data_append): Check if LENGTH is smaller than
954 ALLOC_CHUNK, not DH->length.
956 2001-10-17 Marcus Brinkmann <marcus@g10code.de>
958 * gpgme.c (gpgme_set_protocol): Fix last change.
960 2001-10-15 Werner Koch <wk@gnupg.org>
962 * gpgme.h (GpgmeProtocol): New.
963 * gpgme.c (gpgme_set_protocol): New.
965 2001-09-26 Werner Koch <wk@gnupg.org>
967 * gpgme.c (gpgme_set_passphrase_cb): Ignore a NULL context.
968 (gpgme_set_progress_cb): Ditto. Suggested by Mark Mutz.
970 2001-09-17 Werner Koch <wk@gnupg.org>
972 * keylist.c (finish_key): Shortcut for no tmp_key. Changed all
973 callers to use this function without a check for tmp_key.
975 * keylist.c (gpgme_op_keylist_next): Reset the key_cond after
976 emptying the queue. Bug reported by Stéphane Corthésy.
978 2001-09-12 Werner Koch <wk@gnupg.org>
980 * data.c (gpgme_data_rewind): Allow rewind for callbacks.
982 2001-09-07 Werner Koch <wk@gnupg.org>
984 * rungpg.h: Add NO_RECP.
985 * encrypt.c (encrypt_status_handler): Take on No_RECP.
986 (gpgme_op_encrypt): Better error return.
988 * verify.c (verify_status_handler): Take on NODATA.
990 2001-09-03 Werner Koch <wk@gnupg.org>
992 * rungpg.h: Added STATUS_INV_RECP.
993 * gpgme.c (_gpgme_release_result): Add support for new
994 EncryptResult object.
995 * encrypt.c (append_xml_encinfo): New.
996 (encrypt_status_handler): Add some status parsing.
997 (_gpgme_release_encrypt_result): New.
999 2001-08-29 Werner Koch <wk@gnupg.org>
1001 * recipient.c (gpgme_recipients_release): Free the list. By Timo.
1003 * keylist.c (keylist_colon_handler): Do a finish key if we receive
1004 an EOF here. This is probably the reason for a lot of bugs
1005 related to keylisting. It is so obvious. Kudos to Enno Cramer
1006 for pointing that out.
1008 2001-08-28 Werner Koch <wk@gnupg.org>
1010 * gpgme.c, gpgme.h (gpgme_get_op_info): New.
1011 (_gpgme_set_op_info): New.
1012 (_gpgme_release_result): Reset the op_info here.
1013 * sign.c (append_xml_siginfo): New.
1014 (sign_status_handler): Store the sig create information.
1016 2001-07-31 Werner Koch <wk@gnupg.org>
1018 * encrypt.c (gpgme_op_encrypt): Hack to detect no valid recipients.
1020 2001-07-30 Werner Koch <wk@gnupg.org>
1022 * gpgme.c (gpgme_get_armor,gpgme_get_textmode): New.
1024 * rungpg.c (build_argv): Disable armor comments
1025 * w32-io.c (build_commandline): Need to add quotes here
1027 2001-07-24 Werner Koch <wk@gnupg.org>
1029 * data.c (gpgme_data_read): Add a a way to return the available bytes.
1031 2001-07-23 Werner Koch <wk@gnupg.org>
1033 * util.c: Removed stpcpy() because we use the version from jnlib.
1035 2001-07-19 Werner Koch <wk@gnupg.org>
1037 * mkstatus: Define the collating sequence for sort.
1039 2001-06-26 Werner Koch <wk@gnupg.org>
1041 * rungpg.h: Add STATUS_UNEXPECTED as suggested by Timo.
1043 2001-06-15 Werner Koch <wk@gnupg.org>
1045 * keylist.c (set_userid_flags): Fixed the assigned values. Kudos
1046 to Timo for pointing this out.
1048 2001-06-01 Werner Koch <wk@gnupg.org>
1050 * debug.c (_gpgme_debug_begin): Fixed a /tmp race. Noted by
1053 2001-05-28 Werner Koch <wk@gnupg.org>
1055 * version.c (gpgme_check_engine): Stop version number parsing at
1056 the opening angle and not the closing one. By Tommy Reynolds.
1058 2001-05-01 José Carlos García Sogo <jose@jaimedelamo.eu.org>
1060 * encrypt.c (gpgme_op_encrypt_start): Deleted the assert ( !c->gpg )
1061 line, because it gave an error if another operation had been made
1062 before using the same context.
1064 * decrypt.c (gpgme_op_decrypt_start): The same as above. Also added
1065 one line to release the gpg object in the context (if any).
1067 2001-04-26 Werner Koch <wk@gnupg.org>
1069 * key.c, key.h (_gpgme_key_cache_init): New.
1070 (_gpgme_key_cache_add): New.
1071 (_gpgme_key_cache_get): New.
1072 * version.c (do_subsystem_inits): Init the cache.
1073 * keylist.c (finish_key): Put key into the cache
1074 * verify.c (gpgme_get_sig_key): First look into the cache.
1076 2001-04-19 Werner Koch <wk@gnupg.org>
1078 * keylist.c (parse_timestamp): Adjusted for the changed
1079 --fixed-list-mode of gpg 1.0.4h.
1081 2001-04-05 Werner Koch <wk@gnupg.org>
1083 * verify.c (gpgme_op_verify_start): Enabled pipemode for detached sigs.
1085 2001-04-04 Werner Koch <wk@gnupg.org>
1087 * w32-io.c (_gpgme_io_select): Don't select on the writer if there
1088 are still bytes pending. Timo found this not easy to track down
1091 2001-04-02 Werner Koch <wk@gnupg.org>
1093 * gpgme.h: Add GPGME_ATTR_KEY_{EXPIRED,DISABLED}.
1094 * key.c (gpgme_key_get_ulong_attr): And return those attribs.
1096 * verify.c (gpgme_get_sig_key): Set keyliosting mode depending on
1097 the mode set in the current context. Suggested by Timo.
1099 * key.c (gpgme_key_get_ulong_attr): Return can_certify and not
1100 can_encrypt. By Timo.
1102 2001-03-30 Werner Koch <wk@gnupg.org>
1104 * debug.c (debug_init): Allow to specify a debug file.
1105 (_gpgme_debug_level): New.
1107 * posix-io.c (_gpgme_io_read, _gpgme_io_write): Print output.
1108 (_gpgme_io_select): Debug only with level > 2.
1110 2001-03-15 Werner Koch <wk@gnupg.org>
1112 * rungpg.c: Included time.h.
1114 * key.h: New keyflags for capabilities.
1115 * keylist.c (set_mainkey_capability, set_subkey_capability): New.
1116 (keylist_colon_handler): Parse them.
1117 * gpgme.h: New attribute values for capabilties.
1118 * key.c (gpgme_key_get_string_attr): Return them.
1119 (capabilities_to_string): New.
1120 (gpgme_key_get_ulong_attr): Return the global caps.
1122 2001-03-14 Werner Koch <wk@gnupg.org>
1124 * w32-io.c (destroy_reader,destroy_writer): Fixed syntax error.
1125 Thanks to Jan Oliver Wagner.
1127 2001-03-13 Werner Koch <wk@gnupg.org>
1129 * context.h: Add invalid and revoke flags to user_id structure.
1130 * keylist.c (gpgme_op_keylist_start): Use --fixed-list-mode.
1131 (keylist_colon_handler): Adjust for that.
1132 (set_userid_flags): New.
1133 (set_mainkey_trust_info): Handle new key invalid flag
1134 (set_subkey_trust_info): Ditto.
1135 * gpgme.h: Add new attributes for key and user ID flags.
1136 * key.c (_gpgme_key_append_name): Init these flags
1137 (gpgme_key_get_as_xml): Print them.
1138 (one_uid_as_xml): New helper for above.
1139 (gpgme_key_get_string_attr, gpgme_key_get_ulong_attr):
1140 Return the new attributes. Enhanced, so that subkey information
1141 can be returned now.
1143 2001-02-28 Werner Koch <wk@gnupg.org>
1145 * w32-io.c (destroy_reader): Set stop_me flag.
1146 (writer,create_writer,destroy_writer,find_writer,kill_writer): New.
1147 (_gpgme_io_write): Use a writer thread to avaoid blocking.
1148 (_gpgme_io_close): Cleanup a writer thread
1149 (_gpgme_io_select): Repalce tthe faked wait on writing by a real
1150 waiting which is now possible due to the use of a writer thread.
1152 2001-02-20 Werner Koch <wk@gnupg.org>
1154 * w32-io.c (destroy_reader,kill_reader): New.
1155 (create_reader, reader): Add a new event to stop the thread.
1156 (_gpgme_io_close): Kill the reader thread.
1158 * posix-io.c (_gpgme_io_select): Handle frozen fds here.
1159 * 32-io.c (_gpgme_io_select): Ditto. Removed a bunch of unused code.
1161 * wait.c: Reworked the whole thing.
1162 * rungpg.c (_gpgme_gpg_new): Init pid to -1.
1163 (_gpgme_gpg_release): Remove the process from the wait queue.
1165 2001-02-19 Werner Koch <wk@gnupg.org>
1167 * w32-io.c (_gpgme_io_set_close_notify): New.
1168 (_gpgme_io_close): Do the notification.
1170 * posix-io.c (_gpgme_io_select): Use a 1 sec timeout and not 200
1173 * wait.c (remove_process): Don't close the fd here.
1174 (do_select): Set the fd to -1 and remove the is_closed flag everywhere.
1175 (_gpgme_wait_on_condition): Remove the assert on the queue and
1176 break out if we could not find the queue. The whole thing should
1179 * posix-io.c (_gpgme_io_set_close_notify): New.
1180 (_gpgme_io_close): Do the notification.
1182 * rungpg.c (close_notify_handler): New.
1183 (_gpgme_gpg_new): Register a callback for the fd.
1184 (_gpgme_gpg_set_colon_line_handler): Ditto.
1187 2001-02-13 Werner Koch <wk@gnupg.org>
1189 * rungpg.c (struct reap_s): Replaced pid_t by int.
1191 * types.h: Add ulong typedef.
1193 * rungpg.c (do_reaping,_gpgme_gpg_housecleaning): New.
1194 (_gpgme_gpg_release): Reap children.
1195 * io.h, posix-io.c (_gpgme_io_kill): New.
1196 * w32-io.c (_gpgme_io_kill): New (dummy).
1198 * keylist.c (gpgme_op_keylist_start): Cancel a pending request.
1200 * posix-io.c (_gpgme_io_read): Add some debug output.
1201 (_gpgme_io_write): Ditto.
1202 (_gpgme_io_select): Increased the timeout.
1204 2001-02-12 Werner Koch <wk@gnupg.org>
1206 Enhanced the signature verification, so that it can how handle
1207 more than one signature and is able to return more information on
1209 * verify.c (gpgme_get_sig_key): New.
1210 (gpgme_get_sig_status): New.
1212 * gpgme.h: Add stdio.h.
1213 (GpgmeSigStat): New status DIFF.
1215 2001-02-01 Werner Koch <wk@gnupg.org>
1217 * w32-io.c (set_synchronize): Add EVENT_MODIFY_STATE. Add Debug
1218 code to all Set/ResetEvent().
1220 * rungpg.c (read_status): Check for end of stream only if we have
1223 2001-01-31 Werner Koch <wk@gnupg.org>
1225 * wait.c (_gpgme_wait_on_condition): Removed all exit code processing.
1226 (propagate_term_results,clear_active_fds): Removed.
1227 (count_active_fds): Renamed to ..
1228 (count_active_and_thawed_fds): .. this and count only thawed fds.
1230 * rungpg.c (gpg_colon_line_handler): Return colon.eof and not
1233 2001-01-30 Werner Koch <wk@gnupg.org>
1235 * w32-io.c (_gpgme_io_spawn): Use the supplied path arg.
1237 * version.c (get_engine_info): Return better error information.
1239 * posix-util.c, w32-util.c: New.
1240 (_gpgme_get_gpg_path): New, suggested by Jan-Oliver.
1241 * rungpg.c (_gpgme_gpg_spawn): Use new function to get GPG's path.
1243 * signers.c (gpgme_signers_add): Ooops, one should test code and
1244 not just write it; the newarr was not assigned. Thanks to José
1245 for pointing this out. Hmmm, still not tested, why shoudl a coder
1248 * w32-io.c: Does now use reader threads, so that we can use
1249 WaitForMultipleObjects.
1250 * sema.h, posix-sema.c, w32-sema.c: Support for Critcial sections.
1251 Does currently only work for W32.
1253 * debug.c, util.h : New. Changed all fprintfs to use this new
1254 set of debugging functions.
1256 2001-01-23 Werner Koch <wk@gnupg.org>
1258 * data.c (_gpgme_data_release_and_return_string): Fixed string
1261 2001-01-22 Werner Koch <wk@gnupg.org>
1266 * key.c (gpgme_key_ref, gpgme_key_unref): New.
1267 * sign.c (gpgme_op_sign_start): Allow the use of other keys.
1269 * version.c (gpgme_get_engine_info,gpgme_check_engine): New.
1270 * rungpg.c (_gpgme_gpg_set_simple_line_handler): New.
1272 2001-01-05 Werner Koch <wk@gnupg.org>
1274 * data.c (gpgme_data_rewind): Allow to rewind data_type_none.
1277 Copyright 2001, 2002 g10 Code GmbH
1279 This file is free software; as a special exception the author gives
1280 unlimited permission to copy and/or distribute it, with or without
1281 modifications, as long as this notice is preserved.
1283 This file is distributed in the hope that it will be useful, but
1284 WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
1285 implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.