agent/
[gnupg.git] / sm / ChangeLog
blob63d90df3c79af81a7ea4729bb6b5a80ffd668023
1 2009-11-05  Marcus Brinkmann  <marcus@g10code.de>
3         * call-dirmngr.c (start_dirmngr_ext): Update use of
4         assuan_pipe_connect and assuan_socket_connect.
6 2009-11-04  Werner Koch  <wk@g10code.com>
8         * server.c (register_commands): Add help arg to
9         assuan_register_command.  Provide help strings for all commands.
11 2009-11-02  Marcus Brinkmann  <marcus@g10code.de>
13         * server.c (reset_notify, input_notify, output_notify): Update to
14         new assuan interface.
15         (register_commands): Use assuan_handler_t.
16         * call-agent.c (membuf_data_cb, default_inq_cb)
17         (inq_ciphertext_cb, scd_serialno_status_cb)
18         (scd_keypairinfo_status_cb, istrusted_status_cb)
19         (learn_status_cb, learn_cb, keyinfo_status_cb): Return gpg_error_t.
21 2009-10-16  Werner Koch  <wk@g10code.com>
23         * gpgsm.c (default_include_certs): Change to -2.
24         (DEFAULT_INCLUDE_CERTS): New.
25         (DEFAULT_CIPHER_ALGO): New.  Use instead of hardcoded "3DES".
27 2009-09-30  Werner Koch  <wk@g10code.com>
29         * gpgsm.c (main): Remove obsolete GCRYCTL_DISABLE_INTERNAL_LOCKING.
31 2009-09-23  Marcus Brinkmann  <marcus@g10code.de>
33         * gpgsm.c (main): Update to new assuan API.
34         * server.c: Include "gpgsm.h" before <assuan.h> due to check for
35         GPG_ERR_SOURCE_DEFAULT and assuan.h now including gpg-error.h.
36         (option_handler, cmd_recipient, cmd_signer, cmd_encrypt)
37         (cmd_decrypt, cmd_verify, cmd_sign, cmd_import, cmd_export)
38         (cmd_delkeys, cmd_message, cmd_listkeys, cmd_dumpkeys)
39         (cmd_listsecretkeys, cmd_dumpsecretkeys, cmd_genkey)
40         (cmd_getauditlog, cmd_getinfo): Return gpg_error_t instead of int.
41         (register_commands): Same for member HANDLER in table.
42         (gpgsm_server): Allocate assuan context before starting server.
43         * sm/call-dirmngr.c:
44         * call-dirmngr.c (prepare_dirmngr): Check for CTX and error before
45         setting LDAPSERVER.
46         (start_dirmngr_ext): Allocate assuan context before starting
47         server.
48         (inq_certificate, isvalid_status_cb, lookup_cb, lookup_status_cb)
49         (run_command_cb, run_command_inq_cb, run_command_status_cb):
50         Return gpg_error_t instead of int.
52 2009-08-06  Werner Koch  <wk@g10code.com>
54         * sign.c (gpgsm_sign): Print INV_SNDR for a bad default key.
56         * server.c (cmd_signer): Remove unneeded case for -1.  Send
57         INV_SGNR.  Use new map function.
58         (cmd_recipient): Use new map function.
59         * gpgsm.c (do_add_recipient): Use new map function for INV_RECP.
60         (main): Ditto.  Also send INV_SGNR.
62 2009-07-30  Werner Koch  <wk@g10code.com>
64         * call-agent.c (learn_cb): Do not store as ephemeral.
66 2009-07-29  Marcus Brinkmann  <marcus@g10code.com>
68         * keylist.c (print_capabilities): Print a trailing colon.
70 2009-07-23  Werner Koch  <wk@g10code.com>
72         * certchain.c (is_cert_still_valid): Emit AUDIT_CRL_CHECK.
74 2009-07-07  Werner Koch  <wk@g10code.com>
76         * server.c (command_has_option): New.
77         (cmd_getinfo): Add subcommand "cmd_has_option".
78         (cmd_import): Implement option --re-import.
79         * import.c (gpgsm_import): Add arg reimport_mode.
80         (reimport_one): New.
82         * gpgsm.h: Include session-env.h.
83         (opt): Add field SESSION_ENV.  Remove obsolete fields.
84         * server.c (option_handler): Rewrite setting of option fields.
85         Replace strdup by xtrystrdup.
86         * gpgsm.c (set_opt_session_env): New.
87         (main): Use it for oDisplay, oTTYname, oTTYtype and oXauthority.
88         * call-agent.c (start_agent): Adjust start_new_gpg_agent for
89         changed args.
90         * misc.c (setup_pinentry_env): Use new session_env stuff.
92 2009-07-02  Werner Koch  <wk@g10code.com>
94         * certreqgen-ui.c (gpgsm_gencertreq_tty): Allow using a key from a
95         card.
96         * call-agent.c (gpgsm_agent_scd_serialno)
97         (scd_serialno_status_cb, store_serialno): New.
98         (scd_keypairinfo_status_cb, gpgsm_agent_scd_keypairinfo): New.
100 2009-07-01  Werner Koch  <wk@g10code.com>
102         * certreqgen-ui.c (check_keygrip): New.
103         (gpgsm_gencertreq_tty): Allow using an existing key.
105         * gpgsm.c (open_es_fread): New.
106         (main) <aKeygen>: Implement --batch mode.
108 2009-06-24  Werner Koch  <wk@g10code.com>
110         * call-dirmngr.c (pattern_from_strlist): Remove dead assignment of N.
111         * sign.c (gpgsm_sign): Remove dead assignment.
112         * certreqgen.c (create_request): Assign GPG_ERR_BUG to RC.
113         Reported by Fabian Keil.
115 2009-05-27  Werner Koch  <wk@g10code.com>
117         * encrypt.c (encrypt_dek): Make use of make_canon_sexp.
119 2009-05-18  Werner Koch  <wk@g10code.com>
121         * server.c (option_handler): New option "no-encrypt-to".
122         (cmd_encrypt): Make use of it.
124         * gpgsm.c: Remove not implemented --verify-files.
126 2009-04-02  Werner Koch  <wk@g10code.com>
128         * keylist.c (list_cert_std): Print card serial number.
130 2009-04-01  Werner Koch  <wk@g10code.com>
132         * export.c (popen_protect_tool): Add command line option
133         --agent-program and pass flag bit 6.
134         * import.c (popen_protect_tool): Ditto.
136 2009-03-26  Werner Koch  <wk@g10code.com>
138         * gpgsm.c (main): s/def_digest_string/forced_digest_algo/ and
139         activate the --digest-algo option.
140         * gpgsm.h (struct opt): s/def_digest_algo/forced_digest_algo/.
141         * sign.c (gpgsm_sign): Implement --digest-algo.
143         * sign.c (MAX_DIGEST_LEN): Change to 64.
145         * call-agent.c (gpgsm_agent_marktrusted): Format the issuer name.
147 2009-03-25  Werner Koch  <wk@g10code.com>
149         * decrypt.c (gpgsm_decrypt): Print ENC_TO and NO_SECKEY stati.
150         Fixes bug#1020.
151         * fingerprint.c (gpgsm_get_short_fingerprint): Add arg R_HIGH and
152         change all callers.
154 2009-03-23  Werner Koch  <wk@g10code.com>
156         * delete.c (delete_one): Also delete ephemeral certificates if
157         specified uniquely.
159 2009-03-20  Werner Koch  <wk@g10code.com>
161         * keylist.c (list_internal_keys): Set released cert to NULL.
163         * call-agent.c (learn_status_cb): New.
164         (gpgsm_agent_learn): Use it.
165         (learn_cb): Send a progress for every certificate.
167 2009-03-18  Werner Koch  <wk@g10code.com>
169         * gpgsm.h (struct opt): Move field WITH_EPHEMERAL_KEYS to struct
170         server_control_s.
171         * gpgsm.c (main): Change accordingly.
172         * keylist.c (list_internal_keys): Ditto.
173         * server.c (option_handler): Add "with-ephemeral-keys".
175 2009-03-12  Werner Koch  <wk@g10code.com>
177         * certdump.c (gpgsm_dump_time): Remove.
178         * certdump.c, verify.c, certchain.c
179         * gpgsm.c: s/gpgsm_dump_time/dump_isotime/.
181 2009-03-06  Werner Koch  <wk@g10code.com>
183         * call-agent.c (gpgsm_agent_keyinfo, keyinfo_status_cb): New.
184         * keylist.c (list_cert_colon): Print card S/N.
186         * keylist.c (list_internal_keys): Always list ephemeral keys if
187         specified by keygrip or fingerprint.
188         (list_cert_raw): Always show ephemeral flag.
189         * export.c (gpgsm_export): Export ephemeral keys if specified by
190         keygrip.
192 2009-02-09  Werner Koch  <wk@g10code.com>
194         * gpgsm.c (main): Change default cipher back to 3DES.
196 2009-01-12  Werner Koch  <wk@g10code.com>
198         * keylist.c (print_utf8_extn_raw): Cast printf precision argument.
200 2009-01-08  Werner Koch  <wk@g10code.com>
202         * fingerprint.c (gpgsm_get_keygrip_hexstring): Add error detection.
204 2008-12-10  Werner Koch  <wk@g10code.com>
206         * gpgsm.c (our_cipher_test_algo): Use the GCRY constants as we now
207         require 1.4.
208         (our_md_test_algo): Ditto.  Add SHA224.
209         (main) <aGpgConfList>: Update default cipher algo.
211 2008-12-09  Werner Koch  <wk@g10code.com>
213         * gpgsm.c (main): Call i18n_init before init_common_subsystems.
215 2008-12-05  Werner Koch  <wk@g10code.com>
217         * certreqgen.c (create_request): Provide a custom prompt for the
218         signing.
220         * certdump.c (gpgsm_format_keydesc): Remove debug output.
221         (gpgsm_format_keydesc): Remove saving of errno as xfree is
222         supposed not to change it.  Use the new percent_plus_escape
223         function which also fixes the issue that we did not escaped a
224         percent in the past.
226 2008-11-18  Werner Koch  <wk@g10code.com>
228         * gpgsm.c (make_libversion): New.
229         (my_strusage): Use new function.
230         (build_lib_list): Remove.
232 2008-11-13  Werner Koch  <wk@g10code.com>
234         * gpgsm.c: Remove all unused options. Use ARGPARSE macros.
236 2008-10-28  Werner Koch  <wk@g10code.com>
238         * certdump.c (gpgsm_format_keydesc): Use xtryasprintf and xfree.
239         (gpgsm_es_print_name): Factor code out to ...
240         (gpgsm_es_print_name2): New function.
241         (gpgsm_format_name2, format_name_writer): Use estream so that it
242         works on all platforms.
243         (format_name_writer): Fix reallocation bug.
245 2008-10-23  Werner Koch  <wk@g10code.com>
247         * import.c (popen_protect_tool): Add arg CTRL and assure that the
248         agent is running.  Pass a value for CTRL from all caller.
249         * export.c (popen_protect_tool): Ditto.
251 2008-10-21  Werner Koch  <wk@g10code.com>
253         * call-dirmngr.c (inq_certificate_parm_s): Add field CTRL.
254         (gpgsm_dirmngr_isvalid): Supply a value for that field.
255         (inq_certificate): Add inquiry ISTRUSTED.
257         * call-agent.c (gpgsm_agent_istrusted): Add new optional arg
258         HEXFPR.  Changed all callers.
260 2008-10-20  Werner Koch  <wk@g10code.com>
262         * keydb.c (keydb_locate_writable): Mark unused arg.
263         (keydb_search_kid): Ditto.
264         (keydb_clear_some_cert_flags): Ditto.
265         * server.c (cmd_encrypt): Ditto.
266         (cmd_decrypt, cmd_verify, cmd_import, cmd_genkey): Ditto.
267         * call-agent.c (gpgsm_scd_pksign): Ditto.
268         * call-dirmngr.c (release_dirmngr, release_dirmngr2) 
269         (run_command_cb): Ditto.
270         * certlist.c (gpgsm_add_cert_to_certlist): Ditto.
271         * certchain.c (find_up_dirmngr): Ditto.
272         * keylist.c (print_key_data): Ditto.
273         (list_cert_raw, list_cert_std): Ditto.
274         * qualified.c (gpgsm_is_in_qualified_list): Ditto.
276         * gpgsm.c (set_binary) [!W32]: Mark unused arg.
278 2008-10-17  Werner Koch  <wk@g10code.com>
280         * call-dirmngr.c (start_dirmngr, start_dirmngr2): Reset the lock
281         flag on error.
282         (release_dirmngr, release_dirmngr2): Replace asserts by error messages.
283         (gpgsm_dirmngr_lookup): Replace assert by fatal error message.
285 2008-10-13  Werner Koch  <wk@g10code.com>
287         * gpgsm.c: Add alias --delete-keys.
289 2008-09-30  Werner Koch  <wk@g10code.com>
291         * server.c (cmd_getinfo): New subcommand agent-check.
292         * call-agent.c (gpgsm_agent_send_nop): New.
294 2008-09-29  Werner Koch  <wk@g10code.com>
296         * certcheck.c (MY_GCRY_PK_ECDSA): Remove.  Change users to
297         GCRY_PK_ECDSA.
298         * gpgsm.c (MY_GCRY_PK_ECDSA): Ditto.
299         * sign.c (MY_GCRY_MD_SHA224): Remove change users to GCRY_MD_SHA224.
301 2008-09-04  Werner Koch  <wk@g10code.com>
303         * certdump.c (gpgsm_format_keydesc): Work around a mingw32 bug.
305 2008-09-03  Werner Koch  <wk@g10code.com>
307         * sign.c (MY_GCRY_MD_SHA224): New, so that we don't need libgcrypt
308         1.2. 
310 2008-08-13  Werner Koch  <wk@g10code.com>
312         * keylist.c (list_cert_colon): Print 'f' for validated certs.
314 2008-08-08  Marcus Brinkmann  <marcus@g10code.de>
316         * gpgsm.h (struct server_control_s): Remove member dirmngr_seen.
317         * call-dirmngr.c (dirmngr2_ctx, dirmngr_ctx_locked)
318         (dirmngr2_ctx_locked): New global variables.
319         (prepare_dirmngr): Don't check dirmngr_seen anymore.
320         (start_dirmngr): Move bunch of code to ...
321         (start_dirmngr_ext): ... this new function.
322         (release_dirmngr, start_dirmngr2, release_dirmngr2): New
323         functions.
324         (gpgsm_dirmngr_isvalid): Call release_dirmngr.
325         (gpgsm_dirmngr_lookup): Call release_dirmngr.  If dirmngr_ctx is
326         locked, use dirmngr2_locked.
327         (gpgsm_dirmngr_run_command): Call release_dirmngr.
329 2008-06-25  Werner Koch  <wk@g10code.com>
331         * sign.c (gpgsm_sign): Revamp the hash algorithm selection.
332         * gpgsm.h (struct certlist_s): Add field HASH_ALGO and HASH_ALGO_OID.
334         * qualified.c (gpgsm_qualified_consent): Fix double free.
336         * gpgsm.c (main): Change default cipher algo to AES.
338         * keylist.c (print_utf8_extn_raw, print_utf8_extn): New.
339         (list_cert_raw, list_cert_std): Print the TeleSec restriction
340         extension.
342 2008-06-23  Werner Koch  <wk@g10code.com>
344         * encrypt.c (encode_session_key): Replace xmalloc by xtrymalloc.
345         Use bin2hex instead of open coding the conversion.
346         (encrypt_dek): Init S_DATA.
348 2008-06-13  Marcus Brinkmann  <marcus@ulysses.g10code.com>
350         * call-dirmngr.c (prepare_dirmngr): Fix error code to ignore.
352 2008-06-12  Marcus Brinkmann  <marcus@g10code.de>
354         * gpgsm.h (struct keyserver_spec): New struct.
355         (opt): Add member keyserver.
356         * gpgsm.c (keyserver_list_free, parse_keyserver_line): New functions.
357         (main): Implement --keyserver option.
358         * call-dirmngr.c (prepare_dirmngr): Send LDAPSERVER commands.
360 2008-05-20  Werner Koch  <wk@g10code.com>
362         * gpgsm.c (main) <aExportSecretKeyP12>: Pass FP and not stdout to
363         the export function.  Reported by Marc Mutz.
365 2008-05-06  Werner Koch  <wk@g10code.com>
367         * keylist.c (list_external_keys): Ignore NOT FOUND error code.
368         This is bug#907.
370 2008-04-23  Werner Koch  <wk@g10code.com>
372         * certchain.c (find_up): Make correct C89 code.  Declare variable
373         at the top of the block.  Reported by Alain Guibert.
375 2008-04-09  Werner Koch  <wk@g10code.com>
377         * verify.c (gpgsm_verify): Print the message hash values on error.
379 2008-03-31  Werner Koch  <wk@g10code.com>
381         * call-dirmngr.c (start_dirmngr): Use log_info instead of
382         log_error when falling back to start dirmngr.
384 2008-03-20  Werner Koch  <wk@g10code.com>
386         * certlist.c (gpgsm_add_to_certlist): Always save the first
387         subject and issuer.  Initialize issuer with issuer and not with
388         subject.
389         (same_subject_issuer): Set issuer2 to issuer and not to subject.
391 2008-03-17  Werner Koch  <wk@g10code.com>
393         * certdump.c (my_funopen_hook_size_t): New.
394         (format_name_writer): Use it.
396 2008-03-13  Werner Koch  <wk@g10code.com>
398         * certdump.c (gpgsm_fpr_and_name_for_status): Fix signed/unsigned
399         char issue.
400         (gpgsm_format_keydesc): Remove superfluous test.  Add expire date
401         to the prompt.
403 2008-02-18  Werner Koch  <wk@g10code.com>
405         * certchain.c (gpgsm_is_root_cert): Factor code out to ...
406         (is_root_cert): New.  Extend test for self-issued certificates
407         signed by other CAs.
408         (do_validate_chain, gpgsm_basic_cert_check)
409         (gpgsm_walk_cert_chain): Use it here.
411         * gpgsm.c: Add option --no-common-certs-import.
412         
413         * certchain.c (find_up_dirmngr, find_up, do_validate_chain)
414         (check_cert_policy): Be more silent with --quiet.
416         * gpgsm.c: Add option --disable-dirmngr.
417         * gpgsm.h (opt): Add field DISABLE_DIRMNGR.
418         * call-dirmngr.c (start_dirmngr): Implement option.
420 2008-02-14  Werner Koch  <wk@g10code.com>
422         * server.c (option_handler): Add option allow-pinentry-notify.
423         (gpgsm_proxy_pinentry_notify): New.
424         * call-agent.c (default_inq_cb): New.
425         (gpgsm_agent_pksign, gpgsm_scd_pksign, gpgsm_agent_readkey) 
426         (gpgsm_agent_istrusted, gpgsm_agent_marktrusted) 
427         (gpgsm_agent_passwd, gpgsm_agent_get_confirmation): Call it.
428         (struct cipher_parm_s, struct genkey_parm_s): Add field CTRL.
429         (inq_ciphertext_cb): Test keyword and fallback to default_inq_cb.
430         (inq_genkey_parms): Ditto.
431         (start_agent): Tell agent to send us the pinentry notifications.
433 2008-02-13  Werner Koch  <wk@g10code.com>
435         * call-dirmngr.c (gpgsm_dirmngr_lookup): Add arg CACHE_ONLY.
436         * keylist.c (list_external_keys): Pass false for new arg.
437         * certchain.c (find_up_dirmngr): New.
438         (find_up): Also try to read from the dirmngr cache.
439         (find_up, find_up_external, gpgsm_walk_cert_chain)
440         (gpgsm_basic_cert_check, allowed_ca): Add arg CTRL and changed all
441         callers.
442         * call-agent.c (struct learn_parm_s): Add field CTRL.
443         (gpgsm_agent_learn): Set it.
445 2008-02-11  Werner Koch  <wk@g10code.com>
447         * server.c (cmd_getinfo): New.
448         (gpgsm_server): Register GETINFO.
450 2008-01-29  Marcus Brinkmann  <marcus@g10code.de>
452         * keylist.c (list_internal_keys): New variable lastcert.  Use it
453         to suppress duplicates which immediately follow each other.
455 2008-01-27  Werner Koch  <wk@g10code.com>
457         * import.c (popen_protect_tool): Set bit 7 in the flags for
458         gnupg_spawn_process so that under W32 no window appears.
459         * export.c (popen_protect_tool): Ditto.
461 2007-12-13  Werner Koch  <wk@g10code.com>
463         * gpgsm.c (main): Add option --extra-digest-algo.
464         * gpgsm.h (struct): Add EXTRA_DIGEST_ALGO.
465         * verify.c (gpgsm_verify): Use it.  Use the hash algorithm from
466         the signature value.
468 2007-12-11  Werner Koch  <wk@g10code.com>
470         * certchain.c (do_validate_chain): Log AUDIT_ROOT_TRUSTED.
472         * server.c (cmd_sign, cmd_decrypt, cmd_encrypt): Start audit log.
473         (cmd_recipient): Start audit session.
475         * gpgsm.c (main): Revamp creation of the audit log.
477         * gpgsm.h (struct server_control_s): Add AGENT_SEEN and DIRMNGR_SEEN.
478         * call-agent.c (start_agent): Record an audit event.
479         * call-dirmngr.c (start_dirmngr): Ditto. Add new arg CTRL and pass
480         it from all callers.
481         (prepare_dirmngr): New helper for start_dirmngr.
483         * encrypt.c (gpgsm_encrypt): Add calls to audit_log.
485 2007-12-03  Werner Koch  <wk@g10code.com>
487         * gpgsm.c (main): Call gnupg_reopen_std.
489 h2007-11-22  Werner Koch  <wk@g10code.com>
491         * server.c (cmd_getauditlog): New.
492         (register_commands): Register GETAUDITLOG.
494 2007-11-19  Werner Koch  <wk@g10code.com>
496         * server.c (cmd_recipient, cmd_signer): Add error reason 11.
498         * gpgsm.c (main): Print a warning if --audit-log is used.
500 2007-11-15  Werner Koch  <wk@g10code.com>
502         * gpgsm.h (struct): Add XAUTHORITY and PINENTRY_USER_DATA.
503         * misc.c (setup_pinentry_env): Add XAUTHORITY and PINENTRY_USER_DATA.
504         * gpgsm.c (main): New option --xauthority.
505         * call-agent.c (start_agent): Adjust for changed start_new_gpg_agent.
506         * server.c (option_handler): Ad the new options.
508 2007-11-07  Werner Koch  <wk@g10code.com>
510         * gpgsm.c (main): New option --audit-log.
511         * server.c (option_handler): New option enable-audit-log.
512         (start_audit_session): New.
513         (cmd_verify): Create audit context.
514         (gpgsm_server): Release the context.
516         * gpgsm.h (struct server_control_s): Add member AUDIT, include
517         audit.h.
518         * certdump.c (gpgsm_format_sn_issuer): New.
519         * verify.c (hash_data): Return an error code.
520         (gpgsm_verify): Add calls to audit_log.
522         * gpgsm.c (get_status_string): Remove.
523         * gpgsm.h: Include status.h instead of errors.h.
524         
525 2007-10-19  Werner Koch  <wk@g10code.com>
527         * qualified.c (gpgsm_qualified_consent): Use i18N-swicth functions.
528         (gpgsm_not_qualified_warning): Ditto.
529         * certdump.c (gpgsm_format_keydesc): Ditto.
531 2007-09-14  Werner Koch  <wk@g10code.com>
533         * gpgsm.c (build_lib_list): New.
534         (my_strusage): Print lib info.
536 2007-08-24  Werner Koch  <wk@g10code.com>
538         * Makefile.am (common_libs): Swap libkeybox and jnlib. 
540 2007-08-23  Werner Koch  <wk@g10code.com>
542         * certlist.c (gpgsm_certs_identical_p): New.
543         (gpgsm_add_to_certlist): Ignore duplicate certificates in
544         ambigious name detection.
545         (gpgsm_find_cert): Ditto.
546         * export.c (gpgsm_p12_export): Ditto.
548 2007-08-22  Werner Koch  <wk@g10code.com>
550         * certreqgen.c (create_request): Replace open coding by bin2hex.
552         * certreqgen-ui.c (gpgsm_gencertreq_tty): Use es_fopenmem.
554 2007-08-21  Werner Koch  <wk@g10code.com>
556         * import.c (parse_p12): Use gnupg_tmpfile.
557         * export.c (export_p12): Ditto.
558         
559 2007-08-20  Werner Koch  <wk@g10code.com>
561         * certreqgen.c (read_parameters): Change FP to an estream_t.
562         (gpgsm_genkey): Replace in_fd and in_stream by a estream_t.
563         * server.c (cmd_genkey): Adjust for that.
564         * certreqgen-ui.c (gpgsm_gencertreq_tty): Use es_open_memstream
565         instead of a temporary file.
567 2007-08-14  Werner Koch  <wk@g10code.com>
569         * call-dirmngr.c (start_dirmngr): Use dirmngr_socket_name.  change
570         the way infostr is xstrdupped.
572         * gpgsm.c (main) [W32]: Make --prefer-system-dirmngr a dummy under
573         Windows.
575 2007-08-13  Werner Koch  <wk@g10code.com>
577         * gpgsm.c (do_add_recipient): Add RECP_REQUIRED and make error
578         message depend on that.
579         (main): Add avriable RECP_REQUIRED, set ift for encryption
580         commands and pass it to do_add_recipient.
581         (our_pk_test_algo, our_cipher_test_algo, our_md_test_algo): Implement.
583 2007-08-09  Werner Koch  <wk@g10code.com>
585         * gpgsm.c (main) [W32]: Enable CRL check by default.
586         (main): Update the default control structure after reading the
587         options.
588         (gpgsm_parse_validation_model, parse_validation_model): New.
589         (main): New option --validation-model.
590         * certchain.c (gpgsm_validate_chain): Implement this option.
591         * server.c (option_handler): Ditto.
593         * certchain.c (is_cert_still_valid): Reformatted.  Add arg
594         FORCE_OCSP.  Changed callers to set this flag when using the chain
595         model.
597 2007-08-08  Werner Koch  <wk@g10code.com>
599         * certdump.c (gpgsm_print_serial): Fixed brown paper bag style bugs
600         which prefixed the output with a 3A and cut it off at a 00.
602         * keylist.c (list_cert_raw): Print the certificate ID first and
603         rename "Serial number" to "S/N".
604         (list_cert_std): Ditto.
606 2007-08-07  Werner Koch  <wk@g10code.com>
608         * gpgsm.c (main): Allow a string for --faked-system-time.
610 2007-08-06  Werner Koch  <wk@g10code.com>
612         Implementation of the chain model.
613         
614         * gpgsm.h (struct rootca_flags_s): Define new members VALID and
615         CHAIN_MODEL.
616         * call-agent.c (gpgsm_agent_istrusted): Mark ROOTCA_FLAGS valid.
617         (istrusted_status_cb): Set CHAIN_MODEL.
618         * certchain.c (gpgsm_validate_chain): Replace LM alias by LISTMODE
619         and FP by LISTFP.
620         (gpgsm_validate_chain): Factor some code out to ...
621         (check_validity_period, ask_marktrusted): .. new.
622         (check_validity_cm_basic, check_validity_cm_main): New.
623         (do_validate_chain): New with all code from gpgsm_validate_chain.
624         New arg ROOTCA_FLAGS.
625         (gpgsm_validate_chain): Provide ROOTCA_FLAGS and fallback to chain
626         model.  Add RETFLAGS arg and changed all callers to pass NULL. Add
627         CHECKTIME arg and changed all callers to pass a nil value.
628         (has_validity_model_chain): New.
629         * verify.c (gpgsm_verify): Check for chain model and return as
630         part of the trust status.
632         * gpgsm.h (VALIDATE_FLAG_NO_DIRMNGR): New.
633         (VALIDATE_FLAG_NO_DIRMNGR): New.
634         * call-dirmngr.c (gpgsm_dirmngr_isvalid): Use constant here.
636 2007-08-03  Werner Koch  <wk@g10code.com>
638         * keylist.c (list_cert_colon): Avoid duplicate listing of kludge
639         uids.
641         * verify.c (gpgsm_verify): Make STATUS_VERIFY return the hash and
642         pk algo.
643         * certcheck.c (gpgsm_check_cms_signature): Add arg R_PKALGO.
645 2007-08-02  Werner Koch  <wk@g10code.com>
647         * gpgsm.c (main): Factored GC_OPT_FLAGS out to gc-opt-flags.h.
649 2007-07-17  Werner Koch  <wk@g10code.com>
651         * gpgsm.c (main): Implement --default-key.
652         (main) <gpgconf-list>: Declare --default-key and --encrypt-to.
654 2007-07-16  Werner Koch  <wk@g10code.com>
656         * server.c (cmd_message): Use gnupg_fd_t to avoid dependecy on
657         newer assuan versions.
659 2007-07-12  Werner Koch  <wk@g10code.com>
661         * gpgsm.c (check_special_filename): Use translate_sys2libc_fd_int
662         when passing an int value.
663         * server.c (cmd_encrypt, cmd_decrypt, cmd_verify, cmd_import)
664         (cmd_export, cmd_message, cmd_genkey):  Translate file descriptors.
665         
666 2007-07-05  Werner Koch  <wk@g10code.com>
668         * Makefile.am (common_libs): Changed order of libs.
670 2007-07-04  Werner Koch  <wk@g10code.com>
672         * certchain.c (check_cert_policy): Remove extra checks for
673         GPG_ERR_NO_VALUE.  They are not needed since libksba 1.0.1.
674         * keylist.c (print_capabilities, list_cert_raw, list_cert_std): Ditto.
675         * certlist.c (cert_usage_p, cert_usage_p): Ditto.
677 2007-06-26  Werner Koch  <wk@g10code.com>
679         * gpgsm.c (main): Call gnupg_rl_initialize.
680         * Makefile.am (gpgsm_LDADD): Add LIBREADLINE and libgpgrl.a.
682 2007-06-25  Werner Koch  <wk@g10code.com>
684         * gpgsm.c (check_special_filename): Use translate_sys2libc_fd and
685         add new arg FOR_WRITE.  Change callers to pass new arg.
687 2007-06-24  Werner Koch  <wk@g10code.com>
689         * gpgsm.c (open_es_fwrite): Avoid the dup by using the new
690         es_fdopen_nc().  
692 2007-06-21  Werner Koch  <wk@g10code.com>
694         * certreqgen-ui.c: New.
695         * gpgsm.c (main): Let --gen-key call it.
696         * certreqgen.c (gpgsm_genkey): Add optional IN_STREAM arg and
697         adjusted caller.
699         * gpgsm.h (ctrl_t): Remove.  It is now declared in ../common/util.h.
701         * call-agent.c (start_agent): Factored almost all code out to
702         ../common/asshelp.c.
704 2007-06-20  Werner Koch  <wk@g10code.com>
706         * call-agent.c (start_agent) [W32]: Start the agent on the fly.
708 2007-06-18  Marcus Brinkmann  <marcus@g10code.de>
710         * gpgsm.c (main): Percent escape output of --gpgconf-list.
712 2007-06-14  Werner Koch  <wk@g10code.com>
714         * call-agent.c (start_agent): Use gnupg_module_name.
715         * call-dirmngr.c (start_dirmngr): Ditto.
716         * export.c (export_p12): Ditto.
717         * import.c (parse_p12): Ditto.
718         * gpgsm.c (run_protect_tool): Ditto.
720 2007-06-12  Werner Koch  <wk@g10code.com>
722         * gpgsm.c (main): Replace some calls by init_common_subsystems.
723         (main): Use gnupg_datadir.
724         * qualified.c (read_list): Use gnupg-datadir.
726 2007-06-11  Werner Koch  <wk@g10code.com>
728         * Makefile.am (common_libs): Use libcommaonstd macr.
730         * gpgsm.c (main) [W32]: Call pth_init.
732 2007-06-06  Werner Koch  <wk@g10code.com>
734         * qualified.c (gpgsm_not_qualified_warning) [!ENABLE_NLS]: Do not
735         define orig_codeset.
736         * certdump.c (gpgsm_format_keydesc) [!ENABLE_NLS]: Do not define
737         orig_codeset.
738         (format_name_writer): Define only if funopen et al is available.
740         * gpgsm.c (i18n_init): Remove.
742 2007-05-29  Werner Koch  <wk@g10code.com>
744         * export.c (gpgsm_p12_export): Print passphrase encoding info only
745         in PEM mode.
747 2007-05-18  Marcus Brinkmann  <marcus@g10code.de>
749         * qualified.c (gpgsm_qualified_consent,
750         gpgsm_not_qualified_warning): Free ORIG_CODESET on error.
751         * certdump.c (gpgsm_format_keydesc): Likewise.
753 2007-05-07  Werner Koch  <wk@g10code.com>
755         * certcheck.c (MY_GCRY_PK_ECDSA): New.
757 2007-04-20  Werner Koch  <wk@g10code.com>
759         * gpgsm.c (main): Parameterize failed versions check messages.
761 2007-04-19  Werner Koch  <wk@g10code.com>
763         * certcheck.c (do_encode_md): Add arg PKEY.  Add support for DSA2
764         and all ECDSA sizes.
765         (get_dsa_qbits): New.
766         (pk_algo_from_sexp): A key will never contain ecdsa as algorithm,
767         so remove that.
769 2007-04-18  Werner Koch  <wk@g10code.com>
771         * certcheck.c (do_encode_md): Support 160 bit ECDSA.
773 2007-04-13  Werner Koch  <wk@g10code.com>
775         * call-agent.c (start_agent): Don't use log_error when using the
776         fallback hack to start the agent.  This is bug 782.
778 2007-03-20  Werner Koch  <wk@g10code.com>
780         * fingerprint.c (gpgsm_get_fingerprint): Add caching.
781         (gpgsm_get_fingerprint_string): Use bin2hexcolon().
782         (gpgsm_get_fingerprint_hexstring): Use bin2hex and allocate only
783         as much memory as required.
784         (gpgsm_get_keygrip_hexstring): Use bin2hex.
786         * certchain.c (gpgsm_validate_chain): Keep track of the
787         certificate chain and reset the ephemeral flags.
788         * keydb.c (keydb_set_cert_flags): New args EPHEMERAL and MASK.
789         Changed caller to use a mask of ~0.  Return a proper error code if
790         the certificate is not available.
792         * gpgsm.c: Add option --p12-charset.
793         * gpgsm.h (struct opt): Add p12_charset. 
794         * export.c (popen_protect_tool): Use new option.
796 2007-03-19  Werner Koch  <wk@g10code.com>
798         Changes to let export and key listing use estream to help systems
799         without funopen.
800         
801         * keylist.c: Use estream in place of stdio functions.
802         * gpgsm.c (open_es_fwrite): New.
803         (main): Use it for the list commands.
804         * server.c (data_line_cookie_functions): New.
805         (data_line_cookie_write, data_line_cookie_close): New.
806         (do_listkeys): Use estream.
808         * certdump.c (gpgsm_print_serial): Changed to use estream.
809         (gpgsm_print_time): Ditto.
810         (pretty_es_print_sexp): New.
811         (gpgsm_es_print_name): New.
812         (print_dn_part): New arg STREAM.  Changed all callers.
813         (print_dn_parts): Ditto.
814         * certchain.c (gpgsm_validate_chain): Changed FP to type
815         estream_t.
816         (do_list, unknown_criticals, allowed_ca, check_cert_policy) 
817         (is_cert_still_valid): Ditto.
819         * export.c (gpgsm_export): New arg STREAM.
820         (do_putc, do_fputs): New.
821         (print_short_info): Allow printing to optional STREAM.
822         * server.c (cmd_export): Use stream.
823         * base64.c (do_putc, do_fputs): New.
824         (base64_writer_cb, base64_finish_write): Let them cope with an
825         alternate output function.
826         (plain_writer_cb): New.
827         (gpgsm_create_writer): New arg STREAM and call plain_writer_cb for
828         binary output to an estream.  Changed call callers.
830 2007-01-31  Werner Koch  <wk@g10code.com>
832         * gpgsm.c (main): Let --gen-key print a more informative error
833         message.
835 2007-01-25  Werner Koch  <wk@g10code.com>
837         * Makefile.am (gpgsm_LDADD): Add LIBICONV.  Noted by Billy Halsey.
839 2007-01-05  Werner Koch  <wk@g10code.com>
841         * certchain.c (unknown_criticals): Add subjectAltName.
843 2006-12-21  Werner Koch  <wk@g10code.com>
845         * gpgsm.c: Comment mtrace feature.
847 2006-12-21  Marcus Brinkmann  <marcus@g10code.de>
849         * certchain.c (gpgsm_basic_cert_check): Release SUBJECT.
851         * encrypt.c (encrypt_dek): Release S_CIPH.
853 2006-12-20  Marcus Brinkmann  <marcus@g10code.de>
855         * server.c (gpgsm_server): Release CTRL->server_local.
857         * base64.c: Add new members READER and WRITER in union U2.
858         (gpgsm_create_reader): Initialise CTX->u2.reader.
859         (gpgsm_destroy_reader): Invoke ksba_reader_release.  Return early
860         if CTX is NULL.
861         (gpgsm_create_writer): Initialise CTX->u2.writer.
862         (gpgsm_destroy_writer): Invoke ksba_writer_release.  Return early
863         if CTX is NULL.
865 2006-12-18  Marcus Brinkmann  <marcus@g10code.de>
867         * fingerprint.c (gpgsm_get_fingerprint): Close MD.
869 2006-11-24  Werner Koch  <wk@g10code.com>
871         * certdump.c (parse_dn_part): Take '#' as a special character only
872         at the beginning of a string.
874 2006-11-21  Werner Koch  <wk@g10code.com>
876         * certdump.c (my_funopen_hook_ret_t): New.
877         (format_name_writer): Use it for the return value.
879 2006-11-14  Werner Koch  <wk@g10code.com>
881         * server.c (skip_options): Skip leading spaces.
882         (has_option): Honor "--".
883         (cmd_export): Add option --data to do an inline export.  Skip all
884         options.
886         * certdump.c (gpgsm_fpr_and_name_for_status): New.
887         * verify.c (gpgsm_verify): Use it to print correct status messages.
889 2006-11-11  Werner Koch  <wk@g10code.com>
891         * server.c (skip_options): New.
893 2006-10-24  Marcus Brinkmann  <marcus@g10code.de>
895         * Makefile.am (AM_CFLAGS): Add $(LIBASSUAN_CFLAGS).
897 2006-10-23  Werner Koch  <wk@g10code.com>
899         * gpgsm.c (main): Remap common cipher algo names to their OIDs.
900         (main): New command --gpgconf-test.
902 2006-10-20  Werner Koch  <wk@g10code.com>
904         * keydb.c (classify_user_id): Parse keygrip for the '&' identifier.
906 2006-10-18  Werner Koch  <wk@g10code.com>
908         * keylist.c (list_cert_raw): Also test for GPG_ERR_NO_VALUE when
909         testing for GPG_ERR_NO_DATA.
910         * certlist.c (cert_usage_p, gpgsm_find_cert): Ditto.
911         * certchain.c (check_cert_policy): Ditto.
913         * keylist.c (list_cert_std, list_cert_raw): Print "none" for no
914         chain length available.
916 2006-10-17  Werner Koch  <wk@g10code.com>
918         * gpgsm.c: No need for pth.h.  
919         (main): or to init it. It used to be hack for W32.
921         * sign.c (gpgsm_get_default_cert): Changed to return only
922         certificates usable for signing.
924 2006-10-16  Werner Koch  <wk@g10code.com>
926         * certchain.c (already_asked_marktrusted) 
927         (set_already_asked_marktrusted): New.
928         (gpgsm_validate_chain) <not trusted>: Keep track of certificates
929         we already asked for.
931 2006-10-11  Werner Koch  <wk@g10code.com>
933         * certreqgen.c (proc_parameters, create_request): Allow for
934         creation directly from a card.
935         * call-agent.c (gpgsm_agent_readkey): New arg FROMCARD.
936         (gpgsm_scd_pksign): New.
938 2006-10-06  Werner Koch  <wk@g10code.com>
940         * Makefile.am (AM_CFLAGS): Use PTH version of libassuan.
941         (gpgsm_LDADD): Ditto.
943 2006-10-05  Werner Koch  <wk@g10code.com>
945         * certcheck.c (do_encode_md): Check that the has algo is valid.
947 2006-10-02  Marcus Brinkmann  <marcus@g10code.de>
949         * server.c (register_commands): New commands DUMPKEYS and
950         DUMPSECRETKEYS.
951         (cmd_dumpkeys, cmd_dumpsecretkeys): New functions.
952         (option_handler): Support with-key-data option.
954 2006-09-26  Werner Koch  <wk@g10code.com>
956         * certchain.c (gpgsm_validate_chain): More changes for the relax
957         feature.  Use certificate reference counting instead of the old
958         explicit tests. Added a missing free. 
960 2006-09-25  Werner Koch  <wk@g10code.com>
962         * gpgsm.h (struct rootca_flags_s): New.
963         * call-agent.c (istrusted_status_cb): New.
964         (gpgsm_agent_istrusted): New arg ROOTCA_FLAGS.
965         * keylist.c (list_cert_colon): Use dummy for new arg.
966         * certchain.c (gpgsm_validate_chain): Make use of the relax flag
967         for root certificates.
968         (unknown_criticals): Ignore a GPG_ERR_NO_VALUE.
970 2006-09-20  Werner Koch  <wk@g10code.com>
972         * gpgsm.c: Add alias command --dump-cert.
974         * Makefile.am:  Changes to allow parallel make runs.
976 2006-09-18  Werner Koch  <wk@g10code.com>
978         * gpgsm.c (main): Use this to import standard certificates.
979         * keydb.c (keydb_add_resource): New arg AUTO_CREATED.
981 2006-09-14  Werner Koch  <wk@g10code.com>
983         Replaced all call gpg_error_from_errno(errno) by
984         gpg_error_from_syserror().
986 2006-09-13  Werner Koch  <wk@g10code.com>
988         * keylist.c (list_internal_keys): Print marker line to FP and not
989         to stdout.
991         * gpgsm.c (main): All list key list commands now make ose of
992         --output. Cleaned up calls to list modes.  New command
993         --dump-chain.  Renamed --list-sigs to --list-chain and added an
994         alias for the old one.
996         * server.c (cmd_message): Changed to use assuan_command_parse_fd.
997         (option_handler): New option list-to-output.
998         (do_listkeys): Use it.
1000 2006-09-06  Werner Koch  <wk@g10code.com>
1002         * gpgsm.h (OUT_OF_CORE): Removed and changed all callers to
1003         out_of_core.
1004         (CTRL): Removed and changed everywhere to ctrl_t.
1005         (CERTLIST): Ditto.
1007         Replaced all Assuan error codes by libgpg-error codes.  Removed
1008         all map_to_assuan_status and map_assuan_err.
1009         
1010         * gpgsm.c (main): Call assuan_set_assuan_err_source to have Assuan
1011         switch to gpg-error codes.  
1012         * server.c (set_error): Adjusted.
1014 2006-08-29  Werner Koch  <wk@g10code.com>
1016         * call-agent.c (gpgsm_agent_pkdecrypt): Allow decryption using
1017         complete S-expressions as implemented by the current gpg-agent.
1019         * gpgsm.c (main): Implement --output for encrypt, decrypt, sign
1020         and export.
1022 2006-07-03  Werner Koch  <wk@g10code.com>
1024         * certreqgen.c (proc_parameters): Print the component label of a
1025         faulty DN.
1027 2006-06-26  Werner Koch  <wk@g10code.com>
1029         * certdump.c (gpgsm_cert_log_name): New.
1030         * certchain.c (is_cert_still_valid): Log the name of the certificate.
1032 2006-06-20  Werner Koch  <wk@g10code.com>
1034         * gpgsm.c (gpgsm_init_default_ctrl): Take care of the command line
1035         option --include-certs.
1037         * keylist.c (list_cert_raw): Print the certid.
1039 2006-05-23  Werner Koch  <wk@g10code.com>
1041         * keydb.c (hextobyte): Deleted as it is now defined in jnlib.
1043         * Makefile.am (gpgsm_LDADD): Include ZLIBS.
1045 2006-05-19  Marcus Brinkmann  <marcus@g10code.de>
1047         * keydb.c (keydb_insert_cert): Do not lock here, but only check if
1048         it is locked.
1049         (keydb_store_cert): Lock here.
1051         * keydb.h (keydb_delete): Accept new argument UNLOCK.
1052         * keydb.c (keydb_delete): Likewise.  Only unlock if this is set.
1053         * delete.c (delete_one): Add new argument to invocation of
1054         keydb_delete.
1055         
1056 2006-05-15  Werner Koch  <wk@g10code.com>
1058         * keylist.c (print_names_raw): Sanitize URI.
1060 2006-03-21  Werner Koch  <wk@g10code.com>
1062         * certchain.c (get_regtp_ca_info): New.
1063         (allowed_ca): Use it.
1065 2006-03-20  Werner Koch  <wk@g10code.com>
1067         * qualified.c (gpgsm_is_in_qualified_list): New optional arg COUNTRY.
1069 2006-02-17  Werner Koch  <wk@g10code.com>
1071         * call-dirmngr.c (start_dirmngr): Print name of dirmngr to be started.
1073 2005-11-23  Werner Koch  <wk@g10code.com>
1075         * gpgsm.h: New member QUALSIG_APPROVAL.
1076         * sign.c (gpgsm_sign): Print a warning if a certificate is not
1077         qualified.
1078         * qualified.c (gpgsm_qualified_consent): Include a note that this
1079         is not approved software.
1080         (gpgsm_not_qualified_warning): New.
1081         * gpgsm.c (main): Prepared to print a note whether the software
1082         has been approved.
1084 2005-11-13  Werner Koch  <wk@g10code.com>
1086         * call-agent.c (gpgsm_agent_get_confirmation): New.
1088         * keylist.c (list_cert_std): Print qualified status.
1089         * qualified.c: New.
1090         * certchain.c (gpgsm_validate_chain): Check for qualified
1091         certificates.
1093         * certchain.c (gpgsm_basic_cert_check): Release keydb handle when
1094         no-chain-validation is used.
1096 2005-11-11  Werner Koch  <wk@g10code.com>
1098         * keylist.c (print_capabilities): Print is_qualified status.
1100 2005-10-28  Werner Koch  <wk@g10code.com>
1102         * certdump.c (pretty_print_sexp): New.
1103         (gpgsm_print_name2): Use it here.  This allows proper printing of
1104         DNS names as used with server certificates.
1106 2005-10-10  Werner Koch  <wk@g10code.com>
1108         * keylist.c: Add pkaAdress OID as reference.
1110 2005-10-08  Marcus Brinkmann  <marcus@g10code.de>
1112         * Makefile.am (gpgsm_LDADD): Add ../gl/libgnu.a after
1113         ../common/libcommon.a.
1115 2005-09-13  Werner Koch  <wk@g10code.com>
1117         * verify.c (gpgsm_verify): Print a note if the unknown algorithm
1118         is MD2.
1119         * sign.c (gpgsm_sign): Ditto.
1120         * certcheck.c (gpgsm_check_cert_sig): Ditto.
1122 2005-09-08  Werner Koch  <wk@g10code.com>
1124         * export.c (popen_protect_tool): Add option --have-cert.  We
1125         probably lost this option with 1.9.14 due to restructuring of
1126         export.c.
1128 2005-07-21  Werner Koch  <wk@g10code.com>
1130         * gpgsm.c (main): New options --no-log-file and --debug-none.
1132         * certreqgen.c (get_parameter, get_parameter_value): Add SEQ arg
1133         to allow enumeration.  Changed all callers.
1134         (create_request): Process DNS and URI parameters.
1136 2005-07-20  Werner Koch  <wk@g10code.com>
1138         * keylist.c (email_kludge): Reworked.
1140         * certdump.c (gpgsm_print_serial, gpgsm_dump_serial): Cast printf
1141         arg to unsigned.
1142         * call-dirmngr.c (gpgsm_dirmngr_run_command): Ditto
1144 2005-07-19  Werner Koch  <wk@g10code.com>
1146         * fingerprint.c (gpgsm_get_certid): Cast printf arg to unsigned.
1147         Bug accidently introduced while solving the #$%^& gcc
1148         signed/unsigned char* warnings.
1150 2005-06-15  Werner Koch  <wk@g10code.com>
1152         * delete.c (delete_one): Changed FPR to unsigned.
1153         * encrypt.c (encrypt_dek): Made ENCVAL unsigned.
1154         (gpgsm_encrypt): Ditto.
1155         * sign.c (gpgsm_sign): Made SIGVAL unsigned.
1156         * base64.c (base64_reader_cb): Need to use some casting to get
1157         around signed/unsigned char* warnings.
1158         * certcheck.c (gpgsm_check_cms_signature): Ditto.
1159         (gpgsm_create_cms_signature): Changed arg R_SIGVAL to unsigned char*.
1160         (do_encode_md): Made NFRAME a size_t.
1161         * certdump.c (gpgsm_print_serial): Fixed signed/unsigned warning.
1162         (gpgsm_dump_serial): Ditto.
1163         (gpgsm_format_serial): Ditto.
1164         (gpgsm_dump_string): Ditto.
1165         (gpgsm_dump_cert): Ditto.
1166         (parse_dn_part): Ditto.
1167         (gpgsm_print_name2): Ditto.
1168         * keylist.c (email_kludge): Ditto.
1169         * certreqgen.c (proc_parameters, create_request): Ditto.
1170         (create_request): Ditto.
1171         * call-agent.c (gpgsm_agent_pksign): Made arg R_BUF unsigned.
1172         (struct cipher_parm_s): Made CIPHERTEXT unsigned.
1173         (struct genkey_parm_s): Ditto.
1174         * server.c (strcpy_escaped_plus): Made arg S signed char*.
1175         * fingerprint.c (gpgsm_get_fingerprint): Made ARRAY unsigned.
1176         (gpgsm_get_keygrip): Ditto.
1177         * keydb.c (keydb_insert_cert): Made DIGEST unsigned.
1178         (keydb_update_cert): Ditto.
1179         (classify_user_id): Apply cast to signed/unsigned assignment.
1180         (hextobyte): Ditto.
1182 2005-06-01  Werner Koch  <wk@g10code.com>
1184         * misc.c: Include setenv.h.
1186 2005-04-21  Werner Koch  <wk@g10code.com>
1188         * gpgsm.c: New options --{enable,disable}-trusted-cert-crl-check.
1189         * certchain.c (gpgsm_validate_chain): Make use of it.
1191         * certchain.c (gpgsm_validate_chain): Check revocations even for
1192         expired certificates.  This is required because on signature
1193         verification an expired key is fine whereas a revoked one is not.
1195 2005-04-20  Werner Koch  <wk@g10code.com>
1197         * Makefile.am (AM_CFLAGS): Add PTH_CFLAGS as noted by several folks.
1199 2005-04-19  Werner Koch  <wk@g10code.com>
1201         * certchain.c (check_cert_policy): Print the diagnostic for a open
1202         failure of policies.txt only in verbose mode or when it is not
1203         ENOENT.
1205 2005-04-17  Werner Koch  <wk@g10code.com>
1207         * call-dirmngr.c (inq_certificate): Add new inquire SENDCERT_SKI.
1208         * certlist.c (gpgsm_find_cert): Add new arg KEYID and implement
1209         this filter.  Changed all callers.
1211         * certchain.c (find_up_search_by_keyid): New helper.
1212         (find_up): Also try using the AKI.keyIdentifier.
1213         (find_up_external): Ditto.
1215 2005-04-15  Werner Koch  <wk@g10code.com>
1217         * keylist.c (list_cert_raw): Print the subjectKeyIdentifier as
1218         well as the keyIdentifier part of the authorityKeyIdentifier.
1220 2005-03-31  Werner Koch  <wk@g10code.com>
1222         * call-dirmngr.c (start_dirmngr): Use PATHSEP_C instead of ':'.
1223         * call-agent.c (start_agent): Ditto.
1225 2005-03-17  Werner Koch  <wk@g10code.com>
1227         * certcheck.c: Fixed use of DBG_CRYPTO and DBG_X509.
1229         * certchain.c (gpgsm_basic_cert_check): Dump certificates after a
1230         failed gcry_pk_verify.
1231         (find_up): Do an external lookup also for an authorityKeyIdentifier
1232         lookup. Factored external lookup code out to ..
1233         (find_up_external): .. new.
1235 2005-03-03  Werner Koch  <wk@g10code.com>
1237         * Makefile.am (gpgsm_LDADD): Added PTH_LIBS.  Noted by Kazu Yamamoto.
1239 2005-01-13  Werner Koch  <wk@g10code.com>
1241         * certreqgen.c (proc_parameters): Cast printf arg.
1243 2004-12-22  Werner Koch  <wk@g10code.com>
1245         * gpgsm.c (set_binary): New.
1246         (main, open_read, open_fwrite): Use it.
1248 2004-12-21  Werner Koch  <wk@g10code.com>
1250         * gpgsm.c (main): Use default_homedir().
1251         (main) [W32]: Default to disabled CRL checks.
1253 2004-12-20  Werner Koch  <wk@g10code.com>
1255         * call-agent.c (start_agent): Before starting a pipe server start
1256         to connect to a server on the standard socket.  Use PATHSEP
1257         * call-dirmngr.c (start_dirmngr): Use PATHSEP.
1259         * import.c: Include unistd.h for dup and close.
1261 2004-12-18  Werner Koch  <wk@g10code.com>
1263         * gpgsm.h (map_assuan_err): Define in terms of
1264         map_assuan_err_with_source.
1265         * call-agent.c (start_agent): Pass error source to
1266         send_pinentry_environment.
1268 2004-12-17  Werner Koch  <wk@g10code.com>
1270         * call-dirmngr.c (isvalid_status_cb, lookup_status_cb)
1271         (run_command_status_cb): Return cancel status if gpgsm_status
1272         returned an error.
1274         * server.c (gpgsm_status, gpgsm_status2) 
1275         (gpgsm_status_with_err_code): Return an error code.
1276         (gpgsm_status2): Always call va_end().
1278 2004-12-15  Werner Koch  <wk@g10code.com>
1280         * call-dirmngr.c (lookup_status_cb): Send progress messages
1281         upstream.
1282         (isvalid_status_cb): Ditto.
1283         (gpgsm_dirmngr_isvalid): Put CTRL into status CB parameters.
1284         (gpgsm_dirmngr_run_command, run_command_status_cb): Pass CTRL to
1285         status callback and handle PROGRESS.
1287         * misc.c (setup_pinentry_env) [W32]: Don't use it.
1289         * gpgsm.c (main) [W32]: Init Pth because we need it for the socket
1290         operations and to resolve libassuan symbols.
1291         (run_protect_tool) [W32]: Disable it.
1293         * Makefile.am (gpgsm_LDADD): Move LIBASSUAN_LIBS more to the end.
1295 2004-12-07  Werner Koch  <wk@g10code.com>
1297         * Makefile.am (gpgsm_LDADD): Put libassuan before jnlib because
1298         under W32 we need the w32 pth code from jnlib.
1300         * misc.c (setup_pinentry_env) [W32]: Disabled.
1302 2004-12-06  Werner Koch  <wk@g10code.com>
1304         * gpgsm.c (run_protect_tool) [_WIN32]: Disabled.
1306         * import.c (popen_protect_tool): Simplified by making use of
1307         gnupg_spawn_process.
1308         (parse_p12): Likewise, using gnupg_wait_process.
1309         * export.c (popen_protect_tool): Ditto.
1310         (export_p12): Ditto.
1312         * keydb.c: Don't define DIRSEP_S here.
1314 2004-12-02  Werner Koch  <wk@g10code.com>
1316         * certchain.c (gpgsm_basic_cert_check): Dump certs with bad
1317         signature for debugging.
1318         (gpgsm_validate_chain): Ditto.
1320 2004-11-29  Werner Koch  <wk@g10code.com>
1322         * gpgsm.c (set_debug): Changed to use a globals DEBUG_LEVEL and
1323         DEBUG_VALUE.
1324         (main): Made DEBUG_LEVEL global and introduced DEBUG_VALUE.  This
1325         now allows to add debug flags on top of a debug-level setting.
1327 2004-11-23  Werner Koch  <wk@g10code.com>
1329         * gpgsm.c: New option --prefer-system-dirmngr.
1330         * call-dirmngr.c (start_dirmngr): Implement this option.
1332 2004-10-22  Werner Koch  <wk@g10code.com>
1334         * certreqgen.c (gpgsm_genkey): Remove the NEW from the certificate
1335         request PEM header.  This is according to the Sphinx standard.
1337 2004-10-08  Moritz Schulte  <moritz@g10code.com>
1339         * certchain.c (gpgsm_validate_chain): Do not use keydb_new() in
1340         case the no_chain_validation-return-short-cut is used (fixes
1341         memory leak).
1343 2004-10-04  Werner Koch  <wk@g10code.com>
1345         * misc.c (setup_pinentry_env): Try hard to set a default for GPG_TTY.
1347 2004-09-30  Werner Koch  <wk@g10code.com>
1349         * gpgsm.c (i18n_init): Always use LC_ALL.
1351         * certdump.c (gpgsm_format_name): Factored code out to ..
1352         (gpgsm_format_name2): .. new.
1353         (gpgsm_print_name): Factored code out to ..
1354         (gpgsm_print_name2): .. new.
1355         (print_dn_part): New arg TRANSLATE.  Changed all callers.
1356         (print_dn_parts): Ditto.
1357         (gpgsm_format_keydesc): Do not translate the SUBJECT; we require
1358         it to stay UTF-8 but we still want to filter out bad control
1359         characters.
1361         * Makefile.am: Adjusted for gettext 0.14.
1363         * keylist.c (list_cert_colon): Make sure that the expired flag has
1364         a higher precedence than the invalid flag. 
1366 2004-09-29  Werner Koch  <wk@g10code.com>
1368         * import.c (parse_p12): Write an error status line for bad
1369         passphrases. Add new arg CTRL and changed caller.
1370         * export.c (export_p12): Likewise.
1372 2004-09-14  Werner Koch  <wk@g10code.com>
1374         * certchain.c (gpgsm_validate_chain): Give expired certificates a
1375         higher error precedence and don't bother to check any CRL in that
1376         case.
1378 2004-08-24  Werner Koch  <wk@g10code.de>
1380         * certlist.c: Fixed typo in ocsp OID.
1382 2004-08-18  Werner Koch  <wk@g10code.de>
1384         * certlist.c (gpgsm_cert_use_ocsp_p): New.
1385         (cert_usage_p): Support it here.
1386         * call-dirmngr.c (gpgsm_dirmngr_isvalid): Use it here.
1388 2004-08-17  Marcus Brinkmann  <marcus@g10code.de>
1390         * import.c: Fix typo in last change.
1392 2004-08-17  Werner Koch  <wk@g10code.de>
1394         * import.c (check_and_store): Do a full validation if
1395         --with-validation is set.
1397         * certchain.c (gpgsm_basic_cert_check): Print more detailed error
1398         messages.
1399         
1400         * certcheck.c (do_encode_md): Partly support DSA.  Add new arg
1401         PKALGO. Changed all callers to pass it.
1402         (pk_algo_from_sexp): New.
1404 2004-08-16  Werner Koch  <wk@g10code.de>
1406         * gpgsm.c: New option --fixed-passphrase.
1407         * import.c (popen_protect_tool): Pass it to the protect-tool.
1409         * server.c (cmd_encrypt): Use DEFAULT_RECPLIST and not recplist
1410         for encrypt-to keys.
1412 2004-08-06  Werner Koch  <wk@g10code.com>
1414         * gpgsm.c: New option --with-ephemeral-keys.
1415         * keylist.c (list_internal_keys): Set it here.
1416         (list_cert_raw): And indicate those keys.  Changed all our callers
1417         to pass the new arg HD through.
1419 2004-07-23  Werner Koch  <wk@g10code.de>
1421         * certreqgen.c (proc_parameters): Do not allow key length below
1422         1024.
1424 2004-07-22  Werner Koch  <wk@g10code.de>
1426         * keylist.c (list_cert_raw): Print the keygrip.
1428 2004-07-20  Werner Koch  <wk@gnupg.org>
1430         * certchain.c (gpgsm_validate_chain): The trust check didn't
1431         worked anymore, probably due to the changes at 2003-03-04.  Fixed.
1433 2004-06-06  Werner Koch  <wk@gnupg.org>
1435         * certreqgen.c (get_parameter_uint, create_request): Create
1436         an extension for key usage when requested. 
1438 2004-05-12  Werner Koch  <wk@gnupg.org>
1440         * gpgsm.c (main): Install emergency_cleanup also as an atexit
1441         handler.
1443         * verify.c (gpgsm_verify): Removed the separate error code
1444         handling for KSBA.  We use shared error codes anyway.
1446         * export.c (export_p12): Removed debugging code.
1448         * encrypt.c (gpgsm_encrypt): Put the session key in to secure memory.
1450 2004-05-11  Werner Koch  <wk@gnupg.org>
1452         * sign.c (gpgsm_sign): Include the error source in the final error
1453         message.
1454         * decrypt.c (gpgsm_decrypt): Ditto.
1456         * fingerprint.c (gpgsm_get_key_algo_info): New.
1457         * sign.c (gpgsm_sign): Don't assume RSA in the status line.
1458         * keylist.c (list_cert_colon): Really print the algorithm and key
1459         length.
1460         (list_cert_raw, list_cert_std): Ditto.
1461         (list_cert_colon): Reorganized to be able to tell whether a root
1462         certificate is trusted.
1464         * gpgsm.c: New option --debug-allow-core-dump.
1466         * gpgsm.h (opt): Add member CONFIG_FILENAME.
1467         * gpgsm.c (main): Use it here instead of the local var.
1469         * server.c (gpgsm_server): Print some additional information with
1470         the hello in verbose mode.
1472 2004-04-30  Werner Koch  <wk@gnupg.org>
1474         * import.c (check_and_store): Do not update the stats for hidden
1475         imports of issuer certs.
1476         (popen_protect_tool): Request statusmessages from the protect-tool.
1477         (parse_p12): Detect status messages. Add new arg STATS and update them.
1478         (print_imported_summary): Include secret key stats.
1480 2004-04-28  Werner Koch  <wk@gnupg.org>
1482         * gpgsm.c: New command --keydb-clear-some-cert-flags.
1483         * keydb.c (keydb_clear_some_cert_flags): New.
1484         (keydb_update_keyblock, keydb_set_flags): Change error code
1485         CONFLICT to NOT_LOCKED.
1487 2004-04-26  Werner Koch  <wk@gnupg.org>
1489         * gpgsm.c (main) <gpgconf>: Do not use /dev/null as default config
1490         filename.
1492         * call-agent.c (gpgsm_agent_pksign, gpgsm_agent_pkdecrypt) 
1493         (gpgsm_agent_genkey, gpgsm_agent_istrusted) 
1494         (gpgsm_agent_marktrusted, gpgsm_agent_havekey) 
1495         (gpgsm_agent_passwd): Add new arg CTRL and changed all callers.
1496         (start_agent): New arg CTRL.  Send progress item when starting a
1497         new agent.
1498         * sign.c (gpgsm_get_default_cert, get_default_signer): New arg
1499         CTRL to be passed down to the agent function.
1500         * decrypt.c (prepare_decryption): Ditto.
1501         * certreqgen.c (proc_parameters, read_parameters): Ditto.
1502         * certcheck.c (gpgsm_create_cms_signature): Ditto.
1504 2004-04-23  Werner Koch  <wk@gnupg.org>
1506         * keydb.c (keydb_add_resource): Try to compress the file on init.
1508         * keylist.c (oidtranstbl): New.  OIDs collected from several sources.
1509         (print_name_raw, print_names_raw, list_cert_raw): New.
1510         (gpgsm_list_keys): Check the dump mode and pass it down as
1511         necessary.
1513 2004-04-22  Werner Koch  <wk@gnupg.org>
1515         * gpgsm.c (main): New commands --dump-keys, --dump-external-keys,
1516         --dump-secret-keys.
1518 2004-04-13  Werner Koch  <wk@gnupg.org>
1520         * misc.c (setup_pinentry_env): New.
1521         * import.c (popen_protect_tool): Call it.
1522         * export.c (popen_protect_tool): Call it.
1524 2004-04-08  Werner Koch  <wk@gnupg.org>
1526         * decrypt.c (gpgsm_decrypt): Return GPG_ERR_NO_DATA if it is not a 
1527         encrypted message.
1529 2004-04-07  Werner Koch  <wk@gnupg.org>
1531         * gpgsm.c: New option --force-crl-refresh.
1532         * call-dirmngr.c (gpgsm_dirmngr_isvalid): Pass option to dirmngr.
1534 2004-04-05  Werner Koch  <wk@gnupg.org>
1536         * server.c (get_status_string): Add STATUS_NEWSIG.
1537         * verify.c (gpgsm_verify): Print STATUS_NEWSIG for each signature.
1539         * certchain.c (gpgsm_validate_chain) <gpgsm_cert_use_cer_p>: Do
1540         not just warn if a cert is not suitable; bail out immediately.
1542 2004-04-01  Werner Koch  <wk@gnupg.org>
1544         * call-dirmngr.c (isvalid_status_cb): New.
1545         (unhexify_fpr): New. Taken from ../g10/call-agent.c
1546         (gpgsm_dirmngr_isvalid): Add new arg CTRL, changed caller to pass
1547         it thru.  Detect need to check the respondert cert and do that.
1548         * certchain.c (gpgsm_validate_chain): Add new arg FLAGS.  Changed
1549         all callers.
1551 2004-03-24  Werner Koch  <wk@gnupg.org>
1553         * sign.c (gpgsm_sign): Include a short list of capabilities.
1555 2004-03-17  Werner Koch  <wk@gnupg.org>
1557         * gpgsm.c (main) <gpgconf>: Fixed default value quoting.
1559 2004-03-16  Werner Koch  <wk@gnupg.org>
1561         * gpgsm.c (main): Implemented --gpgconf-list.
1563 2004-03-15  Werner Koch  <wk@gnupg.org>
1565         * keylist.c (list_cert_colon): Hack to set the expired flag.
1567 2004-03-09  Werner Koch  <wk@gnupg.org>
1569         * gpgsm.c (main): Correctly intitialze USE_OCSP flag.
1571         * keydb.c (keydb_delete): s/GPG_ERR_CONFLICT/GPG_ERR_NOT_LOCKED/
1573 2004-03-04  Werner Koch  <wk@gnupg.org>
1575         * call-dirmngr.c (gpgsm_dirmngr_isvalid): New arg ISSUER_CERT.
1577         * certchain.c (is_cert_still_valid): New.  Code moved from ...
1578         (gpgsm_validate_chain): ... here because we now need to check at
1579         two places and at a later stage, so that we can pass the issuer
1580         cert down to the dirmngr.
1582 2004-03-03  Werner Koch  <wk@gnupg.org>
1584         * call-agent.c (start_agent): Replaced pinentry setup code by a
1585         call to a new common function.
1587         * certdump.c (gpgsm_format_keydesc): Make sure the string is
1588         returned as utf-8.
1590         * export.c (gpgsm_export): Make sure that we don't export more
1591         than one certificate.
1593 2004-03-02  Werner Koch  <wk@gnupg.org>
1595         * export.c (create_duptable, destroy_duptable)
1596         (insert_duptable): New.
1597         (gpgsm_export): Avoid duplicates.
1599 2004-02-26  Werner Koch  <wk@gnupg.org>
1601         * certchain.c (compare_certs): New.
1602         (gpgsm_validate_chain): Fixed infinite certificate checks after
1603         bad signatures.
1605 2004-02-24  Werner Koch  <wk@gnupg.org>
1607         * keylist.c (list_cert_colon): Print the fingerprint as the
1608         cert-id for root certificates.
1610 2004-02-21  Werner Koch  <wk@gnupg.org>
1612         * keylist.c (list_internal_keys): Return error codes.
1613         (list_external_keys, gpgsm_list_keys): Ditto.
1614         * server.c (do_listkeys): Ditto.
1616         * gpgsm.c (main): Display a key description for --passwd.
1617         * call-agent.c (gpgsm_agent_passwd): New arg DESC.
1619 2004-02-20  Werner Koch  <wk@gnupg.org>
1621         * gpgsm.c (main): New option --debug-ignore-expiration.
1622         * certchain.c (gpgsm_validate_chain): Use it here.
1624         * certlist.c (cert_usage_p): Apply extKeyUsage.
1626 2004-02-19  Werner Koch  <wk@gnupg.org>
1628         * export.c (export_p12, popen_protect_tool)
1629         (gpgsm_p12_export): New.
1630         * gpgsm.c (main): New command --export-secret-key-p12. 
1632 2004-02-18  Werner Koch  <wk@gnupg.org>
1634         * gpgsm.c (set_debug): Set the new --debug-level flags.
1635         (main): New option --gpgconf-list.  
1636         (main): Do not setup -u and -r keys when not required.
1637         (main): Setup the used character set.
1639         * keydb.c (keydb_add_resource): Print a hint to start the
1640         gpg-agent.
1642 2004-02-17  Werner Koch  <wk@gnupg.org>
1644         * gpgsm.c: Fixed value parsing for --with-validation.
1645         * call-agent.c (start_agent): Ignore an empty GPG_AGENT_INFO.
1646         * call-dirmngr.c (start_dirmngr): Likewise for DIRMNGR_INFO.
1648         * gpgsm.c: New option --with-md5-fingerprint.
1649         * keylist.c (list_cert_std): Print MD5 fpr.
1651         * gpgsm.c: New options --with-validation.
1652         * server.c (option_handler): New option "with-validation".
1653         * keylist.c (list_cert_std, list_internal_keys): New args CTRL and
1654         WITH_VALIDATION. Changed callers to set it.
1655         (list_external_cb, list_external_keys): Pass CTRL to the callback.
1656         (list_cert_colon): Add arg CTRL.  Check validation if requested.
1657         * certchain.c (unknown_criticals, allowed_ca, check_cert_policy) 
1658         (gpgsm_validate_chain): New args LISTMODE and FP.
1659         (do_list): New helper for info output.
1660         (find_up): New arg FIND_NEXT.
1661         (gpgsm_validate_chain): After a bad signature try again with other
1662         CA certificates.
1664         * import.c (print_imported_status): New arg NEW_CERT. Print
1665         additional STATUS_IMPORT_OK becuase that is what gpgme expects.
1666         (check_and_store): Always call above function after import.
1667         * server.c (get_status_string): Added STATUS_IMPORT_OK.
1669 2004-02-13  Werner Koch  <wk@gnupg.org>
1671         * certcheck.c (gpgsm_create_cms_signature): Format a description
1672         for use by the pinentry.
1673         * decrypt.c (gpgsm_decrypt): Ditto. Free HEXKEYGRIP.
1674         * certdump.c (format_name_cookie, format_name_writer) 
1675         (gpgsm_format_name): New.
1676         (gpgsm_format_serial): New.
1677         (gpgsm_format_keydesc): New.
1678         * call-agent.c (gpgsm_agent_pksign): New arg DESC.
1679         (gpgsm_agent_pkdecrypt): Ditto.
1681         * encrypt.c (init_dek): Check for too weak algorithms.
1683         * import.c (parse_p12, popen_protect_tool): New.
1685         * base64.c (gpgsm_create_reader): New arg ALLOW_MULTI_PEM.
1686         Changed all callers.
1687         (base64_reader_cb): Handle it here.
1688         (gpgsm_reader_eof_seen): New.
1689         (base64_reader_cb): Set a flag for EOF.
1690         (simple_reader_cb): Ditto.
1692 2004-02-12  Werner Koch  <wk@gnupg.org>
1694         * gpgsm.h, gpgsm.c: New option --protect-tool-program.
1695         * gpgsm.c (run_protect_tool): Use it.
1697 2004-02-11  Werner Koch  <wk@gnupg.org>
1699         * Makefile.am (AM_CPPFLAGS): Pass directory constants via -D; this
1700         will allow to override directory names at make time.
1702 2004-02-02  Werner Koch  <wk@gnupg.org>
1704         * import.c (check_and_store): Import certificates even with
1705         missing issuer's cert.  Fixed an "depending on the verbose
1706         setting" bug.
1708         * certchain.c (gpgsm_validate_chain): Mark revoked certs in the
1709         keybox.
1711         * keylist.c (list_cert_colon): New arg VALIDITY; use it to print a
1712         revoked flag.
1713         (list_internal_keys): Retrieve validity flag.
1714         (list_external_cb): Pass 0 as validity flag.
1715         * keydb.c (keydb_get_flags, keydb_set_flags): New.
1716         (keydb_set_cert_flags): New.
1717         (lock_all): Return a proper error code.
1718         (keydb_lock): New.
1719         (keydb_delete): Don't lock but check that it has been locked.
1720         (keydb_update_keyblock): Ditto.
1721         * delete.c (delete_one): Take a lock.
1723 2004-01-30  Werner Koch  <wk@gnupg.org>
1725         * certchain.c (check_cert_policy): Fixed read error checking.
1726         (check_cert_policy): With no critical policies issue only a
1727         warning if the policy file does not exists.
1729         * sign.c (add_certificate_list): Decrement N for the first cert.
1731 2004-01-29  Werner Koch  <wk@gnupg.org>
1733         * certdump.c (parse_dn_part): Map common OIDs to human readable
1734         labels.  Make sure that a value won't get truncated if it includes
1735         a Nul.
1737 2004-01-28  Werner Koch  <wk@gnupg.org>
1739         * certchain.c (gpgsm_validate_chain): Changed the message printed
1740         for an untrusted root certificate.
1742 2004-01-27  Werner Koch  <wk@gnupg.org>
1744         * certdump.c (parse_dn_part): Pretty print the nameDistinguisher OID.
1745         (print_dn_part): Do not delimit multiple RDN by " + ".  Handle
1746         multi-valued RDNs in a special way, i.e. in the order specified by
1747         the certificate.
1748         (print_dn_parts): Simplified. 
1750 2004-01-16  Werner Koch  <wk@gnupg.org>
1752         * sign.c (gpgsm_sign): Print an error message on all failures.
1753         * decrypt.c (gpgsm_decrypt): Ditto.
1755 2003-12-17  Werner Koch  <wk@gnupg.org>
1757         * server.c (gpgsm_server): Add arg DEFAULT_RECPLIST.
1758         (cmd_encrypt): Add all enrypt-to marked certs to the list.
1759         * encrypt.c (gpgsm_encrypt): Check that real recipients are
1760         available.
1761         * gpgsm.c (main): Make the --encrypt-to and --no-encrypt-to
1762         options work.  Pass the list of recients to gpgsm_server.
1763         * gpgsm.h (certlist_s): Add field IS_ENCRYPT_TO.
1764         (opt): Add NO_ENCRYPT_TO.
1765         * certlist.c (gpgsm_add_to_certlist): New arg IS_ENCRYPT_TO.
1766         Changed all callers and ignore duplicate entries.
1767         (is_cert_in_certlist): New.
1768         (gpgsm_add_cert_to_certlist): New.
1770         * certdump.c (gpgsm_print_serial): Cleaned up cast use in strtoul.
1771         (gpgsm_dump_serial): Ditto.
1773         * decrypt.c (gpgsm_decrypt): Replaced ERR by RC.
1775 2003-12-16  Werner Koch  <wk@gnupg.org>
1777         * gpgsm.c (main): Set the prefixes for assuan logging.
1779         * sign.c (gpgsm_sign): Add validation checks for the default
1780         certificate.
1782         * gpgsm.c: Add -k as alias for --list-keys and -K for
1783         --list-secret-keys.
1785 2003-12-15  Werner Koch  <wk@gnupg.org>
1787         * encrypt.c (init_dek): Use gry_create_nonce for the IV; there is
1788         not need for real strong random here and it even better protect
1789         the random bits used for the key.
1791 2003-12-01  Werner Koch  <wk@gnupg.org>
1793         * gpgsm.c, gpgsm.h: New options --{enable,disable}-ocsp.
1794         (gpgsm_init_default_ctrl): Set USE_OCSP to the default value.
1795         * certchain.c (gpgsm_validate_chain): Handle USE_OCSP.
1796         * call-dirmngr.c (gpgsm_dirmngr_isvalid): Add arg USE_OCSP and
1797         proceed accordingly.
1799 2003-11-19  Werner Koch  <wk@gnupg.org>
1801         * verify.c (gpgsm_verify): Use "0" instead of an empty string for
1802         the VALIDSIG status.
1804 2003-11-18  Werner Koch  <wk@gnupg.org>
1806         * verify.c (gpgsm_verify): Fixed for changes API of gcry_md_info.
1808         * certchain.c (unknown_criticals): Fixed an error code test.
1810 2003-11-12  Werner Koch  <wk@gnupg.org>
1812         Adjusted for API changes in Libksba.
1814 2003-10-31  Werner Koch  <wk@gnupg.org>
1816         * certchain.c (gpgsm_validate_chain): Changed to use ksba_isotime_t.
1817         * verify.c (strtimestamp_r, gpgsm_verify): Ditto.
1818         * sign.c (gpgsm_sign): Ditto.
1819         * keylist.c (print_time, list_cert_std, list_cert_colon): Ditto.
1820         * certdump.c (gpgsm_print_time, gpgsm_dump_time, gpgsm_dump_cert):
1821         Ditto.
1823 2003-10-25  Werner Koch  <wk@gnupg.org>
1825         * certreqgen.c (read_parameters): Fixed faulty of !spacep().
1827 2003-08-20  Marcus Brinkmann  <marcus@g10code.de>
1829         * encrypt.c (encode_session_key): Allocate enough space.  Cast key
1830         byte to unsigned char to prevent sign extension.
1831         (encrypt_dek): Check return value before error.
1833 2003-08-14  Timo Schulz  <twoaday@freakmail.de>
1835         * encrypt.c (encode_session_key): Use new Libgcrypt interface.
1836         
1837 2003-07-31  Werner Koch  <wk@gnupg.org>
1839         * Makefile.am (gpgsm_LDADD): Added INTLLIBS.
1841 2003-07-29  Werner Koch  <wk@gnupg.org>
1843         * gpgsm.c (main): Add secmem features and set the random seed file.
1844         (gpgsm_exit): Update the random seed file and enable debug output.
1846 2003-07-27  Werner Koch  <wk@gnupg.org>
1848         Adjusted for gcry_mpi_print and gcry_mpi_scan API change.
1850 2003-06-24  Werner Koch  <wk@gnupg.org>
1852         * server.c (gpgsm_status_with_err_code): New.
1853         * verify.c (gpgsm_verify): Use it here instead of the old
1854         tokenizing version.
1856         * verify.c (strtimestamp): Renamed to strtimestamp_r
1858         Adjusted for changes in the libgcrypt API. Some more fixes for the
1859         libgpg-error stuff.  
1861 2003-06-04  Werner Koch  <wk@gnupg.org>
1863         * call-agent.c (init_membuf,put_membuf,get_membuf): Removed.
1864         Include new membuf header and changed used type.
1866         Renamed error codes from INVALID to INV and removed _ERROR suffixes.
1868 2003-06-03  Werner Koch  <wk@gnupg.org>
1870         Changed all error codes in all files to the new libgpg-error scheme.
1872         * gpgsm.h: Include gpg-error.h .
1873         * Makefile.am: Link with libgpg-error.
1875 2003-04-29  Werner Koch  <wk@gnupg.org>
1877         * Makefile.am: Use libassuan.  Don't override LDFLAGS anymore.
1878         * server.c (register_commands): Adjust for new Assuan semantics.
1880 2002-12-03  Werner Koch  <wk@gnupg.org>
1882         * call-agent.c (gpgsm_agent_passwd): New.
1883         * gpgsm.c (main): New command --passwd and --call-protect-tool
1884         (run_protect_tool): New.
1886 2002-11-25  Werner Koch  <wk@gnupg.org>
1888         * verify.c (gpgsm_verify): Handle content-type attribute. 
1890 2002-11-13  Werner Koch  <wk@gnupg.org>
1892         * call-agent.c (start_agent): Try to use $GPG_TTY instead of
1893         ttyname.  Changed ttyname to test stdin becuase it can be assumed
1894         that output redirection is more common that input redirection.
1896 2002-11-12  Werner Koch  <wk@gnupg.org>
1898         * gpgsm.c: New command --call-dirmngr. 
1899         * call-dirmngr.c (gpgsm_dirmngr_run_command)
1900         (run_command_inq_cb,run_command_cb)
1901         (run_command_status_cb): New.
1903 2002-11-11  Werner Koch  <wk@gnupg.org>
1905         * certcheck.c (gpgsm_check_cms_signature): Don't double free
1906         s_sig but free s_pkey at leave.
1908 2002-11-10  Werner Koch  <wk@gnupg.org>
1910         * gpgsm.c: Removed duplicate --list-secret-key entry.
1912 2002-09-19  Werner Koch  <wk@gnupg.org>
1914         * certcheck.c (gpgsm_check_cert_sig): Add cert hash debugging.
1916         * certchain.c (find_up): Print info when the cert was not found 
1917         by the autorithyKeyIdentifier.
1919 2002-09-03  Werner Koch  <wk@gnupg.org>
1921         * gpgsm.c (main): Disable the internal libgcrypt locking.
1923 2002-08-21  Werner Koch  <wk@gnupg.org>
1925         * import.c (print_imported_summary): Cleaned up.  Print new
1926         not_imported value.
1927         (check_and_store): Update non_imported counter.
1928         (print_import_problem): New.
1929         (check_and_store): Print error status message.
1930         * server.c (get_status_string): Added STATUS_IMPORT_PROBLEM.
1932 2002-08-20  Werner Koch  <wk@gnupg.org>
1934         * gpgsm.c (main): Use the log file only in server mode.
1936         * import.c (print_imported_summary): New.
1937         (check_and_store): Update the counters, take new argument.
1938         (import_one): Factored out core of gpgsm_import.
1939         (gpgsm_import): Print counters.
1940         (gpgsm_import_files): New.
1941         * gpgsm.c (main): Use the new function for import.
1943 2002-08-19  Werner Koch  <wk@gnupg.org>
1945         * decrypt.c (gpgsm_decrypt): Return a better error status token.
1946         * verify.c (gpgsm_verify): Don't error on messages with no signing
1947         time or no message digest.  This is only the case for messages
1948         without any signed attributes.
1950 2002-08-16  Werner Koch  <wk@gnupg.org>
1952         * certpath.c: Renamed to ..
1953         * certchain.c: this. Renamed all all other usages of "path" in the
1954         context of certificates to "chain".
1956         * call-agent.c (learn_cb): Special treatment when the issuer
1957         certificate is missing.
1959 2002-08-10  Werner Koch  <wk@gnupg.org>
1961         * Makefile.am (INCLUDES): Add definition for localedir.
1963         * keylist.c (list_cert_colon): Print the short fingerprint in the
1964         key ID field.
1965         * fingerprint.c (gpgsm_get_short_fingerprint): New.
1966         * verify.c (gpgsm_verify): Print more verbose info for a good
1967         signature.
1969 2002-08-09  Werner Koch  <wk@gnupg.org>
1971         * decrypt.c (prepare_decryption): Hack to detected already
1972         unpkcsedone keys.
1974         * gpgsm.c (emergency_cleanup): New.
1975         (main): Initialize the signal handler.
1977         * sign.c (gpgsm_sign): Reset the hash context for subsequent
1978         signers and release it at the end.
1980 2002-08-05  Werner Koch  <wk@gnupg.org>
1982         * server.c (cmd_signer): New command "SIGNER"
1983         (register_commands): Register it.
1984         (cmd_sign): Pass the signer list to gpgsm_sign.
1985         * certlist.c (gpgsm_add_to_certlist): Add SECRET argument, check
1986         for secret key if set and changed all callers.
1987         * sign.c (gpgsm_sign): New argument SIGNERLIST and implemt
1988         multiple signers.
1989         * gpgsm.c (main): Support more than one -u.
1990         
1991         * server.c (cmd_recipient): Return reason code 1 for No_Public_Key
1992         which is actually what gets returned from add_to_certlist.
1993         
1994 2002-07-26  Werner Koch  <wk@gnupg.org>
1996         * certcheck.c (gpgsm_check_cert_sig): Implement proper cleanup.
1997         (gpgsm_check_cms_signature): Ditto.
1999 2002-07-22  Werner Koch  <wk@gnupg.org>
2001         * keydb.c (keydb_add_resource): Register a lock file.
2002         (lock_all, unlock_all): Implemented.
2004         * delete.c: New.
2005         * gpgsm.c: Made --delete-key work.
2006         * server.c (cmd_delkeys): New.
2007         (register_commands): New command DELKEYS.
2009         * decrypt.c (gpgsm_decrypt): Print a convenience note when RC2 is
2010         used and a STATUS_ERROR with the algorithm oid.
2012 2002-07-03  Werner Koch  <wk@gnupg.org>
2014         * server.c (gpgsm_status2): Insert a blank between all optional
2015         arguments when using assuan.
2016         * server.c (cmd_recipient): No more need for extra blank in constants.
2017         * import.c (print_imported_status): Ditto.
2018         * gpgsm.c (main): Ditto.
2020 2002-07-02  Werner Koch  <wk@gnupg.org>
2022         * verify.c (gpgsm_verify): Extend the STATUS_BADSIG line with
2023         the fingerprint.
2025         * certpath.c (check_cert_policy): Don't use log_error to print a
2026         warning.
2028         * keydb.c (keydb_store_cert): Add optional ar EXISTED and changed
2029         all callers.
2030         * call-agent.c (learn_cb): Print info message only for real imports.
2032         * import.c (gpgsm_import): Moved duplicated code to ...
2033         (check_and_store): new function.  Added magic to import the entire
2034         chain. Print status only for real imports and moved printing code
2035         to ..
2036         (print_imported_status): New.
2038         * call-dirmngr.c (gpgsm_dirmngr_isvalid): print status of dirmngr
2039         call in very verbose mode.
2041         * gpgsm.c (main): Use the same error codes for STATUS_INV_RECP as
2042         with the server mode.
2044 2002-06-29  Werner Koch  <wk@gnupg.org>
2046         * gpgsm.c: New option --auto-issuer-key-retrieve.
2047         * certpath.c (find_up): Try to retrieve an issuer key from an
2048         external source and from the ephemeral key DB.
2049         (find_up_store_certs_cb): New.
2051         * keydb.c (keydb_set_ephemeral): Does now return the old
2052         state.  Call the backend only when required.
2054         * call-dirmngr.c (start_dirmngr): Use GNUPG_DEFAULT_DIRMNGR.
2055         (lookup_status_cb): Issue status only when CTRL is not NULL.
2056         (gpgsm_dirmngr_lookup): Document that CTRL is optional.
2058         * call-agent.c (start_agent): Use GNUPG_DEFAULT_AGENT.
2060 2002-06-28  Werner Koch  <wk@gnupg.org>
2062         * server.c (cmd_recipient): Add more reason codes.
2064 2002-06-27  Werner Koch  <wk@gnupg.org>
2066         * certpath.c (gpgsm_basic_cert_check): Use
2067         --debug-no-path-validation to also bypass this basic check.
2069         * gpgsm.c (main): Use GNUPG_DEFAULT_HOMEDIR constant.
2071         * call-agent.c (start_agent): Create and pass the list of FD to
2072         keep in the child to assuan.
2073         * call-dirmngr.c (start_dirmngr): Ditto.
2075 2002-06-26  Werner Koch  <wk@gnupg.org>
2077         * import.c (gpgsm_import): Print an STATUS_IMPORTED.
2079         * gpgsm.c: --debug-no-path-validation does not take an argument.
2081 2002-06-25  Werner Koch  <wk@gnupg.org>
2083         * certdump.c (print_dn_part): Always print a leading slash,
2084         removed NEED_DELIM arg and changed caller.
2086         * export.c (gpgsm_export): Print LFs to FP and not stdout.
2087         (print_short_info): Ditto.  Make use of gpgsm_print_name.
2089         * server.c (cmd_export): Use output-fd instead of data lines; this
2090         was actually the specified way.
2092 2002-06-24  Werner Koch  <wk@gnupg.org>
2094         * gpgsm.c: Removed duped help entry for --list-keys.
2095         
2096         * gpgsm.c, gpgsm.h: New option --debug-no-path-validation.
2098         * certpath.c (gpgsm_validate_path): Use it here instead of the
2099         debug flag hack.
2101         * certpath.c (check_cert_policy): Return No_Policy_Match if the
2102         policy file could not be opened.
2104 2002-06-20  Werner Koch  <wk@gnupg.org>
2106         * certlist.c (gpgsm_add_to_certlist): Fixed locating of a
2107         certificate with the required key usage.
2109         * gpgsm.c (main): Fixed a segv when using --outfile without an
2110         argument.
2112         * keylist.c (print_capabilities): Also check for non-repudiation
2113         and data encipherment.
2114         * certlist.c (cert_usage_p): Test for signing and encryption was
2115         swapped.  Add a case for certification usage, handle
2116         non-repudiation and data encipherment.
2117         (gpgsm_cert_use_cert_p): New.
2118         (gpgsm_add_to_certlist): Added a CTRL argument and changed all
2119         callers to pass it.
2120         * certpath.c (gpgsm_validate_path): Use it here to print a status
2121         message. Added a CTRL argument and changed all callers to pass it.
2122         * decrypt.c (gpgsm_decrypt): Print a status message for wrong key
2123         usage.
2124         * verify.c (gpgsm_verify): Ditto.
2125         * keydb.c (classify_user_id): Allow a colon delimited fingerprint.
2127 2002-06-19  Werner Koch  <wk@gnupg.org>
2129         * call-agent.c (learn_cb): Use log_info instead of log_error on
2130         successful import.
2132         * keydb.c (keydb_set_ephemeral): New.
2133         (keydb_store_cert): New are ephemeral, changed all callers.
2134         * keylist.c (list_external_cb): Store cert as ephemeral.
2135         * export.c (gpgsm_export): Kludge to export epehmeral certificates.
2137         * gpgsm.c (main): New command --list-external-keys.
2138         
2139 2002-06-17  Werner Koch  <wk@gnupg.org>
2141         * certreqgen.c (read_parameters): Improved error handling.
2142         (gpgsm_genkey): Print error message.
2144 2002-06-13  Werner Koch  <wk@gnupg.org>
2146         * gpgsm.c (main): New option --log-file.
2148 2002-06-12  Werner Koch  <wk@gnupg.org>
2150         * call-dirmngr.c (lookup_status_cb): New.
2151         (gpgsm_dirmngr_lookup): Use the status CB.  Add new arg CTRL and
2152         changed caller to pass it.
2154         * gpgsm.c (open_fwrite): New.
2155         (main): Allow --output for --verify.
2157         * sign.c (hash_and_copy_data): New.
2158         (gpgsm_sign): Implemented normal (non-detached) signatures.
2159         * gpgsm.c (main): Ditto.
2160         
2161         * certpath.c (gpgsm_validate_path): Special error handling for
2162         no policy match.
2164 2002-06-10  Werner Koch  <wk@gnupg.org>
2166         * server.c (get_status_string): Add STATUS_ERROR.
2168         * certpath.c (gpgsm_validate_path): Tweaked the error checking to 
2169         return error codes in a more sensitive way.
2170         * verify.c (gpgsm_verify): Send status TRUST_NEVER also for a bad
2171         CA certificate and when the certificate has been revoked.  Issue
2172         TRUST_FULLY even when the cert has expired.  Append an error token
2173         to these status lines.  Issue the new generic error status when a
2174         cert was not found and when leaving the function.
2176 2002-06-04  Werner Koch  <wk@gnupg.org>
2178         * gpgsm.c (main): New command --list-sigs
2179         * keylist.c (list_cert_std): New.  Use it whenever colon mode is
2180         not used.
2181         (list_cert_chain): New.
2183 2002-05-31  Werner Koch  <wk@gnupg.org>
2185         * gpgsm.c (main): Don't print the "go ahead" message for an
2186         invalid command.
2188 2002-05-23  Werner Koch  <wk@gnupg.org>
2190         * import.c (gpgsm_import): Add error messages.
2192 2002-05-21  Werner Koch  <wk@gnupg.org>
2194         * keylist.c (list_internal_keys): Renamed from gpgsm_list_keys.
2195         (list_external_keys): New.
2196         (gpgsm_list_keys): Dispatcher for above.
2197         * call-dirmngr.c (lookup_cb,pattern_from_strlist)
2198         (gpgsm_dirmngr_lookup): New.
2199         * server.c (option_handler): Handle new option --list-mode.
2200         (do_listkeys): Handle options and actually use the mode argument.
2201         (get_status_string): New code TRUNCATED.
2203         * import.c (gpgsm_import): Try to identify the type of input and
2204         handle certs-only messages.
2206 2002-05-14  Werner Koch  <wk@gnupg.org>
2208         * gpgsm.c: New option --faked-system-time
2209         * sign.c (gpgsm_sign): And use it here.
2210         * certpath.c (gpgsm_validate_path): Ditto.
2212 2002-05-03  Werner Koch  <wk@gnupg.org>
2214         * certpath.c (gpgsm_validate_path): Added EXPTIME arg and changed
2215         all callers.
2216         * verify.c (gpgsm_verify): Tweaked usage of log_debug and
2217         log_error.  Return EXPSIG status and add expiretime to VALIDSIG.
2219 2002-04-26  Werner Koch  <wk@gnupg.org>
2221         * gpgsm.h (DBG_AGENT,DBG_AGENT_VALUE): Replaced by DBG_ASSUAN_*.
2222         Changed all users.
2224         * call-agent.c (start_agent): Be more silent without -v.
2225         * call-dirmngr.c (start_dirmngr): Ditto.
2227 2002-04-25  Werner Koch  <wk@gnupg.org>
2229         * call-agent.c (start_agent): Make copies of old locales and check
2230         for setlocale.
2232 2002-04-25  Marcus Brinkmann  <marcus@g10code.de>
2234         * call-agent.c (start_agent): Fix error handling logic so the
2235         locale is always correctly reset.
2237 2002-04-25  Marcus Brinkmann  <marcus@g10code.de>
2239         * server.c (option_handler): Accept display, ttyname, ttytype,
2240         lc_ctype and lc_messages options.
2241         * gpgsm.c (main): Allocate memory for these options.
2242         * gpgsm.h (struct opt): Make corresponding members non-const.
2244 2002-04-24  Marcus Brinkmann  <marcus@g10code.de>
2246         * gpgsm.h (struct opt): New members display, ttyname, ttytype,
2247         lc_ctype, lc_messages.
2248         * gpgsm.c (enum cmd_and_opt_values): New members oDisplay,
2249         oTTYname, oTTYtype, oLCctype, oLCmessages.
2250         (opts): New entries for these options.
2251         (main): Handle these new options.
2252         * call-agent.c (start_agent): Set the various display and tty
2253         parameter after resetting.
2255 2002-04-18  Werner Koch  <wk@gnupg.org>
2257         * certreqgen.c (gpgsm_genkey): Write status output on success.
2259 2002-04-15  Werner Koch  <wk@gnupg.org>
2261         * gpgsm.c (main): Check ksba version.
2263         * certpath.c (find_up): New to use the authorithKeyIdentifier.
2264         Use it in all other functions to locate the signing cert..
2266 2002-04-11  Werner Koch  <wk@gnupg.org>
2268         * certlist.c (cert_usable_p): New.
2269         (gpgsm_cert_use_sign_p,gpgsm_cert_use_encrypt_p): New.
2270         (gpgsm_cert_use_verify_p,gpgsm_cert_use_decrypt_p): New.
2271         (gpgsm_add_to_certlist): Check the key usage.
2272         * sign.c (gpgsm_sign): Ditto.
2273         * verify.c (gpgsm_verify): Print a message wehn an unsuitable
2274         certificate was used.
2275         * decrypt.c (gpgsm_decrypt): Ditto
2276         * keylist.c (print_capabilities): Determine values from the cert.
2278 2002-03-28  Werner Koch  <wk@gnupg.org>
2280         * keylist.c (list_cert_colon): Fixed listing of crt record; the
2281         issuer is not at the right place.  Print a chainingID.
2282         * certpath.c (gpgsm_walk_cert_chain): Be a bit more silent on
2283         common errors.
2285 2002-03-21  Werner Koch  <wk@gnupg.org>
2287         * export.c: New.
2288         * gpgsm.c: Add command --export.
2289         * server.c (cmd_export): New.
2290         
2291 2002-03-13  Werner Koch  <wk@gnupg.org>
2293         * decrypt.c (gpgsm_decrypt): Allow multiple recipients.
2295 2002-03-12  Werner Koch  <wk@gnupg.org>
2297         * certpath.c (check_cert_policy): Print the policy list.
2299         * verify.c (gpgsm_verify): Detect certs-only message.
2301 2002-03-11  Werner Koch  <wk@gnupg.org>
2303         * import.c (gpgsm_import): Print a notice about imported certificates
2304         when in verbose mode.
2306         * gpgsm.c (main): Print INV_RECP status.
2307         * server.c (cmd_recipient): Ditto.
2309         * server.c (gpgsm_status2): New.  Allows for a list of strings.
2310         (gpgsm_status): Divert to gpgsm_status2.
2312         * encrypt.c (gpgsm_encrypt): Don't use a default key when no
2313         recipients are given.  Print a NO_RECP status.
2315 2002-03-06  Werner Koch  <wk@gnupg.org>
2317         * server.c (cmd_listkeys, cmd_listsecretkeys): Divert to
2318         (do_listkeys): new.  Add pattern parsing.
2320         * keylist.c (gpgsm_list_keys): Handle selection pattern.
2322         * gpgsm.c: New command --learn-card
2323         * call-agent.c (learn_cb,gpgsm_agent_learn): New.
2325         * gpgsm.c (main): Print error messages for non-implemented commands.
2327         * base64.c (base64_reader_cb): Use case insensitive compare of the
2328         Content-Type string to detect plain base-64.
2330 2002-03-05  Werner Koch  <wk@gnupg.org>
2332         * gpgsm.c, gpgsm.h: Add local_user.
2333         * sign.c (gpgsm_get_default_cert): New.
2334         (get_default_signer): Use the new function if local_user is not
2335         set otherwise used that value.
2336         * encrypt.c (get_default_recipient): Removed.
2337         (gpgsm_encrypt): Use gpgsm_get_default_cert.
2339         * verify.c (gpgsm_verify): Better error text for a bad signature
2340         found by comparing the hashs.
2342 2002-02-27  Werner Koch  <wk@gnupg.org>
2344         * call-dirmngr.c, call-agent.c: Add 2 more arguments to all uses
2345         of assuan_transact.
2347 2002-02-25  Werner Koch  <wk@gnupg.org>
2349         * server.c (option_handler): Allow to use -2 for "send all certs
2350         except the root cert".
2351         * sign.c (add_certificate_list): Implement it here.
2352         * certpath.c (gpgsm_is_root_cert): New.
2354 2002-02-19  Werner Koch  <wk@gnupg.org>
2356         * certpath.c (check_cert_policy): New.
2357         (gpgsm_validate_path): And call it from here.
2358         * gpgsm.c (main): New options --policy-file,
2359         --disable-policy-checks and --enable-policy-checks.
2360         * gpgsm.h (opt): Added policy_file, no_policy_checks.
2362 2002-02-18  Werner Koch  <wk@gnupg.org>
2364         * certpath.c (gpgsm_validate_path): Ask the agent to add the
2365         certificate into the trusted list.
2366         * call-agent.c (gpgsm_agent_marktrusted): New.
2368 2002-02-07  Werner Koch  <wk@gnupg.org>
2370         * certlist.c (gpgsm_add_to_certlist): Check that the specified
2371         name identifies a certificate unambiguously.
2372         (gpgsm_find_cert): Ditto.
2374         * server.c (cmd_listkeys): Check that the data stream is available.
2375         (cmd_listsecretkeys): Ditto.
2376         (has_option): New.
2377         (cmd_sign): Fix ambiguousity in option recognition.
2379         * gpgsm.c (main): Enable --logger-fd.
2381         * encrypt.c (gpgsm_encrypt): Increased buffer size for better
2382         performance.
2384         * call-agent.c (gpgsm_agent_pksign): Check the S-Exp received from
2385         the agent.
2387         * keylist.c (list_cert_colon): Filter out control characters.
2389 2002-02-06  Werner Koch  <wk@gnupg.org>
2391         * decrypt.c (gpgsm_decrypt): Bail out after an decryption error.
2393         * server.c (reset_notify): Close input and output FDs.
2394         (cmd_encrypt,cmd_decrypt,cmd_verify,cmd_sign.cmd_import)
2395         (cmd_genkey): Close the FDs and release the recipient list even in
2396         the error case.
2398 2002-02-01  Marcus Brinkmann  <marcus@g10code.de>
2400         * sign.c (gpgsm_sign): Do not release certificate twice.
2402 2002-01-29  Werner Koch  <wk@gnupg.org>
2404         * call-agent.c (gpgsm_agent_havekey): New.
2405         * keylist.c (list_cert_colon): New arg HAVE_SECRET, print "crs"
2406         when we know that the secret key is available.
2407         (gpgsm_list_keys): New arg MODE, check whether a secret key is
2408         available.  Changed all callers.
2409         * gpgsm.c (main): New command --list-secret-keys.
2410         * server.c (cmd_listsecretkeys): New.
2411         (cmd_listkeys): Return secret keys with "crs" record.
2413 2002-01-28  Werner Koch  <wk@gnupg.org>
2415         * certreqgen.c (create_request): Store the email address in the req.
2417 2002-01-25  Werner Koch  <wk@gnupg.org>
2419         * gpgsm.c (main): Disable core dumps.
2421         * sign.c (add_certificate_list): New.
2422         (gpgsm_sign): Add the certificates to the CMS object.
2423         * certpath.c (gpgsm_walk_cert_chain): New.
2424         * gpgsm.h (server_control_s): Add included_certs.
2425         * gpgsm.c: Add option --include-certs.
2426         (gpgsm_init_default_ctrl): New.
2427         (main): Call it.
2428         * server.c (gpgsm_server): Ditto.
2429         (option_handler): Support --include-certs.
2431 2002-01-23  Werner Koch  <wk@gnupg.org>
2433         * certpath.c (gpgsm_validate_path): Print the DN of a missing issuer.
2434         * certdump.c (gpgsm_dump_string): New.
2435         (print_dn): Replaced by above.
2437 2002-01-22  Werner Koch  <wk@gnupg.org>
2439         * certpath.c (unknown_criticals): New.
2440         (allowed_ca): New.
2441         (gpgsm_validate_path): Check validity, CA attribute, path length
2442         and unknown critical extensions.
2444 2002-01-21  Werner Koch  <wk@gnupg.org>
2446         * gpgsm.c: Add option --enable-crl-checks.
2448         * call-agent.c (start_agent): Implemented socket based access.
2449         * call-dirmngr.c (start_dirmngr): Ditto.
2451 2002-01-20  Werner Koch  <wk@gnupg.org>
2453         * server.c (option_handler): New.
2454         (gpgsm_server): Register it with assuan.
2456 2002-01-19  Werner Koch  <wk@gnupg.org>
2458         * server.c (gpgsm_server): Use assuan_deinit_server and setup
2459         assuan logging if enabled.
2460         * call-agent.c (inq_ciphertext_cb): Don't show the session key in
2461         an Assuan log file.
2463         * gpgsm.c (my_strusage): Take bugreport address from configure.ac
2465 2002-01-15  Werner Koch  <wk@gnupg.org>
2467         * import.c (gpgsm_import): Just do a basic cert check before
2468         storing it.
2469         * certpath.c (gpgsm_basic_cert_check): New.
2471         * keydb.c (keydb_store_cert): New.
2472         * import.c (store_cert): Removed and change all caller to use
2473         the new function.
2474         * verify.c (store_cert): Ditto.
2476         * certlist.c (gpgsm_add_to_certlist): Validate the path
2478         * certpath.c (gpgsm_validate_path): Check the trust list.
2479         * call-agent.c (gpgsm_agent_istrusted): New.
2481 2002-01-14  Werner Koch  <wk@gnupg.org>
2483         * call-dirmngr.c (inq_certificate): Changed for new interface semantic.
2484         * certlist.c (gpgsm_find_cert): New.
2486 2002-01-13  Werner Koch  <wk@gnupg.org>
2488         * fingerprint.c (gpgsm_get_certid): Print the serial and not the
2489         hash after the dot.
2491 2002-01-11  Werner Koch  <wk@gnupg.org>
2493         * call-dirmngr.c: New.
2494         * certpath.c (gpgsm_validate_path): Check the CRL here.
2495         * fingerprint.c (gpgsm_get_certid): New.
2496         * gpgsm.c: New options --dirmngr-program and --disable-crl-checks.
2498 2002-01-10  Werner Koch  <wk@gnupg.org>
2500         * base64.c (gpgsm_create_writer): Allow to set the object name
2502 2002-01-08  Werner Koch  <wk@gnupg.org>
2504         * keydb.c (spacep): Removed because it is now in util.c
2506         * server.c (cmd_genkey): New.
2507         * certreqgen.c: New.  The parameter handling code has been taken
2508         from gnupg/g10/keygen.c version 1.0.6.
2509         * call-agent.c (gpgsm_agent_genkey): New.
2511 2002-01-02  Werner Koch  <wk@gnupg.org>
2513         * server.c (rc_to_assuan_status): Removed and changed all callers
2514         to use map_to_assuan_status.
2516 2001-12-20  Werner Koch  <wk@gnupg.org>
2518         * verify.c (gpgsm_verify): Implemented non-detached signature
2519         verification.  Add OUT_FP arg, initialize a writer and changed all
2520         callers.
2521         * server.c (cmd_verify): Pass an out_fp if one has been set.
2523         * base64.c (base64_reader_cb): Try to detect an S/MIME body part.
2525         * certdump.c (print_sexp): Renamed to gpgsm_dump_serial, made
2526         global.
2527         (print_time): Renamed to gpgsm_dump_time, made global.
2528         (gpgsm_dump_serial): Take a real S-Expression as argument and
2529         print the first item.
2530         * keylist.c (list_cert_colon): Ditto.
2531         * keydb.c (keydb_search_issuer_sn): Ditto.
2532         * decrypt.c (print_integer_sexp): Removed and made callers 
2533         use gpgsm_dump_serial.
2534         * verify.c (print_time): Removed, made callers use gpgsm_dump_time.
2535         
2536 2001-12-19  Marcus Brinkmann  <marcus@g10code.de>
2538         * call-agent.c (start_agent): Add new argument to assuan_pipe_connect.
2540 2001-12-18  Werner Koch  <wk@gnupg.org>
2542         * verify.c (print_integer_sexp): Renamed from print_integer and
2543         print the serial number according to the S-Exp rules.
2544         * decrypt.c (print_integer_sexp): Ditto.
2546 2001-12-17  Werner Koch  <wk@gnupg.org>
2548         * keylist.c (list_cert_colon): Changed for new return value of
2549         get_serial.
2550         * keydb.c (keydb_search_issuer_sn): Ditto.
2551         * certcheck.c (gpgsm_check_cert_sig): Likewise for other S-Exp
2552         returingin functions.
2553         * fingerprint.c (gpgsm_get_keygrip): Ditto.
2554         * encrypt.c (encrypt_dek): Ditto
2555         * certcheck.c (gpgsm_check_cms_signature): Ditto
2556         * decrypt.c (prepare_decryption): Ditto.
2557         * call-agent.c (gpgsm_agent_pkdecrypt): Removed arg ciphertextlen,
2558         use KsbaSexp type and calculate the length.
2560         * certdump.c (print_sexp): Remaned from print_integer, changed caller.
2562         * Makefile.am: Use the LIBGCRYPT and LIBKSBA variables.
2564         * fingerprint.c (gpgsm_get_keygrip): Use the new
2565         gcry_pk_get_keygrip to calculate the grip - note the algorithm and
2566         therefore the grip values changed.
2568 2001-12-15  Werner Koch  <wk@gnupg.org>
2570         * certcheck.c (gpgsm_check_cms_signature): Removed the faked-key
2571         kludge.
2572         (gpgsm_create_cms_signature): Removed the commented fake key
2573         code.  This makes the function pretty simple.
2575         * gpgsm.c (main): Renamed the default key database to "keyring.kbx".
2577         * decrypt.c (gpgsm_decrypt): Write STATUS_DECRYPTION_*.
2578         * sign.c (gpgsm_sign): Write a STATUS_SIG_CREATED.
2580 2001-12-14  Werner Koch  <wk@gnupg.org>
2582         * keylist.c (list_cert_colon): Kludge to show an email address
2583         encoded in the subject's DN.
2585         * verify.c (gpgsm_verify): Add hash debug helpers
2586         * sign.c (gpgsm_sign): Ditto.
2588         * base64.c (base64_reader_cb): Reset the linelen when we need to
2589         skip the line and adjusted test; I somehow forgot about DeMorgan.
2591         * server.c (cmd_encrypt,cmd_decrypt,cmd_sign,cmd_verify) 
2592         (cmd_import): Close the FDs on success.
2593         (close_message_fd): New.
2594         (input_notify): Setting autodetect_encoding to 0 after initializing
2595         it to 0 is pretty pointless.  Easy to fix.
2597         * gpgsm.c (main): New option --debug-wait n, so that it is
2598         possible to attach gdb when used in server mode.
2600         * sign.c (get_default_signer): Use keydb_classify_name here.
2602 2001-12-14  Marcus Brinkmann  <marcus@g10code.de>
2604         * call-agent.c (LINELENGTH): Removed.
2605         (gpgsm_agent_pksign): Use ASSUAN_LINELENGTH, not LINELENGTH.
2606         (gpgsm_agent_pkdecrypt): Likewise.
2608 2001-12-13  Werner Koch  <wk@gnupg.org>
2610         * keylist.c (list_cert_colon): Print alternative names of subject
2611         and a few other values.
2613 2001-12-12  Werner Koch  <wk@gnupg.org>
2615         * gpgsm.c (main): New options --assume-{armor,base64,binary}. 
2616         * base64.c (base64_reader_cb): Fixed non-autodetection mode.
2618 2001-12-04  Werner Koch  <wk@gnupg.org>
2620         * call-agent.c (read_from_agent): Check for inquire responses.
2621         (request_reply): Handle them using a new callback arg, changed all
2622         callers.
2623         (gpgsm_agent_pkdecrypt): New.
2625 2001-11-27  Werner Koch  <wk@gnupg.org>
2627         * base64.c: New.  Changed all other functions to use this instead
2628         of direct creation of ksba_reader/writer.
2629         * gpgsm.c (main): Set ctrl.auto_encoding unless --no-armor is used.
2631 2001-11-26  Werner Koch  <wk@gnupg.org>
2633         * gpgsm.c: New option --agent-program
2634         * call-agent.c (start_agent): Allow to override the default path
2635         to the agent.
2637         * keydb.c (keydb_add_resource): Create keybox
2639         * keylist.c (gpgsm_list_keys): Fixed non-server keylisting.
2641         * server.c (rc_to_assuan_status): New.  Use it for all commands.
2643         
2644  Copyright 2001, 2002, 2003, 2004, 2005, 2006,
2645            2007, 2008, 2009 Free Software Foundation, Inc.
2647  This file is free software; as a special exception the author gives
2648  unlimited permission to copy and/or distribute it, with or without
2649  modifications, as long as this notice is preserved.
2651  This file is distributed in the hope that it will be useful, but
2652  WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
2653  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.