Minor doc fixes
[gpgme.git] / gpgme / ChangeLog
1 2002-03-08  Werner Koch  <wk@gnupg.org>
2
3         * util.h [!HAVE_FOPENCOOKIE]: Fixed type.  Thanks to Frank Heckenbach.
4
5 2002-03-07  Werner Koch  <wk@gnupg.org>
6
7         * gpgme.h (gpgme_op_keylist_ext_start): Add prototype.
8
9 2002-03-06  Marcus Brinkmann  <marcus@g10code.de>
10
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
16         encryption.
17         * engine-gpgsm.c (_gpgme_gpgsm_op_encrypt): If RECP is zero,
18         return error value.
19
20         * rungpg.c (_gpgme_gpg_op_verify): Add "--" argument.
21
22 2002-03-03  Marcus Brinkmann  <marcus@g10code.de>
23
24         * passphrase.c (_gpgme_passphrase_status_handler): Also set the
25         error No_Passphrase if only a bad passphrase was provided.
26
27 2002-03-03  Marcus Brinkmann  <marcus@g10code.de>
28
29         * rungpg.c (_gpgme_gpg_op_verify): If TEXT is of mode
30         GPGME_DATA_MODE_IN, construct a command line that stores the
31         plaintext in TEXT.
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.
36
37 2002-03-03  Marcus Brinkmann  <marcus@g10code.de>
38
39         * engine-gpgsm.c (_gpgme_gpgsm_op_keylist_ext) [!ENABLE_GPGSM]:
40         Add stub function.
41
42 2002-02-28  Werner Koch  <wk@gnupg.org>
43
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.
47
48 2002-02-27  Marcus Brinkmann  <marcus@g10code.de>
49
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.
57
58 2002-02-27  Marcus Brinkmann  <marcus@g10code.de>
59
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
64         recipients.
65         * engine-gpgsm.c (gpgsm_set_recipients): Change type of first
66         argument to GpgsmObject.  Use that to report back the status about
67         the recipients.
68
69 2002-02-26  Marcus Brinkmann  <marcus@g10code.de>
70
71         * verify.c (_gpgme_verify_status_handler): Fix the last change.
72
73 2002-02-25  Marcus Brinkmann  <marcus@g10code.de>
74
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.
92         
93 2002-02-25  Marcus Brinkmann  <marcus@g10code.de>
94
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
97         to the user.
98
99 2002-02-25  Marcus Brinkmann  <marcus@g10code.de>
100
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.
115
116 2002-02-14  Werner Koch  <wk@gnupg.org>
117
118         * keylist.c (gpgme_op_keylist_start): Do not use a verbose listing.
119
120 2002-02-13  Werner Koch  <wk@gnupg.org>
121
122         * vasprintf.c, fopencookie.c: Add replacement functions.
123         * util.h: Add prototypes for them.
124
125 2002-02-09  Marcus Brinkmann  <marcus@g10code.de>
126
127         * engine-gpgsm.c (gpgsm_assuan_simple_command): Return 0 if we
128         reach the end of the function.
129
130 2002-02-09  Marcus Brinkmann  <marcus@g10code.de>
131
132         * genkey.c (gpgme_op_genkey_start): Fix logic in validity check.
133         (gpgme_op_genkey_start): Skip newlines after opening tag.
134
135         * engine-gpgsm.c (_gpgme_gpgsm_start): Remove cruft.
136
137 2002-02-08  Marcus Brinkmann  <marcus@g10code.de>
138
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
145         arguments.
146         * rungpg.c (_gpgme_gpg_op_genkey): Likewise.  Complain if those
147         arguments are set.
148         * engine-gpgsm.c (_gpgme_gpgsm_op_genkey): Likewise.  Implement
149         function.
150
151         * engine-gpgsm.c (_gpgme_gpgsm_op_keylist): Beautify comment.
152
153 2002-02-06  Marcus Brinkmann  <marcus@g10code.de>
154
155         * rungpg.c (_gpgme_gpg_op_keylist): Remove handling of keylist
156         mode (for now).
157
158 2002-02-06  Marcus Brinkmann  <marcus@g10code.de>
159
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.
175
176 2002-02-06  Marcus Brinkmann  <marcus@g10code.de>
177
178         * gpgme.c (gpgme_set_keylist_mode): Possibly return an error
179         value.
180         (gpgme_get_keylist_mode): New function.
181         (gpgme_new): Set the default for keylist_mode member of CTX.
182
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..
187
188 2002-02-02  Marcus Brinkmann  <marcus@g10code.de>
189
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.
205
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.
209
210         * engine-gpgsm.c (gpgsm_assuan_simple_command): Add error checking.
211
212         * wait.c (_gpgme_wait_on_condition): If canceled, set CTX->error
213         to a value indication that.
214
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.
220
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.
225
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
246         here.
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
252         the context.
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.
262
263         * context.h: Remove member out_of_core, add member error.
264         * gpgme.c (_gpgme_release_result): Clear error flag.
265
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.
269
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.
283
284 2002-02-01  Marcus Brinkmann  <marcus@g10code.de>
285
286         * Makefile.am (MOSTLYCLEANFILES): New variable.
287
288 2002-02-01  Marcus Brinkmann  <marcus@g10code.de>
289
290         * engine-gpgsm.c (gpgsm_status_handler): At error, terminate the
291         connection to the server.
292
293 2002-01-31  Marcus Brinkmann  <marcus@g10code.de>
294
295         * rungpg.h: Add STATUS_KEY_CREATED.
296
297         * progress.c: New file.
298         * Makefile.am (libgpgme_la_SOURCES): Add progress.c.
299
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.
310
311 2002-01-30  Marcus Brinkmann  <marcus@g10code.de>
312
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.
318
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.
324
325         * import.c (MAX_IMPORTED_FIELDS): Bump up to 14.
326
327 2002-01-30  Marcus Brinkmann  <marcus@g10code.de>
328
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.
338
339         * encrypt.c (gpgme_op_encrypt): Code clean up.
340
341 2002-01-30  Marcus Brinkmann  <marcus@g10code.de>
342
343         * gpgme.h: Add lots of comment and fix the formatting.  Add
344         gpgme_trustlist_end prototype.
345
346 2002-01-29  Marcus Brinkmann  <marcus@g10code.de>
347
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.
352
353 2002-01-29  Werner Koch  <wk@gnupg.org>
354
355         * engine-gpgsm.c (_gpgme_gpgsm_op_keylist): Implement secret only mode.
356
357         * keylist.c (keylist_colon_handler): Add support for the new "crs"
358         record type.
359
360 2002-01-22  Marcus Brinkmann  <marcus@g10code.de>
361
362         * engine-gpgsm.c (_gpgme_gpgsm_release): Call assuan_disconnect,
363         not assuan_pipe_disconnect.
364
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.
368
369 2002-01-22  Marcus Brinkmann  <marcus@g10code.de>
370
371         * gpgme.h (GpgmePassphraseCb): Change type of R_HD from void* to
372         void**.
373
374 2002-01-22  Marcus Brinkmann  <marcus@g10code.de>
375
376         * data.c (gpgme_data_new_from_filepart): Change type of LENGTH
377         from off_t to size_t.
378         * gpgme.h: Likewise.
379
380 2002-01-22  Marcus Brinkmann  <marcus@g10code.de>
381
382         * wait.c (_gpgme_wait_on_condition): If the process finished,
383         reset the pending flag.  Also if the operation was cancelled.
384
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.
393
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.
403
404 2002-01-22  Marcus Brinkmann  <marcus@g10code.de>
405
406         * export.c: Cleanup.
407
408 2002-01-15  Marcus Brinkmann  <marcus@g10code.de>
409
410         * trustlist.c: Various source clean ups.
411         (my_isdigit): Removed.
412         (gpgme_op_trustlist_end): New function.
413
414 2002-01-13  Marcus Brinkmann  <marcus@g10code.de>
415
416         * gpgme.c: Various source clean ups, like renaming C to CTX where
417         appropriate.
418         (gpgme_new): Clear R_CTX before starting the work.
419         (my_isdigit): Removed.
420         (my_isxdigit): Likewise.
421
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.
428
429         (my_isdigit): Removed.
430         (my_isxdigit): Likewise.
431
432 2001-12-21  Marcus Brinkmann  <marcus@g10code.de>
433
434         * engine-gpgsm.c (_gpgme_gpgsm_new): Replace General_Error with
435         Pipe_Error where appropriate.
436
437 2001-12-19  Marcus Brinkmann  <marcus@g10code.de>
438
439         * engine.c: Include `string.h'.  Reported by Stéphane Corthésy.
440
441         * version.c (get_engine_info): Remove prototype.
442
443 2001-12-19  Marcus Brinkmann  <marcus@g10code.de>
444
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.
447
448 2001-12-18  Marcus Brinkmann  <marcus@g10code.de>
449
450         * keylist.c (gpgme_op_keylist_end): New function.
451         * gpgme.h (gpgme_op_keylist_end): New prototype.
452
453         * engine.h (gpgme_engine_check_version): Move prototype to ...
454         * gpgme.h (gpgme_engine_check_version): ... here.
455
456         * genkey.c (gpgme_op_genkey_start): Remove unused variable.
457
458 2001-12-18  Marcus Brinkmann  <marcus@g10code.de>
459
460         * version.c (gpgme_get_engine_info): Reimplemented.
461         (gpgme_check_engine): Reimplemented.
462         (_gpgme_compare_versions): Return NULL if MY_VERSION is NULL.
463
464         * engine.c: Include `io.h'.
465         (gpgme_engine_get_info): New function.
466         * engine.h (gpgme_engine_check_version, _gpgme_engine_get_info):
467         Add prototype.
468
469 2001-12-18  Marcus Brinkmann  <marcus@g10code.de>
470
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'.
474
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().
480
481         * wait.c: Include `engine.h'.
482         (run_idle): Call _gpgme_engine_housecleaning(), not
483         _gpgme_gpg_housecleaning().
484         
485 2001-12-18  Marcus Brinkmann  <marcus@g10code.de>
486
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.
490
491 2001-12-17  Marcus Brinkmann  <marcus@g10code.de>
492
493         * engine-gpgsm.c (_gpgme_gpgsm_set_colon_line_handler): New
494         function [!ENABLE_GPGSM].
495
496 2001-12-14  Marcus Brinkmann  <marcus@g10code.de>
497
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'.
501
502         * sign.c (sign_status_handler): Call
503         _gpgme_passphrase_status_handler early.
504
505 2001-12-14  Marcus Brinkmann  <marcus@g10code.de>
506
507         * engine-gpgsm.c: Revert last change.
508
509 2001-12-14  Marcus Brinkmann  <marcus@g10code.de>
510
511         * engine-gpgsm.c (gpgsm_status_handler): Freeze the output file
512         handler when ending this operation, otherwise the wait function
513         will sit on it.
514
515 2001-12-14  Marcus Brinkmann  <marcus@g10code.de>
516
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.
521
522 2001-12-13  Marcus Brinkmann  <marcus@g10code.de>
523
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
526         now.
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.
529
530 2001-12-13  Marcus Brinkmann  <marcus@g10code.de>
531
532         * engine-gpgsm.c (_gpgme_gpgsm_op_encrypt): Do not add `armor'
533         option to `ENCRYPT'.
534         * engine-gpgsm.c (gpgsm_set_recipients): Free LINE when returning
535         successfully.
536
537 2001-12-13  Marcus Brinkmann  <marcus@g10code.de>
538
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.
549
550         * posix-io.c (_gpgme_io_pipe): Set the close-on-exec flag for the
551         non-inherited file descriptor index of the pipe.
552
553 2001-12-13  Werner Koch  <wk@gnupg.org>
554
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
558         handler for gpgsm.
559
560         * engine-gpgsm.c (_gpgme_gpgsm_op_keylist): Allow NULL for
561         pattern.
562         (gpgsm_assuan_simple_command): Removed underscore from
563         assuan_write_line.
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
567         internal header.
568         (gpgsm_status_handler): Ditto. Use the new assuan_pending_line.
569         (_gpgme_gpgsm_start): Use the documented way to get an fd from
570         assuan.
571
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.
576
577 2001-12-05  Marcus Brinkmann  <marcus@g10code.de>
578
579         * engine-gpgsm.c (gpgsm_status_handler): Make it work with current
580         version of assuan.
581
582 2001-12-05  Marcus Brinkmann  <marcus@g10code.de>
583
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
586         output descriptor.
587         (_gpgme_gpgsm_op_sign): Likewise.
588
589 2001-12-05  Marcus Brinkmann  <marcus@g10code.de>
590
591         * keylist.c (gpgme_op_keylist_next): Set pending to 0 if EOF
592         occurs.
593
594 2001-11-26  Marcus Brinkmann  <marcus@g10code.de>
595
596         * engine-gpgsm.c (_gpgme_gpgsm_op_sign): Fix stupid typo.
597
598 2001-11-24  Marcus Brinkmann  <marcus@g10code.de>
599
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).
602
603 2001-11-23  Marcus Brinkmann  <marcus@g10code.de>
604
605         * engine-gpgsm.c (_gpgme_gpgsm_op_sign): Implement it according to
606         the current protocol definition.
607
608 2001-11-23  Marcus Brinkmann  <marcus@g10code.de>
609
610         * engine-gpgsm.c (_gpgme_gpgsm_new): Set CLOEXEC flag for parent
611         ends of the pipe.
612
613 2001-11-22  Marcus Brinkmann  <marcus@g10code.de>
614
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.
618
619 2001-11-22  Marcus Brinkmann  <marcus@g10code.de>
620
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.
629
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.
644
645 2001-11-22  Marcus Brinkmann  <marcus@g10code.de>
646
647         * gpgme.h (gpgme_set_protocol): New prototype.
648
649 2001-11-22  Marcus Brinkmann  <marcus@g10code.de>
650
651         * engine-gpgsm.c (_gpgme_gpgsm_op_decrypt): New function.
652         (_gpgme_gpgsm_op_import): Likewise.
653
654 2001-11-22  Marcus Brinkmann  <marcus@g10code.de>
655
656         * engine-gpgsm.c: Shuffle around header inclusion a bit, to still
657         keep them seperate.
658         (_gpgme_set_status_handler) [!ENABLE_GPGSM]: New function.
659
660 2001-11-22  Werner Koch  <wk@gnupg.org>
661
662         * engine-gpgsm.c: Include more headers so that NULL and mk_error
663         is defined even with an undefined GPGSM_PATH.
664
665 2001-11-22  Marcus Brinkmann  <marcus@g10code.de>
666
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.
673
674         * ops.h (_gpgme_data_inbound_handler): New prototype.
675         (_gpgme_data_outbound_handler): Likewise.
676         (_gpgme_gpg_spawn): Use these new functions.
677
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.
685
686         * engine-gpgsm.c (struct gpgsm_object_s): New members input_fd,
687         input_data, output_fd, output_data, message_fd, message_data, command
688         and status.
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.
695         
696         * engine.c (_gpgme_engine_start): Implement for GPGME_PROTOCOL_CMS.
697         (_gpgme_engine_set_status_handler): Likewise.
698         (_gpgme_engine_op_verify): Likewise.
699
700 2001-11-21  Marcus Brinkmann  <marcus@g10code.de>
701
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.
705
706         * recipient.c (_gpgme_append_gpg_args_from_recifgpients): Function
707         moved ...
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.
711
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.
732
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.
761
762         * verify.c (gpgme_op_verify_start): Reimplement in terms of above
763         functions.
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.
768
769 2001-11-20  Marcus Brinkmann  <marcus@g10code.de>
770
771         * types.h: Add types EngineObject and GpgsmObject.
772
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.
779         
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.
784
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
788         compare_versions.
789         (gpgme_check_engine): Likewise.
790         * ops.h (_gpgme_get_program_version): Add prototype.
791
792 2001-11-20  Marcus Brinkmann  <marcus@g10code.de>
793
794         * Makefile.am (libgpgme_la_INCLUDES): Remove obsolete directive.
795         (AM_CPPFLAGS): New directive [BUILD_ASSUAN].
796         (libgpgme_la_LIBADD): Likewise.
797
798 2001-11-20  Marcus Brinkmann  <marcus@g10code.de>
799
800         * version.c: Remove global variables lineno and
801         tmp_engine_version.
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).
808
809 2001-11-18  Marcus Brinkmann  <marcus@g10code.de>
810
811         * version.c (get_engine_info): If GnuPG is not available, return
812         an error message.
813         * posix-util.c (_gpgme_get_gpg_path): Allow GPG_PATH to be
814         undefined.
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()
822         returns non-null.
823
824 2001-11-16  Marcus Brinkmann  <marcus@g10code.de>
825
826         * decrypt-verify.c: New file.
827         * Makefile.am (libgpgme_la_SOURCES): Add decrypt-verify.c.
828         * types.h: Add decrypt-verify types.
829         * ops.h: Likewise.
830         * context.h: Add result type for decrypt-verify.
831         * gpgme.h: Add decrypt-verify prototypes.
832
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.
842
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.
850
851 2001-11-16  Marcus Brinkmann  <marcus@g10code.de>
852
853         * passphrase.c: New file.
854         * Makefile.am (libgpgme_la_SOURCES): Add passphrase.c.
855         * ops.h (_gpgme_passphrase_result): Add prototypes from
856         passphrase.c.
857         * types.h: Likewise.
858         * context.h: Add member passphrase to result.
859         * gpgme.c (_gpgme_release_result): Release passphrase member.
860
861         * decrypt.c: Some formatting and variable name changes (like
862         CTX instead C).
863         (struct decrypt_result_s): Remove members now found in
864         passphrase result.
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
872         cases covered by it.
873
874         * sign.c Some formatting and variable name changes (like
875         CTX instead C).
876         (struct sign_result_s): Remove members now found in
877         passphrase result.
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
885         cases covered by it.
886
887 2001-11-15  Marcus Brinkmann  <marcus@g10code.de>
888
889         * decrypt.c (command_handler): Fix last change.
890
891 2001-11-15  Marcus Brinkmann  <marcus@g10code.de>
892
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.
899
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.
905
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
909         encrypt of result.
910         (gpgme_op_encrypt): Likewise.  Drop assertion.
911
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.
917
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.
924
925 2001-11-11  Marcus Brinkmann  <marcus@g10code.de>
926
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>.
930
931 2001-11-02  Marcus Brinkmann  <marcus@g10code.de>
932
933         * rungpg.c (pipemode_copy): Change type of NBYTES to size_t.
934
935         * key.c: Include string.h.
936         * data.c: Likewise.
937         * recipient.c: Likewise.
938
939 2001-10-29  Marcus Brinkmann  <marcus@g10code.de>
940
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.
947         Add documentation.
948         (gpgme_signers_enum): Use signers_len to determine if key is
949         available.  Add documentation.
950
951 2001-10-22  Marcus Brinkmann  <marcus@g10code.de>
952
953         * data.c (_gpgme_data_append): Check if LENGTH is smaller than
954         ALLOC_CHUNK, not DH->length.
955
956 2001-10-17  Marcus Brinkmann  <marcus@g10code.de>
957
958         * gpgme.c (gpgme_set_protocol): Fix last change.
959
960 2001-10-15  Werner Koch  <wk@gnupg.org>
961
962         * gpgme.h (GpgmeProtocol): New.
963         * gpgme.c (gpgme_set_protocol): New.
964
965 2001-09-26  Werner Koch  <wk@gnupg.org>
966
967         * gpgme.c (gpgme_set_passphrase_cb): Ignore a NULL context.
968         (gpgme_set_progress_cb): Ditto. Suggested by Mark Mutz.
969
970 2001-09-17  Werner Koch  <wk@gnupg.org>
971
972         * keylist.c (finish_key): Shortcut for no tmp_key.  Changed all
973         callers to use this function without a check for tmp_key.
974         
975         * keylist.c (gpgme_op_keylist_next): Reset the key_cond after
976         emptying the queue.  Bug reported by Stéphane Corthésy.
977
978 2001-09-12  Werner Koch  <wk@gnupg.org>
979
980         * data.c (gpgme_data_rewind): Allow rewind for callbacks.
981
982 2001-09-07  Werner Koch  <wk@gnupg.org>
983
984         * rungpg.h: Add NO_RECP.
985         * encrypt.c (encrypt_status_handler): Take on No_RECP.
986         (gpgme_op_encrypt): Better error return.
987
988         * verify.c (verify_status_handler): Take on NODATA.
989
990 2001-09-03  Werner Koch  <wk@gnupg.org>
991
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.
998
999 2001-08-29  Werner Koch  <wk@gnupg.org>
1000
1001         * recipient.c (gpgme_recipients_release): Free the list.  By Timo.
1002
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. 
1007
1008 2001-08-28  Werner Koch  <wk@gnupg.org>
1009
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.
1015
1016 2001-07-31  Werner Koch  <wk@gnupg.org>
1017
1018         * encrypt.c (gpgme_op_encrypt): Hack to detect no valid recipients.
1019
1020 2001-07-30  Werner Koch  <wk@gnupg.org>
1021
1022         * gpgme.c (gpgme_get_armor,gpgme_get_textmode): New.
1023
1024         * rungpg.c (build_argv): Disable armor comments
1025         * w32-io.c (build_commandline): Need to add quotes here
1026
1027 2001-07-24  Werner Koch  <wk@gnupg.org>
1028
1029         * data.c (gpgme_data_read): Add a a way to return the available bytes.
1030
1031 2001-07-23  Werner Koch  <wk@gnupg.org>
1032
1033         * util.c: Removed stpcpy() because we use the version from jnlib.
1034
1035 2001-07-19  Werner Koch  <wk@gnupg.org>
1036
1037         * mkstatus: Define the collating sequence for sort.
1038
1039 2001-06-26  Werner Koch  <wk@gnupg.org>
1040
1041         * rungpg.h: Add STATUS_UNEXPECTED as suggested by Timo.
1042
1043 2001-06-15  Werner Koch  <wk@gnupg.org>
1044
1045         * keylist.c (set_userid_flags): Fixed the assigned values. Kudos
1046         to Timo for pointing this out.
1047
1048 2001-06-01  Werner Koch  <wk@gnupg.org>
1049
1050         * debug.c (_gpgme_debug_begin): Fixed a /tmp race.  Noted by
1051         Johannes Poehlmann.
1052
1053 2001-05-28  Werner Koch  <wk@gnupg.org>
1054
1055         * version.c (gpgme_check_engine): Stop version number parsing at
1056         the opening angle and not the closing one.  By Tommy Reynolds.
1057
1058 2001-05-01  José Carlos García Sogo <jose@jaimedelamo.eu.org>
1059
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.
1063         
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).
1066         
1067 2001-04-26  Werner Koch  <wk@gnupg.org>
1068
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.
1075
1076 2001-04-19  Werner Koch  <wk@gnupg.org>
1077
1078         * keylist.c (parse_timestamp): Adjusted for the changed
1079         --fixed-list-mode of gpg 1.0.4h.
1080
1081 2001-04-05  Werner Koch  <wk@gnupg.org>
1082
1083         * verify.c (gpgme_op_verify_start): Enabled pipemode for detached sigs.
1084
1085 2001-04-04  Werner Koch  <wk@gnupg.org>
1086
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
1089         race condition. 
1090
1091 2001-04-02  Werner Koch  <wk@gnupg.org>
1092
1093         * gpgme.h: Add GPGME_ATTR_KEY_{EXPIRED,DISABLED}.
1094         * key.c (gpgme_key_get_ulong_attr): And return those attribs.
1095
1096         * verify.c (gpgme_get_sig_key): Set keyliosting mode depending on 
1097         the mode set in the current context.  Suggested by Timo.
1098
1099         * key.c (gpgme_key_get_ulong_attr): Return can_certify and not
1100         can_encrypt. By Timo.
1101
1102 2001-03-30  Werner Koch  <wk@gnupg.org>
1103
1104         * debug.c (debug_init): Allow to specify a debug file.
1105         (_gpgme_debug_level): New.
1106
1107         * posix-io.c (_gpgme_io_read, _gpgme_io_write): Print output.
1108         (_gpgme_io_select): Debug only with level > 2.
1109
1110 2001-03-15  Werner Koch  <wk@gnupg.org>
1111
1112         * rungpg.c: Included time.h.
1113
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.
1121
1122 2001-03-14  Werner Koch  <wk@gnupg.org>
1123
1124         * w32-io.c (destroy_reader,destroy_writer): Fixed syntax error. 
1125         Thanks to Jan Oliver Wagner.
1126
1127 2001-03-13  Werner Koch  <wk@gnupg.org>
1128
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.
1142
1143 2001-02-28  Werner Koch  <wk@gnupg.org>
1144
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.
1151
1152 2001-02-20  Werner Koch  <wk@gnupg.org>
1153
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.
1157
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.
1160
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.
1164
1165 2001-02-19  Werner Koch  <wk@gnupg.org>
1166
1167         * w32-io.c (_gpgme_io_set_close_notify): New.
1168         (_gpgme_io_close): Do the notification.
1169
1170         * posix-io.c (_gpgme_io_select): Use a 1 sec timeout and not 200
1171         microseconds.
1172
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
1177         be reworked.
1178
1179         * posix-io.c (_gpgme_io_set_close_notify): New.
1180         (_gpgme_io_close): Do the notification.
1181
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.
1185         (build_argv): Ditto
1186
1187 2001-02-13  Werner Koch  <wk@gnupg.org>
1188
1189         * rungpg.c (struct reap_s): Replaced pid_t by int.
1190
1191         * types.h: Add ulong typedef.
1192
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).
1197
1198         * keylist.c (gpgme_op_keylist_start): Cancel a pending request.
1199
1200         * posix-io.c (_gpgme_io_read): Add some debug output. 
1201         (_gpgme_io_write): Ditto.
1202         (_gpgme_io_select): Increased the timeout.
1203
1204 2001-02-12  Werner Koch  <wk@gnupg.org>
1205
1206         Enhanced the signature verification, so that it can how handle
1207         more than one signature and is able to return more information on 
1208         the signatures.
1209         * verify.c (gpgme_get_sig_key): New.
1210         (gpgme_get_sig_status): New.
1211
1212         * gpgme.h: Add stdio.h. 
1213         (GpgmeSigStat): New status DIFF.
1214
1215 2001-02-01  Werner Koch  <wk@gnupg.org>
1216
1217         * w32-io.c (set_synchronize): Add EVENT_MODIFY_STATE.  Add Debug
1218         code to all Set/ResetEvent().
1219
1220         * rungpg.c (read_status): Check for end of stream only if we have
1221         an r.  By Timo.
1222
1223 2001-01-31  Werner Koch  <wk@gnupg.org>
1224
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. 
1229
1230         * rungpg.c (gpg_colon_line_handler): Return colon.eof and not
1231         status.eof ;-)
1232
1233 2001-01-30  Werner Koch  <wk@gnupg.org>
1234
1235         * w32-io.c (_gpgme_io_spawn): Use the supplied path arg.
1236
1237         * version.c (get_engine_info): Return better error information.
1238
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.
1242
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
1246         test his fix :-)
1247
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.
1252
1253         * debug.c, util.h : New. Changed all fprintfs to use this new
1254         set of debugging functions.
1255
1256 2001-01-23  Werner Koch  <wk@gnupg.org>
1257
1258         * data.c (_gpgme_data_release_and_return_string): Fixed string
1259         termination.
1260
1261 2001-01-22  Werner Koch  <wk@gnupg.org>
1262
1263         * delete.c: New.
1264
1265         * signers.c: New.
1266         * key.c (gpgme_key_ref, gpgme_key_unref): New.
1267         * sign.c (gpgme_op_sign_start): Allow the use of other keys.
1268
1269         * version.c (gpgme_get_engine_info,gpgme_check_engine): New.
1270         * rungpg.c (_gpgme_gpg_set_simple_line_handler): New.
1271
1272 2001-01-05  Werner Koch  <wk@gnupg.org>
1273
1274         * data.c (gpgme_data_rewind): Allow to rewind data_type_none.
1275
1276
1277  Copyright 2001, 2002 g10 Code GmbH
1278
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.
1282
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.
1286