More support for Netkey cards.
[gnupg.git] / agent / ChangeLog
blob7c948e4c144d7b5c732a7f2ddf2dae6094d0d844
1 2009-04-14  Marcus Brinkmann  <marcus@g10code.de>
3         * call-pinentry.c (agent_get_confirmation): Try SETNOTOK command
4         with pinentry.
6 2009-04-01  Werner Koch  <wk@g10code.com>
8         * protect-tool.c (pe_opt): New.
9         (opts): Add option --agent-program.  Use ARGPARSE macros.
10         (get_new_passphrase): Remove.
11         (get_passphrase): Use gpg-agent directly. Remove arg OPT_CHECK and
12         change all callers.
13         * Makefile.am (gpg_protect_tool_LDADD): Replace pwquery_libs by
14         LIBASSUAN_LIBS.
15         (gpg_protect_tool_CFLAGS): New.
17         * command.c (percent_plus_unescape): Remove.
18         (cmd_putval): Use percent_plus_unescape_inplace.
19         * call-scd.c (unescape_status_string): Remove.
20         (card_getattr_cb): Use percent_plus_unescape.
21         * protect-tool.c (main): Use percent_plus_unescape from common/.
22         (percent_plus_unescape, percent_plus_unescape_string): Remove.
24 2009-03-27  Werner Koch  <wk@g10code.com>
26         * learncard.c (agent_handle_learn): Add new certtype 111.
28 2009-03-26  Werner Koch  <wk@g10code.com>
30         * agent.h (MAX_DIGEST_LEN): Change to 64.
31         * command.c (cmd_sethash): Allow digest length of 48 and 64.
32         (cmd_sethash): Allow more hash algos.
34         * trustlist.c (reformat_name): New.
35         (agent_marktrusted): Use a reformatted name.  Reload the table
36         before the update and always reload it at the end.
37         (agent_istrusted): Check early for the disabled flag.
39 2009-03-25  Werner Koch  <wk@g10code.com>
41         * pkdecrypt.c (agent_pkdecrypt): Return a specific error message
42         if the key is not available.
44         * gpg-agent.c (main): Print a started message to show the real pid.
46 2009-03-20  Werner Koch  <wk@g10code.com>
48         * learncard.c (struct kpinfo_cp_parm_s): Add field CTRL.
49         (struct certinfo_cb_parm_s): Ditto.
50         (agent_handle_learn): Set CTRL field.
51         (kpinfo_cb, certinfo_cb): Send progress status.
53         * agent.h (agent_write_status): Flag with GNUPG_GCC_A_SENTINEL.
55 2009-03-19  Werner Koch  <wk@g10code.com>
57         * trustlist.c (struct trustitem_s): Add field DISABLED.
58         (read_one_trustfile): Parse the '!' flag.
59         (agent_istrusted, agent_listtrusted): Check flag.
60         (agent_istrusted): Add arg R_DISABLED.  Change all callers.
61         (agent_marktrusted): Do not ask if flagged as disabled.  Reverse
62         the order of the questions.  Store the disabled flag.
63         
64         * gpg-agent.c (main): Save signal mask and open fds.  Restore mask
65         and close all fds prior to the exec.  Fixes bug#1013.
67 2009-03-17  Werner Koch  <wk@g10code.com>
69         * command.c (cmd_get_passphrase): Break repeat loop on error.
70         Show error message.
71         (cmd_getinfo): Add subcommand "cmd_has_option".
72         (command_has_option): New.
74 2009-03-17  Daiki Ueno  <ueno@unixuser.org>
76         * command.c (option_value): New function.
77         (cmd_get_passphrase): Accept new option --repeat, which makes
78         gpg-agent to ask passphrase several times.
80 2009-03-06  Werner Koch  <wk@g10code.com>
82         * command.c (cmd_keyinfo): New command.
83         (register_commands): Register it.
84         (agent_write_status): Make sure not to print LR or CR.
85         * divert-scd.c (ask_for_card): Factor shadow info parsing out to ...
86         * protect.c (parse_shadow_info): New.
87         * findkey.c (agent_key_from_file): Use make_canon_sexp.
88         (agent_write_private_key, unprotect, read_key_file)
89         (agent_key_available): Use bin2hex.
90         (agent_key_info_from_file): New.
91         (read_key_file): Log no error message for ENOENT.
93 2009-03-05  Werner Koch  <wk@g10code.com>
95         * divert-scd.c (getpin_cb): Support flag 'P'.  Change max_digits
96         from 8 to 16.  Append a message about keypads.
97         * findkey.c (unprotect): Change max digits to 16.
99 2009-03-02  Werner Koch  <wk@g10code.com>
101         * command.c (cmd_getinfo): Add subcommand "scd_running".
103         * call-scd.c (agent_scd_check_running): New.
105         * gpg-agent.c: Add missing option strings for "--batch" and
106         "--homedir".  Reported by Petr Uzel.
108         * protect-tool.c (import_p12_file): Take care of canceled
109         passphrase entry.  Fixes bug#1003.
110         (export_p12_file): Ditto.
112 2008-12-17  Werner Koch  <wk@g10code.com>
114         * gpg-agent.c (handle_connections): Set action of all pth event
115         handled signals to SIG_IGN.  Use a different pth_sigmask strategy.
117 2008-12-10  Werner Koch  <wk@g10code.com>
119         * command.c (cmd_get_passphrase): Implement option --no-ask.
121 2008-12-09  Werner Koch  <wk@g10code.com>
123         * gpg-agent.c (main): Call i18n_init before init_common_subsystems.
124         * preset-passphrase.c (main): Ditto.
125         * protect-tool.c (main): Ditto.
127         * command.c (cmd_preset_passphrase): Allow an arbitrary string for
128         the cache id.
130 2008-12-08  Werner Koch  <wk@g10code.com>
132         * gpg-agent.c (handle_connections): Sync the ticker to the next
133         full second.  This is bug#871.
135 2008-12-05  Werner Koch  <wk@g10code.com>
137         * minip12.c (decrypt_block): Fix const modified of CHARSETS.
138         * learncard.c (sinfo_cb_parm_s): Remove superflous semicolon.
139         Reported by Stoyan Angelov.
141 2008-11-18  Werner Koch  <wk@g10code.com>
143         * gpg-agent.c (make_libversion): New.
144         (my_strusage): Print libgcrypt version
146 2008-11-11  Werner Koch  <wk@g10code.com>
148         * call-scd.c (membuf_data_cb): Change return type to
149         assuan_error_t to avoid warnings with newer libassuan versions.
151 2008-11-04  Werner Koch  <wk@g10code.com>
153         * command.c (cmd_killagent): Stop the agent immediately.
154         (start_command_handler): Take care of GPG_ERR_EOF.
156 2008-10-29  Werner Koch  <wk@g10code.com>
158         * gpg-agent.c (main): Move USE_STANDARD_SOCKET to the outer scope.
159         (create_socket_name): Remove arg USE_STANDARD_SOCKET.  Change all
160         callers.
161         (create_server_socket): Remove IS_STANDARD_NAME and replace it by
162         USE_STANDARD_SOCKET.  Change all callers.
163         (check_own_socket_running): New.
164         (check_own_socket, check_own_socket_thread): New.
165         (handle_tick): Check server socket once a minute.
166         (handle_connections): Remove the extra pth_wait in the shutdown
167         case.
169 2008-10-20  Werner Koch  <wk@g10code.com>
171         * command.c (cmd_geteventcounter): Mark unused arg.
172         (cmd_listtrusted, cmd_pksign, cmd_pkdecrypt, cmd_genkey): Ditto.
173         (cmd_updatestartuptty, post_cmd_notify): Ditto.
174         * command-ssh.c (add_control_entry) 
175         (ssh_handler_request_identities, ssh_handler_remove_identity) 
176         (ssh_handler_remove_all_identities, ssh_handler_lock) 
177         (ssh_handler_unlock): Ditto.
178         * call-pinentry.c (pinentry_active_p, popup_message_thread) 
179         (agent_popup_message_stop): Ditto.
180         * findkey.c (agent_public_key_from_file): Ditto.
181         * genkey.c (check_passphrase_pattern): Ditto.
182         * call-scd.c (atfork_cb): Ditto.
183         * protect-tool.c (import_p12_cert_cb): Ditto.
184         * t-protect.c (main): Ditto.
186 2008-10-17  Werner Koch  <wk@g10code.com>
188         * call-scd.c (start_scd) [W32]: Use snprintf again because we now
189         always use the estream variant.
191 2008-10-15  Werner Koch  <wk@g10code.com>
193         * call-scd.c (start_scd): Enable assuan loggging if requested.
194         (agent_scd_check_aliveness) [W32]: Fix use of GetExitCodeProcess.
196 2008-10-14  Werner Koch  <wk@g10code.com>
198         * gpg-agent.c (get_agent_scd_notify_event): Need to use a manual
199         reset event.
201 2008-09-29  Werner Koch  <wk@g10code.com>
203         * agent.h (GCRY_MD_USER): Rename to GCRY_MODULE_ID_USER.
204         (GCRY_MD_USER_TLS_MD5SHA1): Rename to MD_USER_TLS_MD5SHA1 and
205         change all users.
207 2008-09-25  Werner Koch  <wk@g10code.com>
209         * divert-scd.c (getpin_cb): Support a Reset Code style PINs..
211 2008-09-03  Werner Koch  <wk@g10code.com>
213         * command.c (parse_keygrip): Use hex2bin.
214         (cmd_preset_passphrase): Decode the passphrase.  Reported by Kiss
215         Gabor.  Fixes #679 again.
216         * preset-passphrase.c (make_hexstring): Remove.
217         (preset_passphrase): Use bin2hex.
219 2008-05-27  Werner Koch  <wk@g10code.com>
221         * trustlist.c (insert_colons): Fix stupidly wrong allocation size
222         computation.
224 2008-05-26  Werner Koch  <wk@g10code.com>
226         * gpg-agent.c (main): Re-initialize default assuan log stream if a
227         log file is used.
229         * trustlist.c (agent_marktrusted): Use xtryasprintf and xfree.
231         * gpg-agent.c (main, agent_deinit_default_ctrl): Always use xfree
232         because our asprintf is mapped to an xmalloc style function in
233         util.h. Replace xstrdup by xtrystrdup.
234         * w32main.c (build_argv): Ditto.
235         * preset-passphrase.c (preset_passphrase): Ditto.
236         * divert-scd.c (ask_for_card): Ditto.
237         * command.c (option_handler): Ditto.
238         * command-ssh.c (ssh_handler_request_identities): Ditto.
239         * call-pinentry.c (start_pinentry): Ditto.
241         * gpg-agent.c (start_connection_thread)
242         (start_connection_thread_ssh): Use pth_thread_id for useful output
243         under W32.
244         (pth_thread_id) [!PTH_HAVE_PTH_THREAD_ID]: New.
246 2008-03-17  Werner Koch  <wk@g10code.com>
248         * agent.h (agent_inq_pinentry_launched): New prototype.
250         * call-pinentry.c: Include sys/types.h and signal.h.
252 2008-02-14  Werner Koch  <wk@g10code.com>
254         * command.c (agent_inq_pinentry_launched): New.
255         (option_handler): Add option allow-pinentry-notify.
256         * call-pinentry.c (getinfo_pid_cb): New.
257         (start_pinentry): Ask for the PID and notify the client.
259 2008-01-15  Marcus Brinkmann  <marcus@g10code.de>
261         * call-pinentry.c (start_pinentry): Start pinentry in detached
262         mode.
264 2007-12-04  Werner Koch  <wk@g10code.com>
266         * call-pinentry.c (agent_askpin): Use gnupg_get_help_string.
268 2007-12-03  Werner Koch  <wk@g10code.com>
270         * gpg-agent.c (main): s/standard_socket/use_standard_socket/ for
271         clarity.
272         (create_server_socket): New arg IS_SSH to avoid testing with
273         assuan commands.
275 2007-11-20  Werner Koch  <wk@g10code.com>
277         * gpg-agent.c (get_agent_scd_notify_event): New.
278         (handle_signal): Factor SIGUSR2 code out to:
279         (agent_sigusr2_action): .. New.
280         (agent_sighup_action): Print info message here and not in
281         handle_signal.
282         (handle_connections) [PTH_EVENT_HANDLE]: Call agent_sigusr2_action.
284         * call-scd.c (agent_scd_check_aliveness) [W32]: Implemented.
285         (start_scd) [W32]: Send event-signal option.
287 2007-11-19  Werner Koch  <wk@g10code.com>
289         * call-pinentry.c (agent_askpin): Set the tooltip for the quality
290         bar.
292 2007-11-15  Werner Koch  <wk@g10code.com>
294         * agent.h (struct server_control_s): Add XAUTHORITY and
295         PINENTRY_USER_DATA.
296         * gpg-agent.c: New option --xauthority.
297         (main, agent_init_default_ctrl) 
298         (agent_deinit_default_ctrl): Implemented
299         * command.c (cmd_updatestartuptty): Ditto.
300         * command-ssh.c (start_command_handler_ssh): Ditto.
301         * call-pinentry.c (atfork_cb): Set the environment.
302         (start_pinentry): Pass CTRL as arg to atfork_cb.
304 2007-11-14  Werner Koch  <wk@g10code.com>
306         * call-scd.c (start_scd) [W32]: Take care of fflush peculiarities.
308 2007-11-07  Werner Koch  <wk@g10code.com>
310         * agent.h: Remove errors.h.
312 2007-10-24  Werner Koch  <wk@g10code.com>
314         * genkey.c (check_passphrase_constraints): Changed the wording of
315         the warning messages.
317 2007-10-19  Werner Koch  <wk@g10code.com>
319         * protect-tool.c (get_passphrase): Use new utf8 switch fucntions.
321 2007-10-15  Daiki Ueno  <ueno@unixuser.org>  (wk)
323         * command-ssh.c (reenter_compare_cb): New function; imported from
324         genkey.c.
325         (ssh_identity_register): Ask initial passphrase twice.
327 2007-10-02  Werner Koch  <wk@g10code.com>
329         * command.c (cmd_getinfo): Add "pid" subcommand.
331 2007-10-01  Werner Koch  <wk@g10code.com>
333         * agent.h (struct server_control_s): Remove unused CONNECTION_FD.
335         * gpg-agent.c: Remove w32-afunix.h.  Include mkdtemp.h.
336         (socket_nonce, socket_nonce_ssh): New.
337         (create_server_socket): Use assuan socket wrappers.  Remove W32
338         specific stuff.  Save the server nonce.
339         (check_nonce): New.
340         (start_connection_thread, start_connection_thread_ssh): Call it.
341         (handle_connections): Change args to gnupg_fd_t.
342         * command.c (start_command_handler): Change LISTEN_FD to gnupg_fd_t.
343         * command-ssh.c (start_command_handler_ssh): Ditto.
345 2007-09-18  Werner Koch  <wk@g10code.com>
347         * agent.h (struct pin_entry_info_s): Add element WITH_QUALITYBAR.
348         * genkey.c (check_passphrase_constraints): New arg SILENT.
349         Changed all callers.
350         (agent_protect_and_store, agent_genkey): Enable qualitybar.
351         * call-pinentry.c (agent_askpin): Send that option.
352         (unescape_passphrase_string): New.
353         (inq_quality): New.
354         (estimate_passphrase_quality): New.
356 2007-09-14  Marcus Brinkmann  <marcus@g10code.de>
358         * call-pinentry.c (agent_popup_message_stop): Implement kill for
359         Windows.
361 2007-08-28  Werner Koch  <wk@g10code.com>
363         * gpg-agent.c (main): Add option --faked-system-time.
365         * protect-tool.c (read_and_unprotect): Print the protected-at date.
367         * agent.h (struct server_control_s): Add member IN_PASSWD.
368         * command.c (cmd_passwd): Set it.
369         * findkey.c (try_unprotect_cb): Use it.
371         * protect.c (do_encryption): Replace asprintf by xtryasprint.
372         (agent_protect): Create the protected-at item.
373         (agent_unprotect): Add optional arg PROTECTED_AT.
374         (merge_lists): Add args CUTOFF and CUTLEN.
375         (agent_unprotect): Use them.
376         * findkey.c (try_unprotect_cb): Add code to test for expired keys.
377         (unprotect): Allow changing the passphrase.
379 2007-08-27  Werner Koch  <wk@g10code.com>
381         * gpg-agent.c: Add options --min-passphrase-nonalpha,
382         --check-passphrase-pattern and --enforce-passphrase-constraints.
383         (MIN_PASSPHRASE_NONALPHA): Init nonalpha option to 1.
384         (main): Declare options for gpgconf.
385         * agent.h (struct): Add members MIN_PASSPHRASE_NONALPHA,
386         ENFORCE_PASSPHRASE_CONSTRAINTS and CHECK_PASSPHRASE_PATTERN.
387         * genkey.c (nonalpha_charcount): New.
388         (check_passphrase_pattern): New.
389         (check_passphrase_constraints): Implement.  Factor some code out...
390         (take_this_one_anyway, take_this_one_anyway2): .. New.
392         * call-pinentry.c (agent_show_message): New.
393         (agent_askpin): We better reset the pin buffer before asking.
395         * trustlist.c (insert_colons): New.
396         (agent_marktrusted): Pretty print the fpr.
398 2007-08-22  Werner Koch  <wk@g10code.com>
400         * findkey.c (O_BINARY): Make sure it is defined.
401         (agent_write_private_key): Use O_BINARY
403         * protect-tool.c (import_p12_file): Add hack to allow importing of
404         gnupg 2.0.4 generated files.
406 2007-08-06  Werner Koch  <wk@g10code.com>
408         * trustlist.c (read_one_trustfile): Add flag "cm".
409         (agent_istrusted): Ditto.
411 2007-08-02  Werner Koch  <wk@g10code.com>
413         * gpg-agent.c: Include gc-opt-flags.h and remove their definition
414         here.
416 2007-07-13  Werner Koch  <wk@g10code.com>
418         * genkey.c (check_passphrase_constraints): Require a confirmation
419         for an empty passphrase.
420         (agent_genkey, agent_protect_and_store): No need to repeat an
421         empty passphrase.
423 2007-07-05  Werner Koch  <wk@g10code.com>
425         * call-scd.c (struct inq_needpin_s): New.
426         (inq_needpin): Pass unknown inquiries up.
428 2007-07-04  Werner Koch  <wk@g10code.com>
430         * gpg-agent.c (TIMERTICK_INTERVAL): New.
431         (fixed_gcry_pth_init, main): Kludge to fix Pth initialization.
433 2007-07-03  Werner Koch  <wk@g10code.com>
435         * gpg-agent.c (handle_connections): Do not use FD_SETSIZE for
436         select but compute the correct number.
438 2007-07-02  Werner Koch  <wk@g10code.com>
440         * command.c (cmd_reloadagent) [W32]: New.
441         (register_commands) [W32]: New command RELOADAGENT.
443         * Makefile.am (gpg_agent_SOURCES): Remove w32main.c and w32main.h.
444         (gpg_agent_res_ldflags): Remove icon file as we don't have a
445         proper icon yet.
446         * gpg-agent.c (main): do not include w32main.h.  Remove all calls
447         to w32main.c.
448         (agent_sighup_action): New.
449         (handle_signal): Use it.
451 2007-06-26  Werner Koch  <wk@g10code.com>
453         * gpg-agent.c (create_directories) [W32]: Made it work.
455 2007-06-21  Werner Koch  <wk@g10code.com>
457         * agent.h (ctrl_t): Remove.  It is now declared in ../common/util.h. 
459         * gpg-agent.c (check_for_running_agent): New arg SILENT.  Changed
460         all callers.
461         (create_server_socket): If the standard socket is in use check
462         whether a agent is running and avoid starting another one.
464 2007-06-18  Marcus Brinkmann  <marcus@g10code.de>
466         * gpg-agent.c (main): Percent escape pathname in --gpgconf-list
467         output.
469 2007-06-18  Werner Koch  <wk@g10code.com>
471         * w32main.c (build_argv): New.
472         (WinMain): Use it.
474         * command.c (cmd_killagent) [W32]: New.
475         (cmd_getinfo): New.
476         * gpg-agent.c (get_agent_ssh_socket_name): New.
477         (no_force_standard_socket) New.
478         (create_server_socket): Use it.
479         * Makefile.am (gpg_agent_res_ldflags): Pass windows option to ld.
481 2007-06-14  Werner Koch  <wk@g10code.com>
483         * protect-tool.c (main): Setup default socket name for
484         simple-pwquery.
485         (MAP_SPWQ_ERROR_IMPL): New.  Use map_spwq_error for spqw related
486         error codes.
487         * preset-passphrase.c (main): Setup default socket name for
488         simple-pwquery.
489         (map_spwq_error): Remove.
490         (MAP_SPWQ_ERROR_IMPL): New.  
492         * call-pinentry.c (start_pinentry): Use gnupg_module_name.
493         * call-scd.c (start_scd): Ditto.
495 2007-06-12  Werner Koch  <wk@g10code.com>
497         * taskbar.c: New.
499         * trustlist.c (read_one_trustfile): Replace GNUPG_SYSCONFDIR by a
500         function call.
501         (read_trustfiles): Ditto.
503         * gpg-agent.c (main): Replace some calls by init_common_subsystems.
504         * preset-passphrase.c (main): Ditto.
505         * protect-tool.c (main): Ditto.
507 2007-06-11  Werner Koch  <wk@g10code.com>
509         * Makefile.am (common_libs): Use libcommonstd macro.
510         (commonpth_libs): Use libcommonpth macro.
512         * protect-tool.c (main) [W32]: Call pth_init.
514         * preset-passphrase.c (main) [W32]: Replace the explicit Winsocket
515         init by a call to pth_init.
517         * trustlist.c (initialize_module_trustlist): New.
518         * gpg-agent.c (main): Call it.
520         * call-pinentry.c (initialize_module_query): Rename to
521         initialize_module_call_pinentry.
523         * minip12.c: Remove iconv.h. Add utf8conf.h.  Changed all iconv
524         calss to use these jnlib wrappers.
526 2007-06-06  Werner Koch  <wk@g10code.com>
528         * minip12.c (enum): Rename CONTEXT to ASNCONTEXT as winnt.h
529         defines such a symbol to access the process context.
531         * call-pinentry.c (dump_mutex_state) [W32]: Handle the W32Pth case.
532         * call-scd.c (dump_mutex_state): Ditto.
534         * protect-tool.c (i18n_init): Remove.
535         * preset-passphrase.c (i18n_init): Remove.
536         * gpg-agent.c (i18n_init): Remove.
538 2007-05-19  Marcus Brinkmann  <marcus@g10code.de>
540         * protect-tool.c (get_passphrase): Free ORIG_CODESET on error.
542 2007-05-14  Werner Koch  <wk@g10code.com>
544         * protect.c (make_shadow_info): Replace sprintf by smklen.
546 2007-04-20  Werner Koch  <wk@g10code.com>
548         * gpg-agent.c (my_gcry_logger, my_gcry_outofcore_handler): Removed.
549         (main): Call the setup_libgcrypt_logging helper.
550         * protect-tool.c (my_gcry_logger): Removed.
551         (main): Call the setup_libgcrypt_logging helper.
552         
553 2007-04-03  Werner Koch  <wk@g10code.com>
555         * trustlist.c (read_trustfiles): Take a missing trustlist as an
556         empty one.
558 2007-03-20  Werner Koch  <wk@g10code.com>
560         * protect-tool.c: New option --p12-charset. 
561         * minip12.c (p12_build): Implement it.
563 2007-03-19  Werner Koch  <wk@g10code.com>
565         * minip12.c: Include iconv.h.
566         (decrypt_block): New.
567         (parse_bag_encrypted_data, parse_bag_data): Use it here.
568         (bag_data_p, bag_decrypted_data_p): New helpers.
570 2007-03-06  Werner Koch  <wk@g10code.com>
572         * gpg-agent.c (main) <gpgconf>: Add entries for all ttl options.
574 2007-02-20  Werner Koch  <wk@g10code.com>
576         * call-pinentry.c (start_pinentry): Fix for OS X to allow loading
577         of the bundle.  Tested by Benjamin Donnachie.
579 2007-02-14  Werner Koch  <wk@g10code.com>
581         * gpg-agent.c: New option --pinentry-touch-file.
582         (get_agent_socket_name): New.
583         * agent.h (opt):  Add pinentry_touch_file.
584         * call-pinentry.c (start_pinentry): Send new option to the
585         pinentry.
587 2007-01-31  Moritz Schulte  <moritz@g10code.com>  (wk)
589         * command-ssh.c (stream_read_string): Initialize LENGTH to zero.
590         (start_command_handler_ssh): Use es_fgetc/es_ungetc to check if
591         EOF has been reached before trying to process another request.
593 2007-01-31  Werner Koch  <wk@g10code.com>
595         * command-ssh.c (start_command_handler_ssh): 
597         * Makefile.am (t_common_ldadd): Add LIBICONV.
599 2007-01-25  Werner Koch  <wk@g10code.com>
601         * genkey.c (check_passphrase_constraints): Get ngettext call right
602         and use UTF-8 aware strlen.
604         * protect-tool.c (get_passphrase): New arg OPT_CHECK.
605         (get_new_passphrase): Enable OPT_CHECK on the first call.
606         * command.c (cmd_get_passphrase): Implement option --check.
608 2007-01-24  Werner Koch  <wk@g10code.com>
610         * gpg-agent.c (MIN_PASSPHRASE_LEN): New
611         (parse_rereadable_options): New option  --min-passphrase-len.
612         * genkey.c (check_passphrase_constraints): New.
613         (agent_genkey, agent_protect_and_store): Call new function.  Fix
614         memory leak.
616         * call-pinentry.c (agent_askpin): Allow translation of the displayed
617         error message.
618         (agent_popup_message_start): Remove arg CANCEL_BTN.
619         (popup_message_thread): Use --one-button option.
621         * command.c (cmd_passwd): Now that we don't distinguish between
622         assuan and regular error codes we can jump to the end on error.
624 2006-12-07  David Shaw  <dshaw@jabberwocky.com>
626         * Makefile.am: Link to iconv for jnlib dependency.
628 2006-11-20  Werner Koch  <wk@g10code.com>
630         * call-pinentry.c (agent_popup_message_stop): Use SIGKILL.
631         * call-scd.c (inq_needpin): Implement POPUPKEYPADPROMPT and
632         DISMISSKEYPADPROMPT.
634 2006-11-15  Werner Koch  <wk@g10code.com>
636         * protect.c (make_shadow_info): Cast printf arg to unsigned int.
637         * minip12.c (parse_bag_encrypted_data): Ditto.
638         (parse_bag_data, p12_parse): Ditto.
639         * command-ssh.c (ssh_identity_register): Changed buffer_n to
640         size_t.
642         * agent.h (struct server_control_s): New field thread_startup.
643         * command.c (start_command_handler): Moved CTRL init code to ..
644         * gpg-agent.c (start_connection_thread): .. here.
645         (agent_deinit_default_ctrl): New.
646         (agent_init_default_ctrl): Made static.
647         (handle_connections): Allocate CTRL and pass it pth_spawn.
648         * command-ssh.c (start_command_handler_ssh): Moved CTRL init code
649         to ..
650         * gpg-agent.c (start_connection_thread_ssh): .. here.
652 2006-11-14  Werner Koch  <wk@g10code.com>
654         * command.c (bump_key_eventcounter): New.
655         (bump_card_eventcounter): New.
656         (cmd_geteventcounter): New command.
657         * gpg-agent.c (handle_signal): Call bump_card_eventcounter.
658         * findkey.c (agent_write_private_key): Call bump_key_eventcounter.
659         * trustlist.c (agent_reload_trustlist): Ditto.
661         * command.c (post_cmd_notify, io_monitor): New.
662         (register_commands, start_command_handler): Register them.
664 2006-11-09  Werner Koch  <wk@g10code.com>
666         * gpg-agent.c (main): In detached mode connect standard
667         descriptors to /dev/null.
669         * trustlist.c (read_trustfiles): Make sure not to pass a zero size
670         to realloc as the C standards says that this behaves like free.
672 2006-11-06  Werner Koch  <wk@g10code.com>
674         * protect-tool.c (my_strusage): Fixed typo.
676 2006-10-23  Werner Koch  <wk@g10code.com>
678         * gpg-agent.c (main): New command --gpgconf-test.
680         * minip12.c (parse_bag_encrypted_data, parse_bag_data): Allow for
681         a salt of 20 bytes.
683 2006-10-20  Werner Koch  <wk@g10code.com>
685         * Makefile.am (t_common_ldadd): Use GPG_ERROR_LIBS instead -o just -l
687 2006-10-19  Werner Koch  <wk@g10code.com>
689         * findkey.c (unprotect): Use it to avoid unnecessary calls to
690         agent_askpin.
691         * call-pinentry.c (pinentry_active_p): New.
693 2006-10-17  Werner Koch  <wk@g10code.com>
695         * Makefile.am (gpg_agent_LDADD): Link to libcommonpth.
696         (gpg_agent_CFLAGS): New.  This allows to only link this with Pth.
698 2006-10-16  Werner Koch  <wk@g10code.com>
700         * call-pinentry.c (agent_get_confirmation): Map Cancel code here too.
701         * trustlist.c (agent_marktrusted): Return Cancel instead of
702         Not_Confirmed for the first question.
704 2006-10-12  Werner Koch  <wk@g10code.com>
706         * protect-tool.c (get_passphrase): Fix if !HAVE_LANGINFO_CODESET.
708 2006-10-06  Werner Koch  <wk@g10code.com>
710         * Makefile.am (AM_CFLAGS): Use PTH version of libassuan.
711         (gpg_agent_LDADD): Ditto.
713         * divert-scd.c (divert_pksign): Use PKAUTH for the TLS algo.
715 2006-10-05  Werner Koch  <wk@g10code.com>
717         * command.c (has_option_name): New.
718         (cmd_sethash): New --hash option.
719         * pksign.c (do_encode_raw_pkcs1): New.
720         (agent_pksign_do): Use it here for the TLS algo.
721         * agent.h (GCRY_MD_USER_TLS_MD5SHA1): New.
722         * divert-scd.c (pksign): Add case for tls-md5sha1.
723         
724         * divert-scd.c (encode_md_for_card): Check that the algo is valid.
726 2006-10-04  Werner Koch  <wk@g10code.com>
728         * call-pinentry.c (agent_get_passphrase): Changed to return the
729         unencoded passphrase.
730         (agent_askpin, agent_get_passphrase, agent_get_confirmation): Need
731         to map the cancel error.
732         * command.c (send_back_passphrase): New.
733         (cmd_get_passphrase): Use it here.  Also implement --data option.
734         (skip_options): New.
736 2006-09-26  Werner Koch  <wk@g10code.com>
738         * learncard.c (agent_handle_learn): Send back the keypair
739         information.
741 2006-09-25  Werner Koch  <wk@g10code.com>
743         * trustlist.c (read_one_trustfile): Allow extra flags.
744         (struct trustitem_s): Replaced KEYFLAGS by a FLAGS struct.
745         Changed all code to use this.
746         (agent_istrusted): New arg CTRL. Changed all callers.  Send back
747         flags.
748         * command.c (agent_write_status): New.
750 2006-09-20  Werner Koch  <wk@g10code.com>
752         * Makefile.am: Changes to allow parallel make runs.
754 2006-09-15  Werner Koch  <wk@g10code.com>
756         * trustlist.c: Entirely rewritten.
757         (agent_trustlist_housekeeping): Removed and removed all calls.
759 2006-09-14  Werner Koch  <wk@g10code.com>
761         Replaced all call gpg_error_from_errno(errno) by
762         gpg_error_from_syserror().
764         * call-pinentry.c (start_pinentry): Replaced pipe_connect2 by
765         pipe_connect_ext.
766         * call-scd.c (start_scd): Ditto.
767         * command.c (start_command_handler): Replaced
768         init_connected_socket_server by init_socket_server_ext.
770 2006-09-13  Werner Koch  <wk@g10code.com>
772         * preset-passphrase.c (main) [W32]: Check for WSAStartup error.
774 2006-09-08  Werner Koch  <wk@g10code.com>
776         * call-scd.c: Add signal.h as we are referencing SIGUSR2.
778 2006-09-06  Marcus Brinkmann  <marcus@g10code.de>
780         * Makefile.am (AM_CFLAGS): Add $(GPG_ERR_CFLAGS).
781         (gpg_agent_LDADD): Replace -lgpg-error with $(GPG_ERROR_LIBS).
783 2006-09-06  Werner Koch  <wk@g10code.com>
785         * query.c: Renamed to ..
786         * call-pinentry.c: .. this.
788         * agent.h (out_of_core): Removed.
789         (CTRL): Removed and changed everywhere to ctrl_t.
791         Replaced all Assuan error codes by libgpg-error codes.  Removed
792         all map_to_assuan_status and map_assuan_err.
793         
794         * gpg-agent.c (main): Call assuan_set_assuan_err_source to have Assuan
795         switch to gpg-error codes.
796         * command.c (set_error): Adjusted.
798 2006-09-04  Werner Koch  <wk@g10code.com>
800         * command.c (percent_plus_unescape): New.
801         (cmd_get_val, cmd_putval): New.
803 2006-08-29  Werner Koch  <wk@g10code.com>
805         * command-ssh.c (stream_read_mpi): Sanity check for early
806         detecting of too large keys.
807         * gpg-agent.c (my_gcry_outofcore_handler): New.
808         (main): Register it.
809         (main): No allocate 32k secure memory (was 16k).
811 2006-07-31  Werner Koch  <wk@g10code.com>
813         * preset-passphrase.c (make_hexstring): For consistency use
814         xtrymalloc and changed caller to use xfree.  Fixed function
815         comment.
817 2006-07-29  Marcus Brinkmann  <marcus@g10code.de>
819         * preset-passphrase.c (preset_passphrase): Do not strip off last
820         character of passphrase.
821         (make_hexstring): New function.
822         * command.c (cmd_preset_passphrase): Use parse_hexstring to syntax
823         check passphrase argument.  Truncate passphrase at delimiter.
825 2006-07-24  Werner Koch  <wk@g10code.com>
827         * minip12.c (build_key_bag): New args SHA1HASH and
828         KEYIDSTR. Append bag Attributes if these args are given.
829         (build_cert_sequence): ditto.
830         (p12_build): Calculate certificate hash and pass to build
831         functions.
833 2006-07-21  Werner Koch  <wk@g10code.com>
835         * minip12.c (oid_pkcs_12_keyBag): New.
836         (parse_bag_encrypted_data): New arg R_RESULT. Support keybags and
837         return the key object. 
838         (p12_parse): Take new arg into account.  Free RESULT on error.
840 2006-06-26  Werner Koch  <wk@g10code.com>
842         * gpg-agent.c (handle_signal): Print info for SIGUSR2 only in
843         verbose mode.
845 2006-06-22  Werner Koch  <wk@g10code.com>
847         * command-ssh.c (make_cstring): Use memcpy instead of strncpy.
848         (ssh_receive_mpint_list, sexp_key_extract, data_sign): Use
849         xtrycalloc instead of xtrymalloc followed by memset.
851 2006-06-20  Werner Koch  <wk@g10code.com>
853         * minip12.c (create_final): New arg PW. Add code to calculate the
854         MAC.
856 2006-06-09  Marcus Brinkmann  <marcus@g10code.de>
858         * Makefile.am (gpg_agent_LDADD): Add $(NETLIBS).
859         (gpg_protect_tool_LDADD): Likewise.
860         (gpg_preset_passphrase_LDADD): Likewise.
862 2006-04-09  Moritz Schulte  <moritz@g10code.com>
864         * command-ssh.c (ssh_request_process): Removed FIXME mentioning a
865         possible DoS attack.
867 2006-04-01  Moritz Schulte  <moritz@g10code.com>
869         * command-ssh.c (ssh_identity_register): Make KEY_GRIP_RAW be 20
870         instead of 21 bytes long; do not fill KEY_GRIP_RAW[20] with NUL
871         byte - KEY_GRIP_RAW is a raw binary string anyway.
873 2006-02-09  Werner Koch  <wk@g10code.com>
875         * call-scd.c (struct scd_local_s): New field next_local.
876         (scd_local_list): New.
877         (start_scd): Put new local into list.
878         (agent_reset_scd): Remove it from the list.
879         (agent_scd_check_aliveness): Here is the actual reason why we need
880         all this stuff.
881         (agent_reset_scd): Send the new command RESTART instead of RESET.
883 2005-12-16  Werner Koch  <wk@g10code.com>
885         * minip12.c (cram_octet_string): New
886         (p12_parse): Use it for NDEFed bags.
887         (parse_bag_data): Ditto.
888         (string_to_key, set_key_iv, crypt_block): New arg SALTLEN.
889         (p12_build): Use old value 8 for new arg.
890         (parse_bag_encrypted_data, parse_bag_data): Allow for salts of 8
891         to 16 bytes.  Add new arg R_CONSUMED.
893 2005-11-24  Werner Koch  <wk@g10code.com>
895         * minip12.c (p12_parse): Fixed for case that the key object comes
896         prior to the certificate.
898 2005-10-19  Werner Koch  <wk@g10code.com>
900         * divert-scd.c (getpin_cb): Hack to use it for a keypad message.
902         * call-scd.c (inq_needpin): Reworked to support the new KEYPADINFO.
904         * query.c (start_pinentry): Keep track of the owner.
905         (popup_message_thread, agent_popup_message_start) 
906         (agent_popup_message_stop, agent_reset_query): New.
907         * command.c (start_command_handler): Make sure a popup window gets
908         closed.
910 2005-10-08  Marcus Brinkmann  <marcus@g10code.de>
912         * Makefile.am (gpg_protect_tool_LDADD): Add ../gl/libgnu.a.
913         (gpg_preset_passphrase_LDADD, t_common_ldadd): Likewise.
914         (gpg_agent_LDADD): Add ../gl/libgnu.a after ../common/libcommon.a.
916 2005-09-16  Werner Koch  <wk@g10code.com>
918         * minip12.c (build_key_sequence, build_cert_sequence): Fixed
919         padding.
921 2005-09-15  Moritz Schulte  <moritz@g10code.com>
923         * t-protect.c (test_agent_protect): Implemented.
924         (main): Disable use of secure memory.
926 2005-09-09  Werner Koch  <wk@g10code.com>
928         * minip12.c (p12_build): Oops, array needs to be larger for the
929         certificate.
930         (build_cert_bag): Fixed yesterdays change.
932         * command-ssh.c (card_key_available): Let the card handler decide
933         whether the card is supported here.  Also get a short serial
934         number to return from the card handler.
936 2005-09-08  Werner Koch  <wk@g10code.com>
938         * minip12.c (build_cert_bag): Use a non constructed object.
939         i.e. 0x80 and not 0xa0.
941 2005-08-16  Werner Koch  <wk@g10code.com>
943         * gpg-agent.c (main): Use a default file name for --write-env-file.
945 2005-07-25  Werner Koch  <wk@g10code.com>
947         * findkey.c (agent_public_key_from_file): Fixed array assignment.
948         This was the cause for random segvs.
950 2005-06-29  Werner Koch  <wk@g10code.com>
952         * command-ssh.c (data_sign): Removed empty statement.
954 2005-06-21  Werner Koch  <wk@g10code.com>
956         * minip12.c (create_final): Cast size_t to ulong for printf. 
957         (build_key_bag, build_cert_bag, build_cert_sequence): Ditto.
959 2005-06-16  Werner Koch  <wk@g10code.com>
961         * protect-tool.c (make_advanced): Makde RESULT a plain char.
962         * call-scd.c (unescape_status_string): Need to cast unsigned char*
963         for strcpy.
964         (agent_card_pksign): Made arg R_BUF an unsigned char**.
965         * divert-scd.c (divert_pksign): Made SIGVAL unsigned char*.
966         (encode_md_for_card): Initialize R_VAL and R_LEN.
967         * genkey.c (store_key): Made BUF unsigned.
968         * protect.c (do_encryption): Ditto.
969         (do_encryption): Made arg PROTBEGIN unsigned. Initialize RESULT
970         and RESULTLEN even on error.
971         (merge_lists): Need to cast unsigned char * for strcpy. Initialize 
972         RESULTand RESULTLEN even on error.
973         (agent_unprotect): Likewise for strtoul.
974         (make_shadow_info): Made P and INFO plain char.
975         (agent_shadow_key): Made P plain char.
977 2005-06-15  Werner Koch  <wk@g10code.com>
979         * query.c (agent_get_passphrase): Made HEXSTRING a char*.
980         * command-ssh.c (ssh_key_grip): Made arg BUFFER unsigned.
981         (ssh_key_grip): Simplified.
982         (data_sign): Initialize variables with the definition.
983         (ssh_convert_key_to_blob): Make sure that BLOB and BLOB_SIZE
984         are set to NULL on error.  Cool, gcc-4 detects uninitialized stuff
985         beyond function boundaries; well it can't know that we do error
986         proper error handling so that this was not a real error.
987         (file_to_buffer): Likewise for BUFFER and BUFFER_N.
988         (data_sign): Likewise for SIG and SIG_N.
989         (stream_read_byte): Set B to a value even on error.
990         * command.c (cmd_genkey): Changed VALUE to char.
991         (cmd_readkey): Cast arg for gcry_sexp_sprint.
992         * agent.h (struct server_control_s): Made KEYGRIP unsigned.
994 2005-06-13  Werner Koch  <wk@g10code.com>
996         * command-ssh.c (start_command_handler_ssh): Reset the SCD.
998 2005-06-09  Werner Koch  <wk@g10code.com>
1000         * gpg-agent.c (create_socket_name): New option --max-cache-ttl-ssh.
1001         * cache.c (housekeeping): Use it.
1002         (agent_put_cache): Use a switch to get the default ttl so that it
1003         is easier to add more cases.
1005 2005-06-06  Werner Koch  <wk@g10code.com>
1007         * gpg-agent.c: New option --default-cache-ttl-ssh.
1008         * agent.h (cache_mode_t): New.
1009         * pksign.c (agent_pksign_do): New arg CACHE_MODE to replace the
1010         ARG IGNORE_CACHE. Changed all callers.
1011         (agent_pksign): Ditto.
1012         * findkey.c (agent_key_from_file): Ditto. Canged all callers.
1013         (unprotect): Ditto.
1014         * command-ssh.c (data_sign): Use CACHE_MODE_SSH.
1015         * cache.c (agent_get_cache): New arg CACHE_MODE.
1016         (agent_put_cache): Ditto.  Store it in the cache.
1018         * query.c (agent_query_dump_state, dump_mutex_state): New.
1019         (unlock_pinentry): Reset the global context before releasing the
1020         mutex.
1021         * gpg-agent.c (handle_signal): Dump query.c info on SIGUSR1.
1023         * call-scd.c (agent_scd_check_aliveness): Always do a waitpid and
1024         add a timeout to the locking.
1026 2005-06-03  Werner Koch  <wk@g10code.com>
1028         * command.c (cmd_updatestartuptty): New.
1030         * gpg-agent.c: New option --write-env-file.
1031         
1032         * gpg-agent.c (handle_connections): Make sure that the signals we
1033         are handling are not blocked.Block signals while creating new
1034         threads.
1036 2005-06-02  Werner Koch  <wk@g10code.com>
1038         * call-scd.c (agent_scd_dump_state, dump_mutex_state): New.
1039         * gpg-agent.c (handle_signal): Print it on SIGUSR1.
1040         (handle_connections): Include the file descriptor into the
1041         threadnames.
1043 2005-06-01  Werner Koch  <wk@g10code.com>
1045         * gpg-agent.c: Include setenv.h.
1047 2005-05-31  Werner Koch  <wk@g10code.com>
1049         * agent.h (out_of_core): s/__inline__/inine.  Noted by Ray Link.
1051 2005-05-25  Werner Koch  <wk@g10code.com>
1053         * gpg-agent.c (main): Do not unset the DISPLAY when we are
1054         continuing as child.
1056 2005-05-24  Werner Koch  <wk@g10code.com>
1058         * call-scd.c (inq_needpin): Skip leading spaces in of PIN
1059         description.
1060         * divert-scd.c (getpin_cb): Enhanced to cope with description
1061         flags.
1062         * query.c (agent_askpin): Add arg PROMPT_TEXT. Changed all
1063         callers.
1065 2005-05-21  Werner Koch  <wk@g10code.com>
1067         * call-scd.c (start_scd): Don't test for an alive scdaemon here.
1068         (agent_scd_check_aliveness): New.
1069         * gpg-agent.c (handle_tick): Test for an alive scdaemon.
1070         (handle_signal): Print thread info on SIGUSR1.
1072 2005-05-20  Werner Koch  <wk@g10code.com>
1074         * protect-tool.c: New option --canonical.
1075         (show_file): Implement it.
1077         * keyformat.txt: Define the created-at attribute for keys.
1079 2005-05-18  Werner Koch  <wk@g10code.com>
1081         * divert-scd.c (ask_for_card): Removed the card reset kludge.
1083 2005-05-17  Werner Koch  <wk@g10code.com>
1085         * call-scd.c (unlock_scd): Add new arg CTRL. Changed all callers.
1086         (start_scd): Reoworked to allow for additional connections.
1087         * agent.h (ctrl_t): Add local data for the SCdaemon.
1088         * command.c (start_command_handler): Release SERVER_LOCAL.
1090         * gpg-agent.c (create_server_socket): Use xmalloc.
1091         (main): Removed option --disable-pth a dummy.  Removed non-pth
1092         code path.
1093         (cleanup_sh): Removed.  Not needed anymore.
1095 2005-05-05  Moritz Schulte  <moritz@g10code.com>
1097         * command-ssh.c (ssh_key_to_buffer): Rename to ...
1098         (ssh_key_to_protected_buffer): ... this; change callers.
1099         Improved documentation.
1100         Use ssh_key_grip(), where gcry_pk_get_keygrip() has been used
1101         before.
1102         (ssh_handler_sign_request): Removed unusued variable P.
1104 2005-04-20  Moritz Schulte  <moritz@g10code.com>
1106         * command-ssh.c (ssh_handler_request_identities): Removed
1107         debugging code (sleep call), which was commited unintenionally.
1109 2005-04-20  Werner Koch  <wk@g10code.com>
1111         * minip12.c (parse_bag_encrypted_data): Fix the unpadding hack.
1113         * gpg-agent.c: New option --disable-scdaemon.
1114         (handle_connections): Add time event to drive ...
1115         (handle_tick): New function.
1116         (main): Record the parent PID. Fixed segv when using ssh and a
1117         command.
1119         * call-scd.c (start_scd): Take care of this option.
1121 2005-04-03  Moritz Schulte  <moritz@g10code.com>
1123         * command-ssh.c (ssh_request_spec): New member: secret_input.
1124         (REQUEST_SPEC_DEFINE): New argument: secret_input.
1125         (request_specs): Add secret_input flag.
1126         (request_spec_lookup): New function ...
1127         (ssh_request_process): ... use it here; depending on secret_input
1128         flag allocate secure or non-secure memory.
1130 2005-03-02  Moritz Schulte  <moritz@g10code.com>
1132         * command-ssh.c (sexp_key_extract): Removed FIXME, since
1133         xtrymallos does set errno correctly by now.
1134         (sexp_extract_identifier): Remove const attribute from identifier.
1135         (ssh_handler_request_identities): Remove const attribute from
1136         key_type; removes ugly casts and FIXME.
1137         (sexp_key_extract): Remove const attribute from comment.
1138         (ssh_send_key_public): Remove const attribute from
1139         key_type/comment; removes ugly cast.
1140         (data_sign): Remove const attribute from identifier; removes ugly
1141         cast.
1142         (key_secret_to_public): Remove const attribute from comment;
1143         removes ugly cast.
1144         (ssh_handler_sign_request): Remove const attribute from p.
1145         (sexp_key_extract): Use make_cstring().
1146         (ssh_key_extract_comment): Likewise.
1147         (ssh_key_to_buffer): Use secure memory for memory area to hold the
1148         key S-Expression.
1149         Added more comments.
1151 2005-02-25  Werner Koch  <wk@g10code.com>
1153         * findkey.c (modify_description): Keep invalid % escapes, so that
1154         %0A may pass through.
1156         * agent.h (server_control_s): New field USE_AUTH_CALL.
1157         * call-scd.c (agent_card_pksign): Make use of it.
1158         * command-ssh.c (data_sign): Set the flag.
1159         (ssh_send_key_public): New arg OVERRIDE_COMMENT.
1160         (card_key_available): Add new arg CARDSN.
1161         (ssh_handler_request_identities): Use the card s/n as comment.
1162         (sexp_key_extract): Use GCRYMPI_FMT_STD.
1163         (data_sign): Ditto.
1165         * learncard.c (make_shadow_info): Moved to ..
1166         * protect.c (make_shadow_info): .. here. Return NULL on malloc
1167         failure. Made global.
1168         * agent.h: Add prototype.
1170 2005-02-24  Werner Koch  <wk@g10code.com>
1172         * call-scd.c (unescape_status_string): New. Actual a copy of
1173         ../g10/call-agent.c
1174         (card_getattr_cb, agent_card_getattr): New.
1176         * command-ssh.c (card_key_available): New.
1177         (ssh_handler_request_identities): First see whether a card key is
1178         available.
1180         * gpg-agent.c (handle_connections): Need to check for events if
1181         select returns with -1.
1183 2005-02-23  Werner Koch  <wk@g10code.com>
1185         * command-ssh.c (get_passphrase): Removed.
1186         (ssh_identity_register): Partly rewritten.
1187         (open_control_file, search_control_file, add_control_entry): New.
1188         (ssh_handler_request_identities): Return only files listed in our
1189         control file.
1191         * findkey.c (unprotect): Check for allocation error.
1193         * agent.h (opt): Add fields to record the startup terminal
1194         settings.
1195         * gpg-agent.c (main): Record them and do not force keep display
1196         with --enable-ssh-support.
1197         * command-ssh.c (start_command_handler_ssh): Use them here.
1199         * gpg-agent.c: Renamed option --ssh-support to
1200         --enable-ssh-support.
1202         * command.c (cmd_readkey): New.
1203         (register_commands): Register new command "READKEY".
1205         * command-ssh.c (ssh_request_process): Improved logging.
1207         * findkey.c (agent_write_private_key): Always use plain open.
1208         Don't depend on an umask for permissions.
1209         (agent_key_from_file): Factored file reading code out to ..
1210         (read_key_file): .. new function.
1211         (agent_public_key_from_file): New.
1213 2005-02-22  Werner Koch  <wk@g10code.com>
1215         * command-ssh.c (stream_read_string): Removed call to abort on
1216         memory error because the CVS version of libgcrypt makes sure
1217         that ERRNO gets always set on error even with a faulty user
1218         supplied function.
1220 2005-02-19  Moritz Schulte  <moritz@g10code.com>
1222         * command-ssh.c (ssh_receive_mpint_list): Slightly rewritten, do
1223         not use elems_secret member of key_spec.
1224         (ssh_key_type_spec): Removed member: elems_secret.
1225         (ssh_key_types): Removed elems_secret data.
1226         (ssh_sexp_construct): Renamed to ...
1227         (sexp_key_construct): ... this; changed callers.
1228         (ssh_sexp_extract): Renamed to ...
1229         (sexp_key_extract): ... this; changed callers.
1230         (ssh_sexp_extract_key_type): Renamed to ...
1231         (sexp_extract_identifier): ... this; changed callers; use
1232         make_cstring().
1233         Added more comments.
1235 2005-02-18  Moritz Schulte  <moritz@g10code.com>
1237         * command-ssh.c (ssh_sexp_construct): Rewritten generation of sexp
1238         template, clarified.
1239         (ssh_sexp_extract): Support shadowed-private-key-sexp; treat
1240         protected-private key and shadowed-private-key as public keys.
1241         (key_secret_to_public): Rewritten: simply use ssh_sexp_extract()
1242         and ssh_sexp_construct().
1244 2005-02-15  Werner Koch  <wk@g10code.com>
1246         * findkey.c (modify_description): Don't increment OUT_LEN during
1247         the second pass.
1249 2005-02-14  Moritz Schulte  <moritz@g10code.com>
1251         * command-ssh.c (es_read_byte): Renamed to ...
1252         (stream_es_read_byte): ... this; changed callers.
1253         (es_write_byte): Renamed to ...
1254         (stream_write_byte): ... this; changed callers.
1255         (es_read_uint32): Renamed to ...
1256         (stream_read_uint32): ... this; changed callers.
1257         (es_write_uint32): Renamed to ...
1258         (stream_write_uint32): ... this; changed callers.
1259         (es_read_data): Renamed to ...
1260         (stream_read_data): ... this; changed callers.
1261         (es_write_data): Renamed to ...
1262         (stream_write_data): ... this; changed callers.
1263         (es_read_string): Renamed to ...
1264         (stream_read_string): ... this; changed callers.
1265         (es_read_cstring): Renamed to ...
1266         (stream_read_cstring): ... this; changed callers.
1267         (es_write_string): Renamed to ...
1268         (stream_write_string): ... this; changed callers.
1269         (es_write_cstring): Renamed to ...
1270         (stream_write_cstring): ... this; changed callers.
1271         (es_read_mpi): Renamed to ...
1272         (stream_read_mpi): ... this; changed callers.
1273         (es_write_mpi): Renamed to ...
1274         (stream_write_mpi): ... this; changed callers.
1275         (es_copy): Renamed to ...
1276         (stream_copy): ... this; changed callers.
1277         (es_read_file): Renamed to ...
1278         (file_to_buffer): ... this; changed callers.
1279         (ssh_identity_register): Removed variable description_length;
1280         changed code to use asprintf for description.
1281         (stream_write_uint32): Do not filter out the last byte of shift
1282         expression.
1283         (uint32_construct): New macro ...
1284         (stream_read_uint32): ... use it; removed unnecessary cast.
1286 2005-02-03  Werner Koch  <wk@g10code.com>
1288         * agent.h (agent_exit): Add JNLIB_GCC_A_NR to indicate that this
1289         function won't return.
1291         * gpg-agent.c (check_for_running_agent): Initialize pid to a
1292         default value if not needed.
1294         * command-ssh.c: Removed stdint.h.  s/byte_t/unsigned char/,
1295         s/uint32/u32/ becuase that is what we have always used in GnuPG.
1296         (ssh_request_specs): Moved to top of file.
1297         (ssh_key_types): Ditto.
1298         (make_cstring): Ditto.
1299         (data_sign): Don't use a variable for the passphrase prompt, make
1300         it translatable.
1301         (ssh_request_process): 
1302         
1304         * findkey.c (modify_description): Renamed arguments for clarity,
1305         polished documentation.  Make comment a C-string.  Fixed case of
1306         DESCRIPTION being just "%".
1307         (agent_key_from_file): Make sure comment string to a C-string.
1309         * gpg-agent.c (create_socket_name): Cleanup the implemntation, use
1310         DIMof, agent_exit, removed superflous args and return the
1311         allocated string as value.  Documented.  Changed callers.
1312         (create_server_socket): Cleanups similar to above.  Changed callers.
1313         (cleanup_do): Renamed to ..
1314         (remove_socket): .. this.  Changed caller.
1315         (handle_connections): The signals are to be handled in the select
1316         and not in the accept.  Test all FDs after returning from a
1317         select.  Remove the event tests from the accept calls.  The select
1318         already assured that the accept won't block.
1320 2005-01-29  Moritz Schulte  <moritz@g10code.com>
1322         * command-ssh.c (ssh_handler_request_identities)
1323         (ssh_handler_sign_request, ssh_handler_add_identity)
1324         (ssh_handler_remove_identity, ssh_handler_remove_all_identities)
1325         (ssh_handler_lock, ssh_handler_unlock): Changed to return an error
1326         code instead of a boolean.
1327         (ssh_request_process): Changed to return a boolean instead of an
1328         error; adjust caller.
1329         (ssh_request_handle_t): Adjusted type.
1330         (ssh_request_spec): New member: identifier.
1331         (REQUEST_SPEC_DEFINE): New macro; use it for initialization of
1332         request_specs[].
1333         (ssh_request_process): In debugging mode, log identifier of
1334         handler to execute.
1335         (start_command_handler_ssh): Moved most of the stream handling
1336         code ...
1337         (ssh_request_process): ... here.
1339 2005-01-28  Moritz Schulte  <moritz@g10code.com>
1341         * command-ssh.c (ssh_handler_add_identity): Pass ctrl to
1342         ssh_identity_register().
1343         (ssh_identity_register): New argument: ctrl; pass ctrl to
1344         get_passphrase().
1345         (get_passphrase): Pass ctrl instead of NULL to agent_askpin().
1346         (start_command_handler_ssh): Use agent_init_default_ctrl();
1347         deallocate structure members, which might be dynamically
1348         allocated.
1349         (lifetime_default): Removed variable.
1350         (ssh_handler_add_identity): Fix ttl handling; renamed variable
1351         `death' to `ttl'.
1352         (ssh_identity_register): Fix key grip handling.
1354 2005-01-26  Moritz Schulte  <moritz@g10code.com>
1356         * command-ssh.c (ssh_handler_sign_request): Confirm to agent
1357         protocol in case of failure.
1359         * command-ssh.c: New file.
1361         * Makefile.am (gpg_agent_SOURCES): New source file: command-ssh.c.
1363         * findkey.c (modify_description): New function.
1364         (agent_key_from_file): Support comment field in key s-expressions.
1366         * gpg-agent.c (enum cmd_and_opt_values): New item: oSSHSupport.
1367         (opts) New entry for oSSHSupport.
1368         New variable: socket_name_ssh.
1369         (cleanup_do): New function based on cleanup().
1370         (cleanup): Use cleanup_do() for socket_name and socket_name_ssh.
1371         (main): New switch case for oSSHSupport.
1372         (main): Move socket name creation code to ...
1373         (create_socket_name): ... this new function.
1374         (main): Use create_socket_name() for creating socket names for
1375         socket_name and for socket_name_ssh in case ssh support is
1376         enabled.
1377         Move socket creation code to ...
1378         (create_server_socket): ... this new function.
1379         (main): Use create_server_socket() for creating sockets.
1380         In case standard_socket is set, do not only store a socket name in
1381         socket_name, but also in socket_name_ssh.
1382         Generate additional environment info strings for ssh support.
1383         Pass additional ssh socket argument to handle_connections.
1384         (start_connection_thread_ssh): New function.
1385         (handle_connections): Use select to multiplex between gpg-agent
1386         and ssh-agent protocol.
1388         * agent.h (struct opt): New member: ssh_support.
1389         (start_command_handler_ssh): Add prototype.
1391 2005-01-04  Werner Koch  <wk@g10code.com>
1393         * trustlist.c (agent_marktrusted): Use "Cancel" for the first
1394         confirmation and made the strings translatable.
1396         * cache.c (agent_put_cache): Fix the test for using the default
1397         TTL.
1399 2004-12-21  Werner Koch  <wk@g10code.com>
1401         * preset-passphrase.c (preset_passphrase): Handle --passphrase.
1403         * Makefile.am (gpg_preset_passphrase_LDADD): Reorder libs so that
1404         pwquery may use stuff from jnlib.  Conditionally add -lwsock2
1405         (gpg_protect_tool_LDADD): Ditto.
1407         * preset-passphrase.c (main): Use default_homedir().
1408         (main) [W32]: Initialize sockets.
1410 2004-12-21  Marcus Brinkmann  <marcus@g10code.de>
1412         * Makefile.am (libexec_PROGRAMS): Add gpg-preset-passphrase.
1413         (gpg_preset_passphrase_SOURCES, gpg_preset_passphrase_LDADD): New
1414         targets.
1415         * agent.h (opt): New member allow_cache_passphrase.
1416         * cache.c (housekeeping): Check if R->ttl is not negative.
1417         (agent_put_cache): Allow ttl to be negative.
1418         * command.c (parse_hexstring): Allow something to follow the
1419         hexstring.
1420         (cmd_cache_passphrase): New function.
1421         (register_commands): Add it.
1422         * gpg-agent.c: Handle --allow-preset-passphrase.
1423         * preset-passphrase.c: New file.
1425 2004-12-21  Werner Koch  <wk@g10code.com>
1427         * gpg-agent.c (main): Use default_homedir().
1428         * protect-tool.c (main): Ditto. 
1430 2004-12-20  Werner Koch  <wk@g10code.com>
1432         * gpg-agent.c (main) [W32]: Now that Mutexes work we can remove
1433         the pth_init kludge.
1434         (main): Add new options --[no-]use-standard-socket.
1435         (check_for_running_agent): Check whether it is running on the
1436         standard socket.
1438         * call-scd.c (init_membuf, put_membuf, get_membuf): Removed.  We
1439         now use the identical implementation from ../common/membuf.c.
1441         * pksign.c (agent_pksign): Changed arg OUTFP to OUTBUF and use
1442         membuf functions to return the value.
1443         * pkdecrypt.c (agent_pkdecrypt): Ditto.
1444         * genkey.c (agent_genkey): Ditto.
1445         * command.c (cmd_pksign, cmd_pkdecrypt, cmd_genkey): Replaced
1446         assuan_get_data_fp() by a the membuf scheme.
1447         (clear_outbuf, write_and_clear_outbuf): New.
1449 2004-12-19  Werner Koch  <wk@g10code.com>
1451         * query.c (initialize_module_query): New.
1452         * call-scd.c (initialize_module_call_scd): New.
1453         * gpg-agent.c (main): Call them.
1454         
1455 2004-12-18  Werner Koch  <wk@g10code.com>
1457         * gpg-agent.c (main):  Remove special Pth initialize.
1459         * agent.h (map_assuan_err): Define in terms of
1460         map_assuan_err_with_source.
1462 2004-12-17  Moritz Schulte  <moritz@g10code.com>
1464         * query.c: Undo change from 2004-12-05.
1466 2004-12-15  Werner Koch  <wk@g10code.com>
1468         * gpg-agent.c [W32]: Various hacks to make it work.
1470         * findkey.c (agent_write_private_key) [W32]: Adjust open call.
1472         * call-scd.c (start_scd) [W32]: Don't check whether the daemon
1473         didn't died.  To hard to do under Windows.
1474         (start_scd) [W32]: Disable sending of the event signal option.
1476         * protect-tool.c (read_file, export_p12_file) [W32]: Use setmode
1477         to get stdout and stin into binary mode.
1479 2004-12-05  Moritz Schulte  <moritz@g10code.com>
1481         * query.c (start_pinentry): Allow CTRL be NULL.
1483 2004-10-22  Werner Koch  <wk@g10code.com>
1485         * gpg-agent.c (parse_rereadable_options): Return "not handled"
1486         when the log file has not beend hadled.  This is will let the main
1487         option processing continue. Fixed a bug introduced on 2004-09-4
1488         resulting in logging to stderr until a HUP has been given.
1489         (main): Don't close the listen FD.
1491 2004-09-30  Werner Koch  <wk@g10code.com>
1493         * Makefile.am: Adjusted from gettext 1.14.
1495 2004-09-29  Werner Koch  <wk@g10code.com>
1497         * minip12.c (parse_bag_encrypted_data): Print error if a bad
1498         passphrase has been given.
1500 2004-09-28  Werner Koch  <wk@g10code.com>
1502         * protect.c (agent_unprotect): Fixed wiping of CLEARTEXT.  Thanks
1503         to Moritz for pointing this out.
1505 2004-09-25  Moritz Schulte  <moritz@g10code.com>
1506         
1507         * agent.h: Declare: agent_pksign_do.
1508         (struct server_control_s): New member: raw_value.
1509         
1510         * pksign.c (do_encode_md): New argument: raw_value; support
1511         generation of raw (non-pkcs1) data objects; adjust callers.
1512         (agent_pksign_do): New function, based on code ripped
1513         out from agent_pksign.
1514         (agent_pksign): Use agent_pksign_do.
1516         * command.c (start_command_handler): Set ctrl.digest.raw_value.
1517         
1518 2004-09-09  Werner Koch  <wk@g10code.de>
1520         * gpg-agent.c (check_for_running_agent): New.
1521         (main): The default action is now to check for an already running
1522         agent.
1523         (parse_rereadable_options): Set logfile only on reread.
1524         (main): Do not print the "is development version" note.
1526 2004-08-20  Werner Koch  <wk@g10code.de>
1528         * gpg-agent.c: New option --max-cache-ttl.  Suggested by Alexander
1529         Belopolsky.
1530         * cache.c (housekeeping): Use it here instead of the hardwired
1531         default of 1 hour.
1533         * query.c (start_pinentry): Use a timeout for the pinentry lock.
1535 2004-08-18  Werner Koch  <wk@g10code.de>
1537         * protect-tool.c (get_passphrase): Make sure that the default
1538         prompts passed to gpg-agent are utf-8 encoded. Add new prompt values.
1539         (import_p12_file, import_p12_file, export_p12_file): Changed calls
1540         to get_passphrase so that better prompts are displayed.
1541         (get_new_passphrase): New.
1543 2004-07-22  Werner Koch  <wk@g10code.de>
1545         * trustlist.c (read_list): Allow colons in the fingerprint.
1546         (headerblurb): Rephrased.
1548         * gpg-agent.c (handle_connections): Increase the stack size ot 256k.
1550 2004-06-20  Moritz Schulte  <moritz@g10code.com>
1552         * gpg-agent.c: Include <sys/stat.h> (build fix for BSD).
1554 2004-05-11  Werner Koch  <wk@gnupg.org>
1556         * gpg-agent.c (handle_signal): Reload the trustlist on SIGHUP.
1557         (start_connection_thread): Hack to simulate a ticker.
1558         * trustlist.c (agent_trustlist_housekeeping) 
1559         (agent_reload_trustlist): New.  Protected all global functions
1560         here with a simple counter which is sufficient for Pth.
1562 2004-05-03  Werner Koch  <wk@gnupg.org>
1564         * gpg-agent.c: Remove help texts for options lile --lc-ctype.
1565         (main): New option --allow-mark-trusted. 
1566         * trustlist.c (agent_marktrusted): Use it here.
1568 2004-04-30  Werner Koch  <wk@gnupg.org>
1570         * protect-tool.c: New option --enable-status-msg.
1571         (store_private_key): Print status messages for imported keys.
1572         (read_and_unprotect): Ditto for bad passphrase.
1574         * gpg-agent.c (parse_rereadable_options): New arg REREAD.  Allow
1575         changing oLogFile.
1576         (current_logfile): New.
1578 2004-04-26  Werner Koch  <wk@gnupg.org>
1580         * call-scd.c (start_scd): Do not register an event signal if we
1581         are running as a pipe server.
1583 2004-04-21  Werner Koch  <wk@gnupg.org>
1585         * call-scd.c (start_scd): Send event-signal option. Always check
1586         that the scdaemon is still running.
1588         * gpg-agent.c (handle_signal): Do not use SIGUSR{1,2} anymore for
1589         changing the verbosity.
1591 2004-04-16  Werner Koch  <wk@gnupg.org>
1593         * gpg-agent.c (main): Tell the logging code that we are running
1594         detached.
1596 2004-04-06  Werner Koch  <wk@gnupg.org>
1598         * gpg-agent.c (main): Use new libgcrypt thread library register
1599         scheme.
1601 2004-03-23  Marcus Brinkmann  <marcus@g10code.de>
1603         * gpg-agent.c (main): For now, always print the default config
1604         file name for --gpgconf-list.
1606 2004-03-17  Werner Koch  <wk@gnupg.org>
1608         * gpg-agent.c (main) <gpgconf>: Fixed default value quoting.
1610 2004-03-16  Werner Koch  <wk@gnupg.org>
1612         * gpg-agent.c (parse_rereadable_options): Use the new
1613         DEFAULT_CACHE_TTL macro.
1614         (main): Updated --gpgconf-list output.
1616 2004-02-21  Werner Koch  <wk@gnupg.org>
1618         * command.c (cmd_passwd): Take acount of a key description.
1620         * genkey.c (reenter_compare_cb): Do not set the error text.
1621         (agent_protect_and_store, agent_genkey): Force a re-enter after a
1622         non-matching passphrase.
1623         * query.c (agent_askpin): Add new arg INITIAL_ERRTEXT; changed
1624         all callers.
1626 2004-02-19  Werner Koch  <wk@gnupg.org>
1628         * protect-tool.c: New options --have-cert and --prompt.
1629         (export_p12_file): Read a certificate from STDIN and pass it to
1630         p12_build.  Detect a keygrip and construct the filename in that
1631         case.  Unprotcet a key if needed.  Print error messages for key
1632         formats we can't handle.
1633         (release_passphrase): New.
1634         (get_passphrase): New arg PROMPTNO. Return the allocated
1635         string. Changed all callers.
1637         * minip12.c: Revamped the build part.
1638         (p12_build): New args CERT and CERTLEN.  
1640 2004-02-18  Werner Koch  <wk@gnupg.org>
1642         * protect-tool.c (main): Setup the used character set.
1643         * gpg-agent.c (main): Ditto.
1645         * gpg-agent.c (set_debug): New.  New option --debug-level.
1646         (main): New option --gpgconf-list.
1648 2004-02-17  Werner Koch  <wk@gnupg.org>
1650         * pksign.c (do_encode_md): Cleaned up by using gcry_sexp_build.
1652         * Makefile.am (gpg_protect_tool_SOURCES): Removed
1653         simple-pwquery.[ch], as we once moved it to ../common.
1655 2004-02-13  Werner Koch  <wk@gnupg.org>
1657         * command.c (cmd_setkeydesc): New.
1658         (register_commands): Add command SETKEYDESC.
1659         (cmd_pksign, cmd_pkdecrypt): Use the key description.
1660         (reset_notify): Reset the description.
1661         * findkey.c (unprotect): Add arg DESC_TEXT.
1662         (agent_key_from_file): Ditto.
1663         * pksign.c (agent_pksign): Ditto.
1664         * pkdecrypt.c (agent_pkdecrypt): Ditto. Made CIPHERTEXT an
1665         unsigned char*.
1667         * protect-tool.c (main): New options --no-fail-on-exist, --homedir.
1668         (store_private_key): Use them here.
1670 2004-02-12  Werner Koch  <wk@gnupg.org>
1672         * protect-tool.c (read_file, main): Allow reading from stdin.
1674         * Makefile.am: Include cmacros.am for common flags.
1675         (libexec_PROGRAMS): Put gpg-protect-tool there.
1677 2004-02-10  Werner Koch  <wk@gnupg.org>
1679         * minip12.c (parse_bag_encrypted_data): Finished implementation.
1680         (p12_parse): Add callback args.
1681         * protect-tool.c (import_p12_cert_cb): New.
1682         (import_p12_file): Use it.
1684 2004-02-06  Werner Koch  <wk@gnupg.org>
1686         * minip12.c (crypt_block): Add arg CIPHER_ALGO; changed all callers.
1687         (set_key_iv): Add arg KEYBYTES; changed caller.
1689 2004-02-03  Werner Koch  <wk@gnupg.org>
1691         * findkey.c (agent_key_from_file): Extra paranoid wipe.
1692         * protect.c (agent_unprotect): Ditto.
1693         (merge_lists): Ditto. Add arg RESULTLEN.
1694         * pkdecrypt.c (agent_pkdecrypt): Don't show the secret key even in
1695         debug mode.
1697         * protect.c: Add DSA and Elgamal description.
1699 2004-01-29  Werner Koch  <wk@gnupg.org>
1701         * agent.h (server_control_s): Add connection_fd field.
1702         * command.c (start_command_handler): Init it here.
1703         * gpg-agent.c (agent_init_default_ctrl): and here.
1704         * call-scd.c: Add the CTRL arg to all functions calling start_scd
1705         and pass it to start_scd.  Changed all callers
1706         (start_scd): Keep track of the current active connection.
1707         (agent_reset_scd): New.
1708         * command.c (start_command_handler): Call it here.
1709         * learncard.c (agent_handle_learn): Add arg CTRL; changed caller.
1710         (send_cert_back): Ditto.
1712 2004-01-28  Werner Koch  <wk@gnupg.org>
1714         * trustlist.c (agent_marktrusted): Check whether the trustlist is
1715         writable.
1717 2004-01-27  Werner Koch  <wk@gnupg.org>
1719         * sexp-parse.h: Moved to ../common.
1721 2004-01-24  Werner Koch  <wk@gnupg.org>
1723         * call-scd.c (atfork_cb): New.
1724         (start_scd): Make sure secmem gets cleared.
1725         * query.c  (atfork_cb): New.
1726         (start_pinentry): Make sure secmem gets cleared.
1728 2004-01-16  Werner Koch  <wk@gnupg.org>
1730         * findkey.c (agent_key_from_file): Now return an error code so
1731         that we have more detailed error messages in the upper layers.
1732         This fixes the handling of pinentry's cancel button. 
1733         * pksign.c (agent_pksign): Changed accordingly.
1734         * pkdecrypt.c (agent_pkdecrypt): Ditto.
1735         * command.c (cmd_passwd): Ditto.
1737 2003-12-16  Werner Koch  <wk@gnupg.org>
1739         * gpg-agent.c (main): Set the prefixes for assuan logging.
1741 2003-12-15  Werner Koch  <wk@gnupg.org>
1743         * protect.c (do_encryption): Use gcry_create_nonce instad of the
1744         obsolete WEAK_RANDOM.
1746 2003-11-20  Werner Koch  <wk@gnupg.org>
1748         * sexp-parse.h (snext): Don't use atoi_1 and digitp macros, so
1749         that this file is useful by other applications too.
1751 2003-10-27  Werner Koch  <wk@gnupg.org>
1753         * command.c (cmd_get_confirmation): New command.
1755 2003-08-20  Timo Schulz  <twoaday@freakmail.de>
1757         * pksign.c (do_encode_md): Allocate enough space. Cast md
1758         byte to unsigned char to prevent sign extension.
1759         
1760 2003-08-14  Timo Schulz  <twoaday@freakmail.de>
1762         * pksign.c (do_encode_md): Due to the fact pkcs#1 padding
1763         is now in Libgcrypt, use the new interface.
1764         
1765 2003-07-31  Werner Koch  <wk@gnupg.org>
1767         * Makefile.am (gpg_agent_LDADD): Added INTLLIBS.
1768         (gpg_protect_tool_SOURCES): Added simple-pwquery.[ch]
1770 2003-07-27  Werner Koch  <wk@gnupg.org>
1772         Adjusted for gcry_mpi_print and gcry_mpi_scan API change.
1774 2003-07-15  Werner Koch  <wk@gnupg.org>
1776         * simple-pwquery.c, simple-pwquery.h:  Moved to ../common.
1777         * Makefile.am (gpg_protect_tool_LDADD): Add simple-pwquery.o.
1778         Removed it from xx_SOURCES.
1780 2003-07-04  Werner Koch  <wk@gnupg.org>
1782         * gpg-agent.c (handle_connections): Kludge to allow use of Pth 1
1783         and 2.
1785 2003-06-30  Werner Koch  <wk@gnupg.org>
1787         * call-scd.c (learn_status_cb): Store the serialno in PARM.
1789 2003-06-26  Werner Koch  <wk@gnupg.org>
1791         * call-scd.c (agent_card_serialno): Don't do a RESET anymore.
1793 2003-06-25  Werner Koch  <wk@gnupg.org>
1795         * command.c (cmd_scd): New.
1796         * call-scd.c (agent_card_scd): New.
1797         * divert-scd.c (divert_generic_cmd): New
1799         * call-scd.c (agent_card_learn): New callback args SINFO.
1800         (learn_status_cb): Pass all other status lines to the sinfo
1801         callback.
1802         * learncard.c (release_sinfo, sinfo_cb): New.
1803         (agent_handle_learn): Pass the new cb to the learn function and
1804         pass the collected information back to the client's assuan
1805         connection.
1807         * gpg-agent.c (main): Moved pth_init before gcry_check_version.
1809 2003-06-24  Werner Koch  <wk@gnupg.org>
1811         * gpg-agent.c (handle_connections): Adjusted for Pth 2.0
1813         Adjusted for changes in the libgcrypt API. Some more fixes for the
1814         libgpg-error stuff.  
1816 2003-06-04  Werner Koch  <wk@gnupg.org>
1818         Renamed error codes from INVALID to INV and removed _ERROR suffixes.
1820 2003-06-03  Werner Koch  <wk@gnupg.org>
1822         Changed all error codes in all files to the new libgpg-error scheme.
1824         * agent.h: Include gpg-error.h and errno.h
1825         * Makefile.am: Link with libgpg-error
1827         * query.c: assuan.h is now a system header.
1828         * genkey.c (agent_genkey): Fixed silly use of xmalloc by
1829         xtrymalloc.
1831 2003-04-29  Werner Koch  <wk@gnupg.org>
1833         * command.c (register_commands): Adjusted for new Assuan semantics.
1835         * Makefile.am: Don't override LDFLAGS.
1837 2002-12-04  Werner Koch  <wk@gnupg.org>
1839         * gpg-agent.c: New variable config_filename.
1840         (parse_rereadable_options): New.
1841         (main): Use it here.  Add setting of default values, set
1842         config_filename.
1843         (reread_configuration): Filled with actual code.
1845 2002-12-03  Werner Koch  <wk@gnupg.org>
1847         * protect-tool.c (read_key): Don't run make_canonical on a NULL
1848         buffer.
1850         * command.c (parse_hexstring): New.
1851         (cmd_sethash): Use it.
1852         (parse_keygrip): New.
1853         (cmd_havekey, cmd_sigkey): Use it.
1854         (cmd_passwd): New.
1855         * genkey.c (agent_protect_and_store): New.
1856         (store_key): Add arg FORCE.
1857         (agent_genkey): Pass false to this force of store_key.
1859 2002-11-13  Werner Koch  <wk@gnupg.org>
1861         * gpg-agent.c (main): Switch all messages to utf-8.
1863         * simple-pwquery.c (agent_send_all_options): Use $GPG_TTY and
1864         stdin with ttyname.
1866         * cache.c (new_data): Uiih - /sizeof d/sizeof *d/.
1868 2002-11-10  Werner Koch  <wk@gnupg.org>
1870         * command.c (option_handler): Fix keep_tty check.
1872 2002-11-06  Werner Koch  <wk@gnupg.org>
1874         * gpg-agent.c (main): Make sure we have a default ttyname.
1875         * command.c (option_handler): Check opt.keep_tty here
1876         * query.c (start_pinentry): but not anymore here.
1878 2002-11-05  Werner Koch  <wk@gnupg.org>
1880         * agent.h (opt,server_control_s): Move display and lc_ variables
1881         to the control struct so that they are per connection.
1882         * gpg-agent.c (agent_init_default_ctrl): New.
1883         (main): Assign those command line options to new default_* variables.
1884         Reset DISPLAY in server mode so that tehre is no implicit default.
1885         * command.c (start_command_handler): Initialize and deinitialize
1886         the control values.
1887         (option_handler): Work on the ctrl values and not on the opt.
1888         * query.c (start_pinentry): New argument CTRL to set the display
1889         connection specific.  Changed all callers to pass this value.
1890         (agent_askpin,agent_get_passphrase,agent_get_confirmation): Add
1891         CTRL arg and pass it ot start_pinentry.
1892         * command.c (cmd_get_passphrase): Pass CTRL argument.
1893         * trustlist.c (agent_marktrusted):  Add CTRL argument  
1894         * command.c (cmd_marktrusted): Pass CTRL argument
1895         * divert-scd.c (ask_for_card):  Add CTRL arg. 
1896         (divert_pksign,divert_pkdecrypt): Ditto.  Changed caller.
1897         (getpin_cb): Use OPAQUE to pass the CTRL variable.  Changed both 
1898         users.
1899         * findkey.c (unprotect): Add CTRL arg.
1900         (agent_key_from_file): Ditto.
1902         * query.c (unlock_pinentry): Disconnect the pinentry so that we
1903         start a new one for each request.  This is required to support
1904         clients with different environments (e.g. X magic cookies).
1906 2002-09-05  Neal H. Walfield  <neal@cs.uml.edu>
1908         * gpg-agent.c (main) [USE_GNU_PTH]: No need to call
1909         assuan_set_io_func as assuan is smart.
1911 2002-09-25  Werner Koch  <wk@gnupg.org>
1913         * gpg-agent.c (handle_signal): Flush cache on SIGHUP.
1914         * cache.c (agent_flush_cache): New.
1916         * gpg-agent.c, agent.h: Add --keep-display and --keep-tty.
1917         * query.c (start_pinentry): Implement them.  The option passing
1918         needs more thoughts.
1920 2002-09-09  Werner Koch  <wk@gnupg.org>
1922         * gpg-agent.c (create_private_keys_directory)
1923         (create_directories): New.
1924         (main): Try to create a home directory.
1926 2002-09-04  Neal H. Walfield  <neal@g10code.de>
1928         * gpg-agent.c (main): Use sigaction, not signal.
1930 2002-09-03  Neal H. Walfield  <neal@g10code.de>
1932         * findkey.c: Include <fcntl.h>.
1933         (agent_write_private_key): Prefer POSIX compatibity, open and
1934         fdopen, over the simplicity of GNU extensions, fopen(file, "x").
1936 2002-08-22  Werner Koch  <wk@gnupg.org>
1938         * query.c (agent_askpin): Provide the default desc text depending
1939         on the pininfo.  Do the basic PIN verification only when
1940         min_digits is set.
1942 2002-08-21  Werner Koch  <wk@gnupg.org>
1944         * query.c (agent_askpin): Hack to show the right default prompt.
1945         (agent_get_passphrase): Ditto.
1947         * trans.c: Removed and replaced all usages with standard _()
1949         * divert-scd.c (getpin_cb): Pass a more descritive text to the
1950         pinentry.
1952         * Makefile.am: Renamed the binary protect-tool to gpg-protect-tool.
1953         * protect-tool.c: Removed the note about internal use only.
1955         * gpg-agent.c (main): New option --daemon so that the program is
1956         not accidently started in the background.
1958 2002-08-16  Werner Koch  <wk@gnupg.org>
1960         * call-scd.c (learn_status_cb): Handle CERTINFO status.
1961         (agent_card_learn): Add args for certinfo cb.
1962         * learncard.c (release_certinfo,certinfo_cb): New.
1963         (send_cert_back): New. With factored out code from ..
1964         (agent_handle_learn): here.  Return certinfo stuff.
1966 2002-07-26  Werner Koch  <wk@gnupg.org>
1968         * gpg-agent.c (main): New option --ignore-cache-for-signing.
1969         * command.c (option_handler): New server option
1970         use-cache-for-signing defaulting to true.
1971         (cmd_pksign): handle global and per session option.
1972         * findkey.c (agent_key_from_file, unprotect): New arg
1973         ignore_cache.  Changed all callers.
1974         * pksign.c (agent_pksign): Likewise.
1976 2002-06-29  Werner Koch  <wk@gnupg.org>
1978         * query.c (start_pinentry): Use GNUPG_DERAULT_PINENTRY.
1979         * call-scd.c (start_scd): Use GNUPG_DEFAULT_SCDAEMON.
1981 2002-06-28  Werner Koch  <wk@gnupg.org>
1983         * protect-tool.c (export_p12_file): New.
1984         (main): New command --p12-export.
1985         * minip12.c (create_final,p12_build,compute_tag_length): New.
1986         (store_tag_length): New.
1988 2002-06-27  Werner Koch  <wk@gnupg.org>
1990         * minip12.c (crypt_block): Renamed from decrypt_block, add arg to
1991         allow encryption.
1993         * Makefile.am (pkglib_PROGRAMS): Put protect-tool there.
1995         * findkey.c (agent_write_private_key,agent_key_from_file)
1996         (agent_key_available): Use GNUPG_PRIVATE_KEYS_DIR constant.
1997         * gpg-agent.c (main): Use GNUPG_DEFAULT_HOMEDIR constant.
1999         * protect-tool.c (store_private_key): New.
2000         (import_p12_file): Store the new file if requested.
2001         (main): New options --force and --store.
2003         * gpg-agent.c (main): Set a global flag when running detached.
2004         * query.c (start_pinentry): Pass the list of FD to keep in the
2005         child when not running detached.
2006         * call-scd.c (start_scd): Ditto.
2008 2002-06-26  Werner Koch  <wk@gnupg.org>
2010         * command.c (cmd_istrusted, cmd_listtrusted, cmd_marktrusted)
2011         (cmd_pksign, cmd_pkdecrypt, cmd_genkey, cmd_get_passphrase)
2012         (cmd_learn): Print an error message for a failed operation.
2014         * simple-pwquery.c, simple-pwquery.h: New.
2015         * protect-tool. (get_passphrase): New, used to get a passphrase
2016         from the agent if none was given on the command line.
2018 2002-06-25  Werner Koch  <wk@gnupg.org>
2020         * protect-tool.c (rsa_key_check): New.
2021         (import_p12_file): New.
2022         (main): New command --p12-import.
2023         * minip12.c, minip12.h: New.
2025 2002-06-24  Werner Koch  <wk@gnupg.org>
2027         * protect-tool.c (read_file): New.
2028         (read_key): Factored most code out to read_file.
2030 2002-06-17  Werner Koch  <wk@gnupg.org>
2032         * agent.h: Add a callback function to the pin_entry_info structure.
2033         * query.c (agent_askpin): Use the callback to check for a correct
2034         PIN.  Removed the start_err_text argument because it is not
2035         anymore needed; changed callers.
2036         * findkey.c (unprotect): Replace our own check loop by a callback.
2037         (try_unprotect_cb): New.
2038         * genkey.c (reenter_compare_cb): New.
2039         (agent_genkey): Use this callback here.  Fixed setting of the pi2
2040         variable and a segv in case of an empty PIN.
2042         * divert-scd.c (getpin_cb): Removed some unused stuff and
2043         explained what we still have to change.
2045 2002-06-12  Werner Koch  <wk@gnupg.org>
2047         * gpg-agent.c (main): New option --disable-pth.
2049 2002-06-11  Werner Koch  <wk@gnupg.org>
2051         * protect-tool.c: Add command --show-keygrip
2052         (show_keygrip): New.
2054 2002-05-23  Werner Koch  <wk@gnupg.org>
2056         * call-scd.c: Seirialized all scdaeom access when using Pth.
2058         * cache.c: Made the cache Pth-thread-safe.
2059         (agent_unlock_cache_entry): New.
2060         * findkey.c (unprotect): Unlock the returned cache value.
2061         * command.c (cmd_get_passphrase): Ditto.
2063         * gpg-agent.c (main): Register pth_read/write with Assuan.
2065 2002-05-22  Werner Koch  <wk@gnupg.org>
2067         * query.c: Serialized all pinentry access when using Pth.
2069         * gpg-agent.c (handle_signal,start_connection_thread)
2070         (handle_connections): New
2071         (main): Use the new Pth stuff to allow concurrent connections.
2072         * command.c (start_command_handler): Add new arg FD so that the
2073         fucntion can also be used for an already connected socket.
2074         * Makefile.am: Link with Pth.
2076 2002-05-14  Werner Koch  <wk@gnupg.org>
2078         * cache.c (housekeeping, agent_put_cache): Use our time() wrapper.
2080 2002-04-26  Werner Koch  <wk@gnupg.org>
2082         * cache.c (agent_put_cache): Reinitialize the creation time and
2083         the ttl when reusing a slot.
2085         * call-scd.c (start_scd): Print debug messages only with debug
2086         flags set.
2087         * query.c (start_pinentry): Ditto.
2089 2002-04-25  Marcus Brinkmann  <marcus@g10code.de>
2091         * agent.h (agent_get_confirmation): Replace paramter prompt with
2092         two parameters ok and cancel.
2093         * query.c (agent_get_confirmation): Likewise.  Implement this.
2094         * trustlist.c (agent_marktrusted): Fix invocation of
2095         agent_get_confirmation.
2096         * divert-scd.c (ask_for_card): Likewise.
2098 2002-04-24  Marcus Brinkmann  <marcus@g10code.de>
2100         * agent.h (struct opt): Add members display, ttyname, ttytype,
2101         lc_ctype, and lc_messages.
2102         * gpg-agent.c (enum cmd_and_opt_values): Add oDisplay, oTTYname,
2103         oTTYtype, oLCctype, and LCmessages.
2104         (main): Handle these options.
2105         * command.c (option_handler): New function.
2106         (register_commands): Register option handler.
2107         * query.c (start_pinentry): Pass the various display and tty
2108         options to the pinentry.
2110 2002-04-05  Werner Koch  <wk@gnupg.org>
2112         * protect-tool.c (show_file): New.  Used as default action.
2114 2002-03-28  Werner Koch  <wk@gnupg.org>
2116         * divert-scd.c (encode_md_for_card): Don't do the pkcs-1 padding,
2117         the scdaemon should take care of it.
2118         (ask_for_card): Hack to not display the trailing zero.
2120 2002-03-11  Werner Koch  <wk@gnupg.org>
2122         * learncard.c (kpinfo_cb): Remove the content restrictions from
2123         the keyID.
2125 2002-03-06  Werner Koch  <wk@gnupg.org>
2127         * learncard.c: New.
2128         * divert-scd.c (ask_for_card): The serial number is binary so
2129         convert it to hex here.
2130         * findkey.c (agent_write_private_key): New.
2131         * genkey.c (store_key): And use it here.
2132         
2133         * pkdecrypt.c (agent_pkdecrypt): Changed the way the diversion is done.
2134         * divert-scd.c (divert_pkdecrypt): Changed interface and
2135         implemented it.
2137 2002-03-05  Werner Koch  <wk@gnupg.org>
2139         * call-scd.c (inq_needpin): New.
2140         (agent_card_pksign): Add getpin_cb args.
2141         (agent_card_pkdecrypt): New.
2143 2002-03-04  Werner Koch  <wk@gnupg.org>
2145         * pksign.c (agent_pksign): Changed how the diversion is done.
2146         * divert-scd.c (divert_pksign): Changed interface and implemented it.
2147         (encode_md_for_card): New.
2148         * call-scd.c (agent_card_pksign): New.
2150 2002-02-28  Werner Koch  <wk@gnupg.org>
2152         * pksign.c (agent_pksign): Detect whether a Smartcard is to be
2153         used and divert the operation in this case.
2154         * pkdecrypt.c (agent_pkdecrypt): Likewise
2155         * findkey.c (agent_key_from_file): Add optional arg shadow_info
2156         and have it return information about a shadowed key.
2157         * protect.c (agent_get_shadow_info): New.
2159         * protect.c (snext,sskip,smatch): Moved to
2160         * sexp-parse.h: New file.
2161         * divert-scd.c: New.
2162         
2163 2002-02-27  Werner Koch  <wk@gnupg.org>
2165         * protect.c (agent_shadow_key): New.
2167         * command.c (cmd_learn): New command LEARN.
2168         * gpg-agent.c: New option --scdaemon-program.
2169         * call-scd.c (start_scd): New. Based on query.c
2170         * query.c: Add 2 more arguments to all uses of assuan_transact.
2172 2002-02-18  Werner Koch  <wk@gnupg.org>
2174         * findkey.c (unprotect): Show an error message for a bad passphrase.
2176         * command.c (cmd_marktrusted): Implemented.
2177         * trustlist.c (agent_marktrusted): New.
2178         (open_list): Add APPEND arg.
2180         * query.c (agent_get_confirmation): New.
2182 2002-02-06  Werner Koch  <wk@gnupg.org>
2184         * cache.c (housekeeping): Fixed linking in the remove case.
2186 2002-02-01  Werner Koch  <wk@gnupg.org>
2188         * gpg-agent.c: New option --default-cache-ttl.
2189         * cache.c (agent_put_cache): Use it.
2190         
2191         * cache.c: Add a few debug outputs.
2193         * protect.c (agent_private_key_type): New.
2194         * agent.h: Add PRIVATE_KEY_ enums.
2195         * findkey.c (agent_key_from_file): Use it to decide whether we
2196         have to unprotect a key.
2197         (unprotect): Cache the passphrase.
2198         
2199         * findkey.c (agent_key_from_file,agent_key_available): The key
2200         files do now require a ".key" suffix to make a script's life
2201         easier. 
2202         * genkey.c (store_key): Ditto.
2204 2002-01-31  Werner Koch  <wk@gnupg.org>
2206         * genkey.c (store_key): Protect the key.
2207         (agent_genkey): Ask for the passphrase.
2208         * findkey.c (unprotect): Actually unprotect the key.
2209         * query.c (agent_askpin): Add an optional start_err_text. 
2211 2002-01-30  Werner Koch  <wk@gnupg.org>
2213         * protect.c: New.  
2214         (hash_passphrase): Based on the GnuPG 1.0.6 version.
2215         * protect-tool.c: New
2217 2002-01-29  Werner Koch  <wk@gnupg.org>
2219         * findkey.c (agent_key_available): New.
2220         * command.c (cmd_havekey): New.
2221         (register_commands): And register new command.
2223 2002-01-20  Werner Koch  <wk@gnupg.org>
2225         * command.c (cmd_get_passphrase): Remove the plus signs.
2227         * query.c (start_pinentry): Send no-grab option to pinentry
2228         * gpg-agent.c (main): Move variable grab as no_grab to agent.h.
2230 2002-01-19  Werner Koch  <wk@gnupg.org>
2232         * gpg-agent.c (main): Disable core dumps.
2234         * cache.c: New.
2235         * command.c (cmd_get_passphrase): Use the cache.
2236         (cmd_clear_passphrase): Ditto.
2238         * gpg-agent.c:  Removed unused cruft and implement the socket
2239         based server.
2240         (my_strusage): Take bug report address from configure.ac.
2241         * command.c (start_command_handler): Add an argument to start as
2242         regular server.
2243         (start_command_handler): Enable Assuan logging.
2245 2002-01-15  Werner Koch  <wk@gnupg.org>
2247         * trustlist.c: New.
2248         * command.c (cmd_istrusted, cmd_listtrusted, cmd_marktrusted): New.
2250 2002-01-07  Werner Koch  <wk@gnupg.org>
2252         * genkey.c: Store the secret part and return the public part.
2254 2002-01-03  Werner Koch  <wk@gnupg.org>
2256         * command.c (cmd_get_passphrase): New.
2257         (cmd_clear_passphrase): New.
2258         * query.c (agent_get_passphrase): New.
2260 2002-01-02  Werner Koch  <wk@gnupg.org>
2262         * genkey.c: New.
2263         * command.c (cmd_genkey): New.
2265         * command.c (rc_to_assuan_status): Removed and changed all callers
2266         to use map_to_assuan_status.
2267         
2268 2001-12-19  Werner Koch  <wk@gnupg.org>
2270         * keyformat.txt: New. 
2272 2001-12-19  Marcus Brinkmann  <marcus@g10code.de>
2274         * query.c (start_pinentry): Add new argument to assuan_pipe_connect.
2276 2001-12-18  Werner Koch  <wk@gnupg.org>
2278         * Makefile.am: Use LIBGCRYPT macros
2280 2001-12-14  Werner Koch  <wk@gnupg.org>
2282         * gpg-agent.c (main): New option --batch.  New option --debug-wait
2283         n, so that it is possible to attach gdb when used in server mode.
2284         * query.c (agent_askpin): Don't ask in batch mode.
2286         * command.c: Removed the conversion macros as they are now in
2287         ../common/util.h.
2289 2001-12-14  Marcus Brinkmann  <marcus@g10code.de>
2291         * query.c (LINELENGTH): Removed.
2292         (agent_askpin): Use ASSUAN_LINELENGTH, not LINELENGTH.
2294 2001-11-19  Werner Koch  <wk@gnupg.org>
2296         * gpg-agent.c: Removed all GUI code, removed code for old
2297         protocol.  New code to use the Assuan protocol as a server and
2298         also to communicate with a new ask-passphrase utility.
2300 2000-11-22  Werner Koch  <wk@gnupg.org>
2302         * gpg-agent.c (main): csh support by Dan Winship, new options --sh
2303         and --csh and set default by consulting $SHELL.
2305 Mon Aug 21 17:59:17 CEST 2000  Werner Koch  <wk@openit.de>
2307         * gpg-agent.c (passphrase_dialog): Cleanup the window and added the
2308         user supplied text to the window.
2309         (main): Fixed segv in gtk_init when used without a command to start.
2311         * gpg-agent.c: --flush option.
2312         (req_flush): New.
2313         (req_clear_passphrase): Implemented.
2315 Fri Aug 18 14:27:14 CEST 2000  Werner Koch  <wk@openit.de>
2317         * gpg-agent.c: New.
2318         * Makefile.am: New.
2321  Copyright 2001, 2002, 2003, 2004, 2005,
2322            2007, 2008, 2009 Free Software Foundation, Inc.
2324  This file is free software; as a special exception the author gives
2325  unlimited permission to copy and/or distribute it, with or without
2326  modifications, as long as this notice is preserved.
2328  This file is distributed in the hope that it will be useful, but
2329  WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
2330  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.