Add --reload command to gpgconf.
[gnupg.git] / agent / ChangeLog
blob9e8bf6133ed382c239cb30006b31f8f311258068
1 2009-03-02  Werner Koch  <wk@g10code.com>
3         * command.c (cmd_getinfo): Add subcommand "scd_running".
5         * call-scd.c (agent_scd_check_running): New.
7         * gpg-agent.c: Add missing option strings for "--batch" and
8         "--homedir".  Reported by Petr Uzel.
10         * protect-tool.c (import_p12_file): Take care of canceled
11         passphrase entry.  Fixes bug#1003.
12         (export_p12_file): Ditto.
14 2008-12-17  Werner Koch  <wk@g10code.com>
16         * gpg-agent.c (handle_connections): Set action of all pth event
17         handled signals to SIG_IGN.  Use a different pth_sigmask strategy.
19 2008-12-10  Werner Koch  <wk@g10code.com>
21         * command.c (cmd_get_passphrase): Implement option --no-ask.
23 2008-12-09  Werner Koch  <wk@g10code.com>
25         * gpg-agent.c (main): Call i18n_init before init_common_subsystems.
26         * preset-passphrase.c (main): Ditto.
27         * protect-tool.c (main): Ditto.
29         * command.c (cmd_preset_passphrase): Allow an arbitrary string for
30         the cache id.
32 2008-12-08  Werner Koch  <wk@g10code.com>
34         * gpg-agent.c (handle_connections): Sync the ticker to the next
35         full second.  This is bug#871.
37 2008-12-05  Werner Koch  <wk@g10code.com>
39         * minip12.c (decrypt_block): Fix const modified of CHARSETS.
40         * learncard.c (sinfo_cb_parm_s): Remove superflous semicolon.
41         Reported by Stoyan Angelov.
43 2008-11-18  Werner Koch  <wk@g10code.com>
45         * gpg-agent.c (make_libversion): New.
46         (my_strusage): Print libgcrypt version
48 2008-11-11  Werner Koch  <wk@g10code.com>
50         * call-scd.c (membuf_data_cb): Change return type to
51         assuan_error_t to avoid warnings with newer libassuan versions.
53 2008-11-04  Werner Koch  <wk@g10code.com>
55         * command.c (cmd_killagent): Stop the agent immediately.
56         (start_command_handler): Take care of GPG_ERR_EOF.
58 2008-10-29  Werner Koch  <wk@g10code.com>
60         * gpg-agent.c (main): Move USE_STANDARD_SOCKET to the outer scope.
61         (create_socket_name): Remove arg USE_STANDARD_SOCKET.  Change all
62         callers.
63         (create_server_socket): Remove IS_STANDARD_NAME and replace it by
64         USE_STANDARD_SOCKET.  Change all callers.
65         (check_own_socket_running): New.
66         (check_own_socket, check_own_socket_thread): New.
67         (handle_tick): Check server socket once a minute.
68         (handle_connections): Remove the extra pth_wait in the shutdown
69         case.
71 2008-10-20  Werner Koch  <wk@g10code.com>
73         * command.c (cmd_geteventcounter): Mark unused arg.
74         (cmd_listtrusted, cmd_pksign, cmd_pkdecrypt, cmd_genkey): Ditto.
75         (cmd_updatestartuptty, post_cmd_notify): Ditto.
76         * command-ssh.c (add_control_entry) 
77         (ssh_handler_request_identities, ssh_handler_remove_identity) 
78         (ssh_handler_remove_all_identities, ssh_handler_lock) 
79         (ssh_handler_unlock): Ditto.
80         * call-pinentry.c (pinentry_active_p, popup_message_thread) 
81         (agent_popup_message_stop): Ditto.
82         * findkey.c (agent_public_key_from_file): Ditto.
83         * genkey.c (check_passphrase_pattern): Ditto.
84         * call-scd.c (atfork_cb): Ditto.
85         * protect-tool.c (import_p12_cert_cb): Ditto.
86         * t-protect.c (main): Ditto.
88 2008-10-17  Werner Koch  <wk@g10code.com>
90         * call-scd.c (start_scd) [W32]: Use snprintf again because we now
91         always use the estream variant.
93 2008-10-15  Werner Koch  <wk@g10code.com>
95         * call-scd.c (start_scd): Enable assuan loggging if requested.
96         (agent_scd_check_aliveness) [W32]: Fix use of GetExitCodeProcess.
98 2008-10-14  Werner Koch  <wk@g10code.com>
100         * gpg-agent.c (get_agent_scd_notify_event): Need to use a manual
101         reset event.
103 2008-09-29  Werner Koch  <wk@g10code.com>
105         * agent.h (GCRY_MD_USER): Rename to GCRY_MODULE_ID_USER.
106         (GCRY_MD_USER_TLS_MD5SHA1): Rename to MD_USER_TLS_MD5SHA1 and
107         change all users.
109 2008-09-25  Werner Koch  <wk@g10code.com>
111         * divert-scd.c (getpin_cb): Support a Reset Code style PINs..
113 2008-09-03  Werner Koch  <wk@g10code.com>
115         * command.c (parse_keygrip): Use hex2bin.
116         (cmd_preset_passphrase): Decode the passphrase.  Reported by Kiss
117         Gabor.  Fixes #679 again.
118         * preset-passphrase.c (make_hexstring): Remove.
119         (preset_passphrase): Use bin2hex.
121 2008-05-27  Werner Koch  <wk@g10code.com>
123         * trustlist.c (insert_colons): Fix stupidly wrong allocation size
124         computation.
126 2008-05-26  Werner Koch  <wk@g10code.com>
128         * gpg-agent.c (main): Re-initialize default assuan log stream if a
129         log file is used.
131         * trustlist.c (agent_marktrusted): Use xtryasprintf and xfree.
133         * gpg-agent.c (main, agent_deinit_default_ctrl): Always use xfree
134         because our asprintf is mapped to an xmalloc style function in
135         util.h. Replace xstrdup by xtrystrdup.
136         * w32main.c (build_argv): Ditto.
137         * preset-passphrase.c (preset_passphrase): Ditto.
138         * divert-scd.c (ask_for_card): Ditto.
139         * command.c (option_handler): Ditto.
140         * command-ssh.c (ssh_handler_request_identities): Ditto.
141         * call-pinentry.c (start_pinentry): Ditto.
143         * gpg-agent.c (start_connection_thread)
144         (start_connection_thread_ssh): Use pth_thread_id for useful output
145         under W32.
146         (pth_thread_id) [!PTH_HAVE_PTH_THREAD_ID]: New.
148 2008-03-17  Werner Koch  <wk@g10code.com>
150         * agent.h (agent_inq_pinentry_launched): New prototype.
152         * call-pinentry.c: Include sys/types.h and signal.h.
154 2008-02-14  Werner Koch  <wk@g10code.com>
156         * command.c (agent_inq_pinentry_launched): New.
157         (option_handler): Add option allow-pinentry-notify.
158         * call-pinentry.c (getinfo_pid_cb): New.
159         (start_pinentry): Ask for the PID and notify the client.
161 2008-01-15  Marcus Brinkmann  <marcus@g10code.de>
163         * call-pinentry.c (start_pinentry): Start pinentry in detached
164         mode.
166 2007-12-04  Werner Koch  <wk@g10code.com>
168         * call-pinentry.c (agent_askpin): Use gnupg_get_help_string.
170 2007-12-03  Werner Koch  <wk@g10code.com>
172         * gpg-agent.c (main): s/standard_socket/use_standard_socket/ for
173         clarity.
174         (create_server_socket): New arg IS_SSH to avoid testing with
175         assuan commands.
177 2007-11-20  Werner Koch  <wk@g10code.com>
179         * gpg-agent.c (get_agent_scd_notify_event): New.
180         (handle_signal): Factor SIGUSR2 code out to:
181         (agent_sigusr2_action): .. New.
182         (agent_sighup_action): Print info message here and not in
183         handle_signal.
184         (handle_connections) [PTH_EVENT_HANDLE]: Call agent_sigusr2_action.
186         * call-scd.c (agent_scd_check_aliveness) [W32]: Implemented.
187         (start_scd) [W32]: Send event-signal option.
189 2007-11-19  Werner Koch  <wk@g10code.com>
191         * call-pinentry.c (agent_askpin): Set the tooltip for the quality
192         bar.
194 2007-11-15  Werner Koch  <wk@g10code.com>
196         * agent.h (struct server_control_s): Add XAUTHORITY and
197         PINENTRY_USER_DATA.
198         * gpg-agent.c: New option --xauthority.
199         (main, agent_init_default_ctrl) 
200         (agent_deinit_default_ctrl): Implemented
201         * command.c (cmd_updatestartuptty): Ditto.
202         * command-ssh.c (start_command_handler_ssh): Ditto.
203         * call-pinentry.c (atfork_cb): Set the environment.
204         (start_pinentry): Pass CTRL as arg to atfork_cb.
206 2007-11-14  Werner Koch  <wk@g10code.com>
208         * call-scd.c (start_scd) [W32]: Take care of fflush peculiarities.
210 2007-11-07  Werner Koch  <wk@g10code.com>
212         * agent.h: Remove errors.h.
214 2007-10-24  Werner Koch  <wk@g10code.com>
216         * genkey.c (check_passphrase_constraints): Changed the wording of
217         the warning messages.
219 2007-10-19  Werner Koch  <wk@g10code.com>
221         * protect-tool.c (get_passphrase): Use new utf8 switch fucntions.
223 2007-10-15  Daiki Ueno  <ueno@unixuser.org>  (wk)
225         * command-ssh.c (reenter_compare_cb): New function; imported from
226         genkey.c.
227         (ssh_identity_register): Ask initial passphrase twice.
229 2007-10-02  Werner Koch  <wk@g10code.com>
231         * command.c (cmd_getinfo): Add "pid" subcommand.
233 2007-10-01  Werner Koch  <wk@g10code.com>
235         * agent.h (struct server_control_s): Remove unused CONNECTION_FD.
237         * gpg-agent.c: Remove w32-afunix.h.  Include mkdtemp.h.
238         (socket_nonce, socket_nonce_ssh): New.
239         (create_server_socket): Use assuan socket wrappers.  Remove W32
240         specific stuff.  Save the server nonce.
241         (check_nonce): New.
242         (start_connection_thread, start_connection_thread_ssh): Call it.
243         (handle_connections): Change args to gnupg_fd_t.
244         * command.c (start_command_handler): Change LISTEN_FD to gnupg_fd_t.
245         * command-ssh.c (start_command_handler_ssh): Ditto.
247 2007-09-18  Werner Koch  <wk@g10code.com>
249         * agent.h (struct pin_entry_info_s): Add element WITH_QUALITYBAR.
250         * genkey.c (check_passphrase_constraints): New arg SILENT.
251         Changed all callers.
252         (agent_protect_and_store, agent_genkey): Enable qualitybar.
253         * call-pinentry.c (agent_askpin): Send that option.
254         (unescape_passphrase_string): New.
255         (inq_quality): New.
256         (estimate_passphrase_quality): New.
258 2007-09-14  Marcus Brinkmann  <marcus@g10code.de>
260         * call-pinentry.c (agent_popup_message_stop): Implement kill for
261         Windows.
263 2007-08-28  Werner Koch  <wk@g10code.com>
265         * gpg-agent.c (main): Add option --faked-system-time.
267         * protect-tool.c (read_and_unprotect): Print the protected-at date.
269         * agent.h (struct server_control_s): Add member IN_PASSWD.
270         * command.c (cmd_passwd): Set it.
271         * findkey.c (try_unprotect_cb): Use it.
273         * protect.c (do_encryption): Replace asprintf by xtryasprint.
274         (agent_protect): Create the protected-at item.
275         (agent_unprotect): Add optional arg PROTECTED_AT.
276         (merge_lists): Add args CUTOFF and CUTLEN.
277         (agent_unprotect): Use them.
278         * findkey.c (try_unprotect_cb): Add code to test for expired keys.
279         (unprotect): Allow changing the passphrase.
281 2007-08-27  Werner Koch  <wk@g10code.com>
283         * gpg-agent.c: Add options --min-passphrase-nonalpha,
284         --check-passphrase-pattern and --enforce-passphrase-constraints.
285         (MIN_PASSPHRASE_NONALPHA): Init nonalpha option to 1.
286         (main): Declare options for gpgconf.
287         * agent.h (struct): Add members MIN_PASSPHRASE_NONALPHA,
288         ENFORCE_PASSPHRASE_CONSTRAINTS and CHECK_PASSPHRASE_PATTERN.
289         * genkey.c (nonalpha_charcount): New.
290         (check_passphrase_pattern): New.
291         (check_passphrase_constraints): Implement.  Factor some code out...
292         (take_this_one_anyway, take_this_one_anyway2): .. New.
294         * call-pinentry.c (agent_show_message): New.
295         (agent_askpin): We better reset the pin buffer before asking.
297         * trustlist.c (insert_colons): New.
298         (agent_marktrusted): Pretty print the fpr.
300 2007-08-22  Werner Koch  <wk@g10code.com>
302         * findkey.c (O_BINARY): Make sure it is defined.
303         (agent_write_private_key): Use O_BINARY
305         * protect-tool.c (import_p12_file): Add hack to allow importing of
306         gnupg 2.0.4 generated files.
308 2007-08-06  Werner Koch  <wk@g10code.com>
310         * trustlist.c (read_one_trustfile): Add flag "cm".
311         (agent_istrusted): Ditto.
313 2007-08-02  Werner Koch  <wk@g10code.com>
315         * gpg-agent.c: Include gc-opt-flags.h and remove their definition
316         here.
318 2007-07-13  Werner Koch  <wk@g10code.com>
320         * genkey.c (check_passphrase_constraints): Require a confirmation
321         for an empty passphrase.
322         (agent_genkey, agent_protect_and_store): No need to repeat an
323         empty passphrase.
325 2007-07-05  Werner Koch  <wk@g10code.com>
327         * call-scd.c (struct inq_needpin_s): New.
328         (inq_needpin): Pass unknown inquiries up.
330 2007-07-04  Werner Koch  <wk@g10code.com>
332         * gpg-agent.c (TIMERTICK_INTERVAL): New.
333         (fixed_gcry_pth_init, main): Kludge to fix Pth initialization.
335 2007-07-03  Werner Koch  <wk@g10code.com>
337         * gpg-agent.c (handle_connections): Do not use FD_SETSIZE for
338         select but compute the correct number.
340 2007-07-02  Werner Koch  <wk@g10code.com>
342         * command.c (cmd_reloadagent) [W32]: New.
343         (register_commands) [W32]: New command RELOADAGENT.
345         * Makefile.am (gpg_agent_SOURCES): Remove w32main.c and w32main.h.
346         (gpg_agent_res_ldflags): Remove icon file as we don't have a
347         proper icon yet.
348         * gpg-agent.c (main): do not include w32main.h.  Remove all calls
349         to w32main.c.
350         (agent_sighup_action): New.
351         (handle_signal): Use it.
353 2007-06-26  Werner Koch  <wk@g10code.com>
355         * gpg-agent.c (create_directories) [W32]: Made it work.
357 2007-06-21  Werner Koch  <wk@g10code.com>
359         * agent.h (ctrl_t): Remove.  It is now declared in ../common/util.h. 
361         * gpg-agent.c (check_for_running_agent): New arg SILENT.  Changed
362         all callers.
363         (create_server_socket): If the standard socket is in use check
364         whether a agent is running and avoid starting another one.
366 2007-06-18  Marcus Brinkmann  <marcus@g10code.de>
368         * gpg-agent.c (main): Percent escape pathname in --gpgconf-list
369         output.
371 2007-06-18  Werner Koch  <wk@g10code.com>
373         * w32main.c (build_argv): New.
374         (WinMain): Use it.
376         * command.c (cmd_killagent) [W32]: New.
377         (cmd_getinfo): New.
378         * gpg-agent.c (get_agent_ssh_socket_name): New.
379         (no_force_standard_socket) New.
380         (create_server_socket): Use it.
381         * Makefile.am (gpg_agent_res_ldflags): Pass windows option to ld.
383 2007-06-14  Werner Koch  <wk@g10code.com>
385         * protect-tool.c (main): Setup default socket name for
386         simple-pwquery.
387         (MAP_SPWQ_ERROR_IMPL): New.  Use map_spwq_error for spqw related
388         error codes.
389         * preset-passphrase.c (main): Setup default socket name for
390         simple-pwquery.
391         (map_spwq_error): Remove.
392         (MAP_SPWQ_ERROR_IMPL): New.  
394         * call-pinentry.c (start_pinentry): Use gnupg_module_name.
395         * call-scd.c (start_scd): Ditto.
397 2007-06-12  Werner Koch  <wk@g10code.com>
399         * taskbar.c: New.
401         * trustlist.c (read_one_trustfile): Replace GNUPG_SYSCONFDIR by a
402         function call.
403         (read_trustfiles): Ditto.
405         * gpg-agent.c (main): Replace some calls by init_common_subsystems.
406         * preset-passphrase.c (main): Ditto.
407         * protect-tool.c (main): Ditto.
409 2007-06-11  Werner Koch  <wk@g10code.com>
411         * Makefile.am (common_libs): Use libcommonstd macro.
412         (commonpth_libs): Use libcommonpth macro.
414         * protect-tool.c (main) [W32]: Call pth_init.
416         * preset-passphrase.c (main) [W32]: Replace the explicit Winsocket
417         init by a call to pth_init.
419         * trustlist.c (initialize_module_trustlist): New.
420         * gpg-agent.c (main): Call it.
422         * call-pinentry.c (initialize_module_query): Rename to
423         initialize_module_call_pinentry.
425         * minip12.c: Remove iconv.h. Add utf8conf.h.  Changed all iconv
426         calss to use these jnlib wrappers.
428 2007-06-06  Werner Koch  <wk@g10code.com>
430         * minip12.c (enum): Rename CONTEXT to ASNCONTEXT as winnt.h
431         defines such a symbol to access the process context.
433         * call-pinentry.c (dump_mutex_state) [W32]: Handle the W32Pth case.
434         * call-scd.c (dump_mutex_state): Ditto.
436         * protect-tool.c (i18n_init): Remove.
437         * preset-passphrase.c (i18n_init): Remove.
438         * gpg-agent.c (i18n_init): Remove.
440 2007-05-19  Marcus Brinkmann  <marcus@g10code.de>
442         * protect-tool.c (get_passphrase): Free ORIG_CODESET on error.
444 2007-05-14  Werner Koch  <wk@g10code.com>
446         * protect.c (make_shadow_info): Replace sprintf by smklen.
448 2007-04-20  Werner Koch  <wk@g10code.com>
450         * gpg-agent.c (my_gcry_logger, my_gcry_outofcore_handler): Removed.
451         (main): Call the setup_libgcrypt_logging helper.
452         * protect-tool.c (my_gcry_logger): Removed.
453         (main): Call the setup_libgcrypt_logging helper.
454         
455 2007-04-03  Werner Koch  <wk@g10code.com>
457         * trustlist.c (read_trustfiles): Take a missing trustlist as an
458         empty one.
460 2007-03-20  Werner Koch  <wk@g10code.com>
462         * protect-tool.c: New option --p12-charset. 
463         * minip12.c (p12_build): Implement it.
465 2007-03-19  Werner Koch  <wk@g10code.com>
467         * minip12.c: Include iconv.h.
468         (decrypt_block): New.
469         (parse_bag_encrypted_data, parse_bag_data): Use it here.
470         (bag_data_p, bag_decrypted_data_p): New helpers.
472 2007-03-06  Werner Koch  <wk@g10code.com>
474         * gpg-agent.c (main) <gpgconf>: Add entries for all ttl options.
476 2007-02-20  Werner Koch  <wk@g10code.com>
478         * call-pinentry.c (start_pinentry): Fix for OS X to allow loading
479         of the bundle.  Tested by Benjamin Donnachie.
481 2007-02-14  Werner Koch  <wk@g10code.com>
483         * gpg-agent.c: New option --pinentry-touch-file.
484         (get_agent_socket_name): New.
485         * agent.h (opt):  Add pinentry_touch_file.
486         * call-pinentry.c (start_pinentry): Send new option to the
487         pinentry.
489 2007-01-31  Moritz Schulte  <moritz@g10code.com>  (wk)
491         * command-ssh.c (stream_read_string): Initialize LENGTH to zero.
492         (start_command_handler_ssh): Use es_fgetc/es_ungetc to check if
493         EOF has been reached before trying to process another request.
495 2007-01-31  Werner Koch  <wk@g10code.com>
497         * command-ssh.c (start_command_handler_ssh): 
499         * Makefile.am (t_common_ldadd): Add LIBICONV.
501 2007-01-25  Werner Koch  <wk@g10code.com>
503         * genkey.c (check_passphrase_constraints): Get ngettext call right
504         and use UTF-8 aware strlen.
506         * protect-tool.c (get_passphrase): New arg OPT_CHECK.
507         (get_new_passphrase): Enable OPT_CHECK on the first call.
508         * command.c (cmd_get_passphrase): Implement option --check.
510 2007-01-24  Werner Koch  <wk@g10code.com>
512         * gpg-agent.c (MIN_PASSPHRASE_LEN): New
513         (parse_rereadable_options): New option  --min-passphrase-len.
514         * genkey.c (check_passphrase_constraints): New.
515         (agent_genkey, agent_protect_and_store): Call new function.  Fix
516         memory leak.
518         * call-pinentry.c (agent_askpin): Allow translation of the displayed
519         error message.
520         (agent_popup_message_start): Remove arg CANCEL_BTN.
521         (popup_message_thread): Use --one-button option.
523         * command.c (cmd_passwd): Now that we don't distinguish between
524         assuan and regular error codes we can jump to the end on error.
526 2006-12-07  David Shaw  <dshaw@jabberwocky.com>
528         * Makefile.am: Link to iconv for jnlib dependency.
530 2006-11-20  Werner Koch  <wk@g10code.com>
532         * call-pinentry.c (agent_popup_message_stop): Use SIGKILL.
533         * call-scd.c (inq_needpin): Implement POPUPKEYPADPROMPT and
534         DISMISSKEYPADPROMPT.
536 2006-11-15  Werner Koch  <wk@g10code.com>
538         * protect.c (make_shadow_info): Cast printf arg to unsigned int.
539         * minip12.c (parse_bag_encrypted_data): Ditto.
540         (parse_bag_data, p12_parse): Ditto.
541         * command-ssh.c (ssh_identity_register): Changed buffer_n to
542         size_t.
544         * agent.h (struct server_control_s): New field thread_startup.
545         * command.c (start_command_handler): Moved CTRL init code to ..
546         * gpg-agent.c (start_connection_thread): .. here.
547         (agent_deinit_default_ctrl): New.
548         (agent_init_default_ctrl): Made static.
549         (handle_connections): Allocate CTRL and pass it pth_spawn.
550         * command-ssh.c (start_command_handler_ssh): Moved CTRL init code
551         to ..
552         * gpg-agent.c (start_connection_thread_ssh): .. here.
554 2006-11-14  Werner Koch  <wk@g10code.com>
556         * command.c (bump_key_eventcounter): New.
557         (bump_card_eventcounter): New.
558         (cmd_geteventcounter): New command.
559         * gpg-agent.c (handle_signal): Call bump_card_eventcounter.
560         * findkey.c (agent_write_private_key): Call bump_key_eventcounter.
561         * trustlist.c (agent_reload_trustlist): Ditto.
563         * command.c (post_cmd_notify, io_monitor): New.
564         (register_commands, start_command_handler): Register them.
566 2006-11-09  Werner Koch  <wk@g10code.com>
568         * gpg-agent.c (main): In detached mode connect standard
569         descriptors to /dev/null.
571         * trustlist.c (read_trustfiles): Make sure not to pass a zero size
572         to realloc as the C standards says that this behaves like free.
574 2006-11-06  Werner Koch  <wk@g10code.com>
576         * protect-tool.c (my_strusage): Fixed typo.
578 2006-10-23  Werner Koch  <wk@g10code.com>
580         * gpg-agent.c (main): New command --gpgconf-test.
582         * minip12.c (parse_bag_encrypted_data, parse_bag_data): Allow for
583         a salt of 20 bytes.
585 2006-10-20  Werner Koch  <wk@g10code.com>
587         * Makefile.am (t_common_ldadd): Use GPG_ERROR_LIBS instead -o just -l
589 2006-10-19  Werner Koch  <wk@g10code.com>
591         * findkey.c (unprotect): Use it to avoid unnecessary calls to
592         agent_askpin.
593         * call-pinentry.c (pinentry_active_p): New.
595 2006-10-17  Werner Koch  <wk@g10code.com>
597         * Makefile.am (gpg_agent_LDADD): Link to libcommonpth.
598         (gpg_agent_CFLAGS): New.  This allows to only link this with Pth.
600 2006-10-16  Werner Koch  <wk@g10code.com>
602         * call-pinentry.c (agent_get_confirmation): Map Cancel code here too.
603         * trustlist.c (agent_marktrusted): Return Cancel instead of
604         Not_Confirmed for the first question.
606 2006-10-12  Werner Koch  <wk@g10code.com>
608         * protect-tool.c (get_passphrase): Fix if !HAVE_LANGINFO_CODESET.
610 2006-10-06  Werner Koch  <wk@g10code.com>
612         * Makefile.am (AM_CFLAGS): Use PTH version of libassuan.
613         (gpg_agent_LDADD): Ditto.
615         * divert-scd.c (divert_pksign): Use PKAUTH for the TLS algo.
617 2006-10-05  Werner Koch  <wk@g10code.com>
619         * command.c (has_option_name): New.
620         (cmd_sethash): New --hash option.
621         * pksign.c (do_encode_raw_pkcs1): New.
622         (agent_pksign_do): Use it here for the TLS algo.
623         * agent.h (GCRY_MD_USER_TLS_MD5SHA1): New.
624         * divert-scd.c (pksign): Add case for tls-md5sha1.
625         
626         * divert-scd.c (encode_md_for_card): Check that the algo is valid.
628 2006-10-04  Werner Koch  <wk@g10code.com>
630         * call-pinentry.c (agent_get_passphrase): Changed to return the
631         unencoded passphrase.
632         (agent_askpin, agent_get_passphrase, agent_get_confirmation): Need
633         to map the cancel error.
634         * command.c (send_back_passphrase): New.
635         (cmd_get_passphrase): Use it here.  Also implement --data option.
636         (skip_options): New.
638 2006-09-26  Werner Koch  <wk@g10code.com>
640         * learncard.c (agent_handle_learn): Send back the keypair
641         information.
643 2006-09-25  Werner Koch  <wk@g10code.com>
645         * trustlist.c (read_one_trustfile): Allow extra flags.
646         (struct trustitem_s): Replaced KEYFLAGS by a FLAGS struct.
647         Changed all code to use this.
648         (agent_istrusted): New arg CTRL. Changed all callers.  Send back
649         flags.
650         * command.c (agent_write_status): New.
652 2006-09-20  Werner Koch  <wk@g10code.com>
654         * Makefile.am: Changes to allow parallel make runs.
656 2006-09-15  Werner Koch  <wk@g10code.com>
658         * trustlist.c: Entirely rewritten.
659         (agent_trustlist_housekeeping): Removed and removed all calls.
661 2006-09-14  Werner Koch  <wk@g10code.com>
663         Replaced all call gpg_error_from_errno(errno) by
664         gpg_error_from_syserror().
666         * call-pinentry.c (start_pinentry): Replaced pipe_connect2 by
667         pipe_connect_ext.
668         * call-scd.c (start_scd): Ditto.
669         * command.c (start_command_handler): Replaced
670         init_connected_socket_server by init_socket_server_ext.
672 2006-09-13  Werner Koch  <wk@g10code.com>
674         * preset-passphrase.c (main) [W32]: Check for WSAStartup error.
676 2006-09-08  Werner Koch  <wk@g10code.com>
678         * call-scd.c: Add signal.h as we are referencing SIGUSR2.
680 2006-09-06  Marcus Brinkmann  <marcus@g10code.de>
682         * Makefile.am (AM_CFLAGS): Add $(GPG_ERR_CFLAGS).
683         (gpg_agent_LDADD): Replace -lgpg-error with $(GPG_ERROR_LIBS).
685 2006-09-06  Werner Koch  <wk@g10code.com>
687         * query.c: Renamed to ..
688         * call-pinentry.c: .. this.
690         * agent.h (out_of_core): Removed.
691         (CTRL): Removed and changed everywhere to ctrl_t.
693         Replaced all Assuan error codes by libgpg-error codes.  Removed
694         all map_to_assuan_status and map_assuan_err.
695         
696         * gpg-agent.c (main): Call assuan_set_assuan_err_source to have Assuan
697         switch to gpg-error codes.
698         * command.c (set_error): Adjusted.
700 2006-09-04  Werner Koch  <wk@g10code.com>
702         * command.c (percent_plus_unescape): New.
703         (cmd_get_val, cmd_putval): New.
705 2006-08-29  Werner Koch  <wk@g10code.com>
707         * command-ssh.c (stream_read_mpi): Sanity check for early
708         detecting of too large keys.
709         * gpg-agent.c (my_gcry_outofcore_handler): New.
710         (main): Register it.
711         (main): No allocate 32k secure memory (was 16k).
713 2006-07-31  Werner Koch  <wk@g10code.com>
715         * preset-passphrase.c (make_hexstring): For consistency use
716         xtrymalloc and changed caller to use xfree.  Fixed function
717         comment.
719 2006-07-29  Marcus Brinkmann  <marcus@g10code.de>
721         * preset-passphrase.c (preset_passphrase): Do not strip off last
722         character of passphrase.
723         (make_hexstring): New function.
724         * command.c (cmd_preset_passphrase): Use parse_hexstring to syntax
725         check passphrase argument.  Truncate passphrase at delimiter.
727 2006-07-24  Werner Koch  <wk@g10code.com>
729         * minip12.c (build_key_bag): New args SHA1HASH and
730         KEYIDSTR. Append bag Attributes if these args are given.
731         (build_cert_sequence): ditto.
732         (p12_build): Calculate certificate hash and pass to build
733         functions.
735 2006-07-21  Werner Koch  <wk@g10code.com>
737         * minip12.c (oid_pkcs_12_keyBag): New.
738         (parse_bag_encrypted_data): New arg R_RESULT. Support keybags and
739         return the key object. 
740         (p12_parse): Take new arg into account.  Free RESULT on error.
742 2006-06-26  Werner Koch  <wk@g10code.com>
744         * gpg-agent.c (handle_signal): Print info for SIGUSR2 only in
745         verbose mode.
747 2006-06-22  Werner Koch  <wk@g10code.com>
749         * command-ssh.c (make_cstring): Use memcpy instead of strncpy.
750         (ssh_receive_mpint_list, sexp_key_extract, data_sign): Use
751         xtrycalloc instead of xtrymalloc followed by memset.
753 2006-06-20  Werner Koch  <wk@g10code.com>
755         * minip12.c (create_final): New arg PW. Add code to calculate the
756         MAC.
758 2006-06-09  Marcus Brinkmann  <marcus@g10code.de>
760         * Makefile.am (gpg_agent_LDADD): Add $(NETLIBS).
761         (gpg_protect_tool_LDADD): Likewise.
762         (gpg_preset_passphrase_LDADD): Likewise.
764 2006-04-09  Moritz Schulte  <moritz@g10code.com>
766         * command-ssh.c (ssh_request_process): Removed FIXME mentioning a
767         possible DoS attack.
769 2006-04-01  Moritz Schulte  <moritz@g10code.com>
771         * command-ssh.c (ssh_identity_register): Make KEY_GRIP_RAW be 20
772         instead of 21 bytes long; do not fill KEY_GRIP_RAW[20] with NUL
773         byte - KEY_GRIP_RAW is a raw binary string anyway.
775 2006-02-09  Werner Koch  <wk@g10code.com>
777         * call-scd.c (struct scd_local_s): New field next_local.
778         (scd_local_list): New.
779         (start_scd): Put new local into list.
780         (agent_reset_scd): Remove it from the list.
781         (agent_scd_check_aliveness): Here is the actual reason why we need
782         all this stuff.
783         (agent_reset_scd): Send the new command RESTART instead of RESET.
785 2005-12-16  Werner Koch  <wk@g10code.com>
787         * minip12.c (cram_octet_string): New
788         (p12_parse): Use it for NDEFed bags.
789         (parse_bag_data): Ditto.
790         (string_to_key, set_key_iv, crypt_block): New arg SALTLEN.
791         (p12_build): Use old value 8 for new arg.
792         (parse_bag_encrypted_data, parse_bag_data): Allow for salts of 8
793         to 16 bytes.  Add new arg R_CONSUMED.
795 2005-11-24  Werner Koch  <wk@g10code.com>
797         * minip12.c (p12_parse): Fixed for case that the key object comes
798         prior to the certificate.
800 2005-10-19  Werner Koch  <wk@g10code.com>
802         * divert-scd.c (getpin_cb): Hack to use it for a keypad message.
804         * call-scd.c (inq_needpin): Reworked to support the new KEYPADINFO.
806         * query.c (start_pinentry): Keep track of the owner.
807         (popup_message_thread, agent_popup_message_start) 
808         (agent_popup_message_stop, agent_reset_query): New.
809         * command.c (start_command_handler): Make sure a popup window gets
810         closed.
812 2005-10-08  Marcus Brinkmann  <marcus@g10code.de>
814         * Makefile.am (gpg_protect_tool_LDADD): Add ../gl/libgnu.a.
815         (gpg_preset_passphrase_LDADD, t_common_ldadd): Likewise.
816         (gpg_agent_LDADD): Add ../gl/libgnu.a after ../common/libcommon.a.
818 2005-09-16  Werner Koch  <wk@g10code.com>
820         * minip12.c (build_key_sequence, build_cert_sequence): Fixed
821         padding.
823 2005-09-15  Moritz Schulte  <moritz@g10code.com>
825         * t-protect.c (test_agent_protect): Implemented.
826         (main): Disable use of secure memory.
828 2005-09-09  Werner Koch  <wk@g10code.com>
830         * minip12.c (p12_build): Oops, array needs to be larger for the
831         certificate.
832         (build_cert_bag): Fixed yesterdays change.
834         * command-ssh.c (card_key_available): Let the card handler decide
835         whether the card is supported here.  Also get a short serial
836         number to return from the card handler.
838 2005-09-08  Werner Koch  <wk@g10code.com>
840         * minip12.c (build_cert_bag): Use a non constructed object.
841         i.e. 0x80 and not 0xa0.
843 2005-08-16  Werner Koch  <wk@g10code.com>
845         * gpg-agent.c (main): Use a default file name for --write-env-file.
847 2005-07-25  Werner Koch  <wk@g10code.com>
849         * findkey.c (agent_public_key_from_file): Fixed array assignment.
850         This was the cause for random segvs.
852 2005-06-29  Werner Koch  <wk@g10code.com>
854         * command-ssh.c (data_sign): Removed empty statement.
856 2005-06-21  Werner Koch  <wk@g10code.com>
858         * minip12.c (create_final): Cast size_t to ulong for printf. 
859         (build_key_bag, build_cert_bag, build_cert_sequence): Ditto.
861 2005-06-16  Werner Koch  <wk@g10code.com>
863         * protect-tool.c (make_advanced): Makde RESULT a plain char.
864         * call-scd.c (unescape_status_string): Need to cast unsigned char*
865         for strcpy.
866         (agent_card_pksign): Made arg R_BUF an unsigned char**.
867         * divert-scd.c (divert_pksign): Made SIGVAL unsigned char*.
868         (encode_md_for_card): Initialize R_VAL and R_LEN.
869         * genkey.c (store_key): Made BUF unsigned.
870         * protect.c (do_encryption): Ditto.
871         (do_encryption): Made arg PROTBEGIN unsigned. Initialize RESULT
872         and RESULTLEN even on error.
873         (merge_lists): Need to cast unsigned char * for strcpy. Initialize 
874         RESULTand RESULTLEN even on error.
875         (agent_unprotect): Likewise for strtoul.
876         (make_shadow_info): Made P and INFO plain char.
877         (agent_shadow_key): Made P plain char.
879 2005-06-15  Werner Koch  <wk@g10code.com>
881         * query.c (agent_get_passphrase): Made HEXSTRING a char*.
882         * command-ssh.c (ssh_key_grip): Made arg BUFFER unsigned.
883         (ssh_key_grip): Simplified.
884         (data_sign): Initialize variables with the definition.
885         (ssh_convert_key_to_blob): Make sure that BLOB and BLOB_SIZE
886         are set to NULL on error.  Cool, gcc-4 detects uninitialized stuff
887         beyond function boundaries; well it can't know that we do error
888         proper error handling so that this was not a real error.
889         (file_to_buffer): Likewise for BUFFER and BUFFER_N.
890         (data_sign): Likewise for SIG and SIG_N.
891         (stream_read_byte): Set B to a value even on error.
892         * command.c (cmd_genkey): Changed VALUE to char.
893         (cmd_readkey): Cast arg for gcry_sexp_sprint.
894         * agent.h (struct server_control_s): Made KEYGRIP unsigned.
896 2005-06-13  Werner Koch  <wk@g10code.com>
898         * command-ssh.c (start_command_handler_ssh): Reset the SCD.
900 2005-06-09  Werner Koch  <wk@g10code.com>
902         * gpg-agent.c (create_socket_name): New option --max-cache-ttl-ssh.
903         * cache.c (housekeeping): Use it.
904         (agent_put_cache): Use a switch to get the default ttl so that it
905         is easier to add more cases.
907 2005-06-06  Werner Koch  <wk@g10code.com>
909         * gpg-agent.c: New option --default-cache-ttl-ssh.
910         * agent.h (cache_mode_t): New.
911         * pksign.c (agent_pksign_do): New arg CACHE_MODE to replace the
912         ARG IGNORE_CACHE. Changed all callers.
913         (agent_pksign): Ditto.
914         * findkey.c (agent_key_from_file): Ditto. Canged all callers.
915         (unprotect): Ditto.
916         * command-ssh.c (data_sign): Use CACHE_MODE_SSH.
917         * cache.c (agent_get_cache): New arg CACHE_MODE.
918         (agent_put_cache): Ditto.  Store it in the cache.
920         * query.c (agent_query_dump_state, dump_mutex_state): New.
921         (unlock_pinentry): Reset the global context before releasing the
922         mutex.
923         * gpg-agent.c (handle_signal): Dump query.c info on SIGUSR1.
925         * call-scd.c (agent_scd_check_aliveness): Always do a waitpid and
926         add a timeout to the locking.
928 2005-06-03  Werner Koch  <wk@g10code.com>
930         * command.c (cmd_updatestartuptty): New.
932         * gpg-agent.c: New option --write-env-file.
933         
934         * gpg-agent.c (handle_connections): Make sure that the signals we
935         are handling are not blocked.Block signals while creating new
936         threads.
938 2005-06-02  Werner Koch  <wk@g10code.com>
940         * call-scd.c (agent_scd_dump_state, dump_mutex_state): New.
941         * gpg-agent.c (handle_signal): Print it on SIGUSR1.
942         (handle_connections): Include the file descriptor into the
943         threadnames.
945 2005-06-01  Werner Koch  <wk@g10code.com>
947         * gpg-agent.c: Include setenv.h.
949 2005-05-31  Werner Koch  <wk@g10code.com>
951         * agent.h (out_of_core): s/__inline__/inine.  Noted by Ray Link.
953 2005-05-25  Werner Koch  <wk@g10code.com>
955         * gpg-agent.c (main): Do not unset the DISPLAY when we are
956         continuing as child.
958 2005-05-24  Werner Koch  <wk@g10code.com>
960         * call-scd.c (inq_needpin): Skip leading spaces in of PIN
961         description.
962         * divert-scd.c (getpin_cb): Enhanced to cope with description
963         flags.
964         * query.c (agent_askpin): Add arg PROMPT_TEXT. Changed all
965         callers.
967 2005-05-21  Werner Koch  <wk@g10code.com>
969         * call-scd.c (start_scd): Don't test for an alive scdaemon here.
970         (agent_scd_check_aliveness): New.
971         * gpg-agent.c (handle_tick): Test for an alive scdaemon.
972         (handle_signal): Print thread info on SIGUSR1.
974 2005-05-20  Werner Koch  <wk@g10code.com>
976         * protect-tool.c: New option --canonical.
977         (show_file): Implement it.
979         * keyformat.txt: Define the created-at attribute for keys.
981 2005-05-18  Werner Koch  <wk@g10code.com>
983         * divert-scd.c (ask_for_card): Removed the card reset kludge.
985 2005-05-17  Werner Koch  <wk@g10code.com>
987         * call-scd.c (unlock_scd): Add new arg CTRL. Changed all callers.
988         (start_scd): Reoworked to allow for additional connections.
989         * agent.h (ctrl_t): Add local data for the SCdaemon.
990         * command.c (start_command_handler): Release SERVER_LOCAL.
992         * gpg-agent.c (create_server_socket): Use xmalloc.
993         (main): Removed option --disable-pth a dummy.  Removed non-pth
994         code path.
995         (cleanup_sh): Removed.  Not needed anymore.
997 2005-05-05  Moritz Schulte  <moritz@g10code.com>
999         * command-ssh.c (ssh_key_to_buffer): Rename to ...
1000         (ssh_key_to_protected_buffer): ... this; change callers.
1001         Improved documentation.
1002         Use ssh_key_grip(), where gcry_pk_get_keygrip() has been used
1003         before.
1004         (ssh_handler_sign_request): Removed unusued variable P.
1006 2005-04-20  Moritz Schulte  <moritz@g10code.com>
1008         * command-ssh.c (ssh_handler_request_identities): Removed
1009         debugging code (sleep call), which was commited unintenionally.
1011 2005-04-20  Werner Koch  <wk@g10code.com>
1013         * minip12.c (parse_bag_encrypted_data): Fix the unpadding hack.
1015         * gpg-agent.c: New option --disable-scdaemon.
1016         (handle_connections): Add time event to drive ...
1017         (handle_tick): New function.
1018         (main): Record the parent PID. Fixed segv when using ssh and a
1019         command.
1021         * call-scd.c (start_scd): Take care of this option.
1023 2005-04-03  Moritz Schulte  <moritz@g10code.com>
1025         * command-ssh.c (ssh_request_spec): New member: secret_input.
1026         (REQUEST_SPEC_DEFINE): New argument: secret_input.
1027         (request_specs): Add secret_input flag.
1028         (request_spec_lookup): New function ...
1029         (ssh_request_process): ... use it here; depending on secret_input
1030         flag allocate secure or non-secure memory.
1032 2005-03-02  Moritz Schulte  <moritz@g10code.com>
1034         * command-ssh.c (sexp_key_extract): Removed FIXME, since
1035         xtrymallos does set errno correctly by now.
1036         (sexp_extract_identifier): Remove const attribute from identifier.
1037         (ssh_handler_request_identities): Remove const attribute from
1038         key_type; removes ugly casts and FIXME.
1039         (sexp_key_extract): Remove const attribute from comment.
1040         (ssh_send_key_public): Remove const attribute from
1041         key_type/comment; removes ugly cast.
1042         (data_sign): Remove const attribute from identifier; removes ugly
1043         cast.
1044         (key_secret_to_public): Remove const attribute from comment;
1045         removes ugly cast.
1046         (ssh_handler_sign_request): Remove const attribute from p.
1047         (sexp_key_extract): Use make_cstring().
1048         (ssh_key_extract_comment): Likewise.
1049         (ssh_key_to_buffer): Use secure memory for memory area to hold the
1050         key S-Expression.
1051         Added more comments.
1053 2005-02-25  Werner Koch  <wk@g10code.com>
1055         * findkey.c (modify_description): Keep invalid % escapes, so that
1056         %0A may pass through.
1058         * agent.h (server_control_s): New field USE_AUTH_CALL.
1059         * call-scd.c (agent_card_pksign): Make use of it.
1060         * command-ssh.c (data_sign): Set the flag.
1061         (ssh_send_key_public): New arg OVERRIDE_COMMENT.
1062         (card_key_available): Add new arg CARDSN.
1063         (ssh_handler_request_identities): Use the card s/n as comment.
1064         (sexp_key_extract): Use GCRYMPI_FMT_STD.
1065         (data_sign): Ditto.
1067         * learncard.c (make_shadow_info): Moved to ..
1068         * protect.c (make_shadow_info): .. here. Return NULL on malloc
1069         failure. Made global.
1070         * agent.h: Add prototype.
1072 2005-02-24  Werner Koch  <wk@g10code.com>
1074         * call-scd.c (unescape_status_string): New. Actual a copy of
1075         ../g10/call-agent.c
1076         (card_getattr_cb, agent_card_getattr): New.
1078         * command-ssh.c (card_key_available): New.
1079         (ssh_handler_request_identities): First see whether a card key is
1080         available.
1082         * gpg-agent.c (handle_connections): Need to check for events if
1083         select returns with -1.
1085 2005-02-23  Werner Koch  <wk@g10code.com>
1087         * command-ssh.c (get_passphrase): Removed.
1088         (ssh_identity_register): Partly rewritten.
1089         (open_control_file, search_control_file, add_control_entry): New.
1090         (ssh_handler_request_identities): Return only files listed in our
1091         control file.
1093         * findkey.c (unprotect): Check for allocation error.
1095         * agent.h (opt): Add fields to record the startup terminal
1096         settings.
1097         * gpg-agent.c (main): Record them and do not force keep display
1098         with --enable-ssh-support.
1099         * command-ssh.c (start_command_handler_ssh): Use them here.
1101         * gpg-agent.c: Renamed option --ssh-support to
1102         --enable-ssh-support.
1104         * command.c (cmd_readkey): New.
1105         (register_commands): Register new command "READKEY".
1107         * command-ssh.c (ssh_request_process): Improved logging.
1109         * findkey.c (agent_write_private_key): Always use plain open.
1110         Don't depend on an umask for permissions.
1111         (agent_key_from_file): Factored file reading code out to ..
1112         (read_key_file): .. new function.
1113         (agent_public_key_from_file): New.
1115 2005-02-22  Werner Koch  <wk@g10code.com>
1117         * command-ssh.c (stream_read_string): Removed call to abort on
1118         memory error because the CVS version of libgcrypt makes sure
1119         that ERRNO gets always set on error even with a faulty user
1120         supplied function.
1122 2005-02-19  Moritz Schulte  <moritz@g10code.com>
1124         * command-ssh.c (ssh_receive_mpint_list): Slightly rewritten, do
1125         not use elems_secret member of key_spec.
1126         (ssh_key_type_spec): Removed member: elems_secret.
1127         (ssh_key_types): Removed elems_secret data.
1128         (ssh_sexp_construct): Renamed to ...
1129         (sexp_key_construct): ... this; changed callers.
1130         (ssh_sexp_extract): Renamed to ...
1131         (sexp_key_extract): ... this; changed callers.
1132         (ssh_sexp_extract_key_type): Renamed to ...
1133         (sexp_extract_identifier): ... this; changed callers; use
1134         make_cstring().
1135         Added more comments.
1137 2005-02-18  Moritz Schulte  <moritz@g10code.com>
1139         * command-ssh.c (ssh_sexp_construct): Rewritten generation of sexp
1140         template, clarified.
1141         (ssh_sexp_extract): Support shadowed-private-key-sexp; treat
1142         protected-private key and shadowed-private-key as public keys.
1143         (key_secret_to_public): Rewritten: simply use ssh_sexp_extract()
1144         and ssh_sexp_construct().
1146 2005-02-15  Werner Koch  <wk@g10code.com>
1148         * findkey.c (modify_description): Don't increment OUT_LEN during
1149         the second pass.
1151 2005-02-14  Moritz Schulte  <moritz@g10code.com>
1153         * command-ssh.c (es_read_byte): Renamed to ...
1154         (stream_es_read_byte): ... this; changed callers.
1155         (es_write_byte): Renamed to ...
1156         (stream_write_byte): ... this; changed callers.
1157         (es_read_uint32): Renamed to ...
1158         (stream_read_uint32): ... this; changed callers.
1159         (es_write_uint32): Renamed to ...
1160         (stream_write_uint32): ... this; changed callers.
1161         (es_read_data): Renamed to ...
1162         (stream_read_data): ... this; changed callers.
1163         (es_write_data): Renamed to ...
1164         (stream_write_data): ... this; changed callers.
1165         (es_read_string): Renamed to ...
1166         (stream_read_string): ... this; changed callers.
1167         (es_read_cstring): Renamed to ...
1168         (stream_read_cstring): ... this; changed callers.
1169         (es_write_string): Renamed to ...
1170         (stream_write_string): ... this; changed callers.
1171         (es_write_cstring): Renamed to ...
1172         (stream_write_cstring): ... this; changed callers.
1173         (es_read_mpi): Renamed to ...
1174         (stream_read_mpi): ... this; changed callers.
1175         (es_write_mpi): Renamed to ...
1176         (stream_write_mpi): ... this; changed callers.
1177         (es_copy): Renamed to ...
1178         (stream_copy): ... this; changed callers.
1179         (es_read_file): Renamed to ...
1180         (file_to_buffer): ... this; changed callers.
1181         (ssh_identity_register): Removed variable description_length;
1182         changed code to use asprintf for description.
1183         (stream_write_uint32): Do not filter out the last byte of shift
1184         expression.
1185         (uint32_construct): New macro ...
1186         (stream_read_uint32): ... use it; removed unnecessary cast.
1188 2005-02-03  Werner Koch  <wk@g10code.com>
1190         * agent.h (agent_exit): Add JNLIB_GCC_A_NR to indicate that this
1191         function won't return.
1193         * gpg-agent.c (check_for_running_agent): Initialize pid to a
1194         default value if not needed.
1196         * command-ssh.c: Removed stdint.h.  s/byte_t/unsigned char/,
1197         s/uint32/u32/ becuase that is what we have always used in GnuPG.
1198         (ssh_request_specs): Moved to top of file.
1199         (ssh_key_types): Ditto.
1200         (make_cstring): Ditto.
1201         (data_sign): Don't use a variable for the passphrase prompt, make
1202         it translatable.
1203         (ssh_request_process): 
1204         
1206         * findkey.c (modify_description): Renamed arguments for clarity,
1207         polished documentation.  Make comment a C-string.  Fixed case of
1208         DESCRIPTION being just "%".
1209         (agent_key_from_file): Make sure comment string to a C-string.
1211         * gpg-agent.c (create_socket_name): Cleanup the implemntation, use
1212         DIMof, agent_exit, removed superflous args and return the
1213         allocated string as value.  Documented.  Changed callers.
1214         (create_server_socket): Cleanups similar to above.  Changed callers.
1215         (cleanup_do): Renamed to ..
1216         (remove_socket): .. this.  Changed caller.
1217         (handle_connections): The signals are to be handled in the select
1218         and not in the accept.  Test all FDs after returning from a
1219         select.  Remove the event tests from the accept calls.  The select
1220         already assured that the accept won't block.
1222 2005-01-29  Moritz Schulte  <moritz@g10code.com>
1224         * command-ssh.c (ssh_handler_request_identities)
1225         (ssh_handler_sign_request, ssh_handler_add_identity)
1226         (ssh_handler_remove_identity, ssh_handler_remove_all_identities)
1227         (ssh_handler_lock, ssh_handler_unlock): Changed to return an error
1228         code instead of a boolean.
1229         (ssh_request_process): Changed to return a boolean instead of an
1230         error; adjust caller.
1231         (ssh_request_handle_t): Adjusted type.
1232         (ssh_request_spec): New member: identifier.
1233         (REQUEST_SPEC_DEFINE): New macro; use it for initialization of
1234         request_specs[].
1235         (ssh_request_process): In debugging mode, log identifier of
1236         handler to execute.
1237         (start_command_handler_ssh): Moved most of the stream handling
1238         code ...
1239         (ssh_request_process): ... here.
1241 2005-01-28  Moritz Schulte  <moritz@g10code.com>
1243         * command-ssh.c (ssh_handler_add_identity): Pass ctrl to
1244         ssh_identity_register().
1245         (ssh_identity_register): New argument: ctrl; pass ctrl to
1246         get_passphrase().
1247         (get_passphrase): Pass ctrl instead of NULL to agent_askpin().
1248         (start_command_handler_ssh): Use agent_init_default_ctrl();
1249         deallocate structure members, which might be dynamically
1250         allocated.
1251         (lifetime_default): Removed variable.
1252         (ssh_handler_add_identity): Fix ttl handling; renamed variable
1253         `death' to `ttl'.
1254         (ssh_identity_register): Fix key grip handling.
1256 2005-01-26  Moritz Schulte  <moritz@g10code.com>
1258         * command-ssh.c (ssh_handler_sign_request): Confirm to agent
1259         protocol in case of failure.
1261         * command-ssh.c: New file.
1263         * Makefile.am (gpg_agent_SOURCES): New source file: command-ssh.c.
1265         * findkey.c (modify_description): New function.
1266         (agent_key_from_file): Support comment field in key s-expressions.
1268         * gpg-agent.c (enum cmd_and_opt_values): New item: oSSHSupport.
1269         (opts) New entry for oSSHSupport.
1270         New variable: socket_name_ssh.
1271         (cleanup_do): New function based on cleanup().
1272         (cleanup): Use cleanup_do() for socket_name and socket_name_ssh.
1273         (main): New switch case for oSSHSupport.
1274         (main): Move socket name creation code to ...
1275         (create_socket_name): ... this new function.
1276         (main): Use create_socket_name() for creating socket names for
1277         socket_name and for socket_name_ssh in case ssh support is
1278         enabled.
1279         Move socket creation code to ...
1280         (create_server_socket): ... this new function.
1281         (main): Use create_server_socket() for creating sockets.
1282         In case standard_socket is set, do not only store a socket name in
1283         socket_name, but also in socket_name_ssh.
1284         Generate additional environment info strings for ssh support.
1285         Pass additional ssh socket argument to handle_connections.
1286         (start_connection_thread_ssh): New function.
1287         (handle_connections): Use select to multiplex between gpg-agent
1288         and ssh-agent protocol.
1290         * agent.h (struct opt): New member: ssh_support.
1291         (start_command_handler_ssh): Add prototype.
1293 2005-01-04  Werner Koch  <wk@g10code.com>
1295         * trustlist.c (agent_marktrusted): Use "Cancel" for the first
1296         confirmation and made the strings translatable.
1298         * cache.c (agent_put_cache): Fix the test for using the default
1299         TTL.
1301 2004-12-21  Werner Koch  <wk@g10code.com>
1303         * preset-passphrase.c (preset_passphrase): Handle --passphrase.
1305         * Makefile.am (gpg_preset_passphrase_LDADD): Reorder libs so that
1306         pwquery may use stuff from jnlib.  Conditionally add -lwsock2
1307         (gpg_protect_tool_LDADD): Ditto.
1309         * preset-passphrase.c (main): Use default_homedir().
1310         (main) [W32]: Initialize sockets.
1312 2004-12-21  Marcus Brinkmann  <marcus@g10code.de>
1314         * Makefile.am (libexec_PROGRAMS): Add gpg-preset-passphrase.
1315         (gpg_preset_passphrase_SOURCES, gpg_preset_passphrase_LDADD): New
1316         targets.
1317         * agent.h (opt): New member allow_cache_passphrase.
1318         * cache.c (housekeeping): Check if R->ttl is not negative.
1319         (agent_put_cache): Allow ttl to be negative.
1320         * command.c (parse_hexstring): Allow something to follow the
1321         hexstring.
1322         (cmd_cache_passphrase): New function.
1323         (register_commands): Add it.
1324         * gpg-agent.c: Handle --allow-preset-passphrase.
1325         * preset-passphrase.c: New file.
1327 2004-12-21  Werner Koch  <wk@g10code.com>
1329         * gpg-agent.c (main): Use default_homedir().
1330         * protect-tool.c (main): Ditto. 
1332 2004-12-20  Werner Koch  <wk@g10code.com>
1334         * gpg-agent.c (main) [W32]: Now that Mutexes work we can remove
1335         the pth_init kludge.
1336         (main): Add new options --[no-]use-standard-socket.
1337         (check_for_running_agent): Check whether it is running on the
1338         standard socket.
1340         * call-scd.c (init_membuf, put_membuf, get_membuf): Removed.  We
1341         now use the identical implementation from ../common/membuf.c.
1343         * pksign.c (agent_pksign): Changed arg OUTFP to OUTBUF and use
1344         membuf functions to return the value.
1345         * pkdecrypt.c (agent_pkdecrypt): Ditto.
1346         * genkey.c (agent_genkey): Ditto.
1347         * command.c (cmd_pksign, cmd_pkdecrypt, cmd_genkey): Replaced
1348         assuan_get_data_fp() by a the membuf scheme.
1349         (clear_outbuf, write_and_clear_outbuf): New.
1351 2004-12-19  Werner Koch  <wk@g10code.com>
1353         * query.c (initialize_module_query): New.
1354         * call-scd.c (initialize_module_call_scd): New.
1355         * gpg-agent.c (main): Call them.
1356         
1357 2004-12-18  Werner Koch  <wk@g10code.com>
1359         * gpg-agent.c (main):  Remove special Pth initialize.
1361         * agent.h (map_assuan_err): Define in terms of
1362         map_assuan_err_with_source.
1364 2004-12-17  Moritz Schulte  <moritz@g10code.com>
1366         * query.c: Undo change from 2004-12-05.
1368 2004-12-15  Werner Koch  <wk@g10code.com>
1370         * gpg-agent.c [W32]: Various hacks to make it work.
1372         * findkey.c (agent_write_private_key) [W32]: Adjust open call.
1374         * call-scd.c (start_scd) [W32]: Don't check whether the daemon
1375         didn't died.  To hard to do under Windows.
1376         (start_scd) [W32]: Disable sending of the event signal option.
1378         * protect-tool.c (read_file, export_p12_file) [W32]: Use setmode
1379         to get stdout and stin into binary mode.
1381 2004-12-05  Moritz Schulte  <moritz@g10code.com>
1383         * query.c (start_pinentry): Allow CTRL be NULL.
1385 2004-10-22  Werner Koch  <wk@g10code.com>
1387         * gpg-agent.c (parse_rereadable_options): Return "not handled"
1388         when the log file has not beend hadled.  This is will let the main
1389         option processing continue. Fixed a bug introduced on 2004-09-4
1390         resulting in logging to stderr until a HUP has been given.
1391         (main): Don't close the listen FD.
1393 2004-09-30  Werner Koch  <wk@g10code.com>
1395         * Makefile.am: Adjusted from gettext 1.14.
1397 2004-09-29  Werner Koch  <wk@g10code.com>
1399         * minip12.c (parse_bag_encrypted_data): Print error if a bad
1400         passphrase has been given.
1402 2004-09-28  Werner Koch  <wk@g10code.com>
1404         * protect.c (agent_unprotect): Fixed wiping of CLEARTEXT.  Thanks
1405         to Moritz for pointing this out.
1407 2004-09-25  Moritz Schulte  <moritz@g10code.com>
1408         
1409         * agent.h: Declare: agent_pksign_do.
1410         (struct server_control_s): New member: raw_value.
1411         
1412         * pksign.c (do_encode_md): New argument: raw_value; support
1413         generation of raw (non-pkcs1) data objects; adjust callers.
1414         (agent_pksign_do): New function, based on code ripped
1415         out from agent_pksign.
1416         (agent_pksign): Use agent_pksign_do.
1418         * command.c (start_command_handler): Set ctrl.digest.raw_value.
1419         
1420 2004-09-09  Werner Koch  <wk@g10code.de>
1422         * gpg-agent.c (check_for_running_agent): New.
1423         (main): The default action is now to check for an already running
1424         agent.
1425         (parse_rereadable_options): Set logfile only on reread.
1426         (main): Do not print the "is development version" note.
1428 2004-08-20  Werner Koch  <wk@g10code.de>
1430         * gpg-agent.c: New option --max-cache-ttl.  Suggested by Alexander
1431         Belopolsky.
1432         * cache.c (housekeeping): Use it here instead of the hardwired
1433         default of 1 hour.
1435         * query.c (start_pinentry): Use a timeout for the pinentry lock.
1437 2004-08-18  Werner Koch  <wk@g10code.de>
1439         * protect-tool.c (get_passphrase): Make sure that the default
1440         prompts passed to gpg-agent are utf-8 encoded. Add new prompt values.
1441         (import_p12_file, import_p12_file, export_p12_file): Changed calls
1442         to get_passphrase so that better prompts are displayed.
1443         (get_new_passphrase): New.
1445 2004-07-22  Werner Koch  <wk@g10code.de>
1447         * trustlist.c (read_list): Allow colons in the fingerprint.
1448         (headerblurb): Rephrased.
1450         * gpg-agent.c (handle_connections): Increase the stack size ot 256k.
1452 2004-06-20  Moritz Schulte  <moritz@g10code.com>
1454         * gpg-agent.c: Include <sys/stat.h> (build fix for BSD).
1456 2004-05-11  Werner Koch  <wk@gnupg.org>
1458         * gpg-agent.c (handle_signal): Reload the trustlist on SIGHUP.
1459         (start_connection_thread): Hack to simulate a ticker.
1460         * trustlist.c (agent_trustlist_housekeeping) 
1461         (agent_reload_trustlist): New.  Protected all global functions
1462         here with a simple counter which is sufficient for Pth.
1464 2004-05-03  Werner Koch  <wk@gnupg.org>
1466         * gpg-agent.c: Remove help texts for options lile --lc-ctype.
1467         (main): New option --allow-mark-trusted. 
1468         * trustlist.c (agent_marktrusted): Use it here.
1470 2004-04-30  Werner Koch  <wk@gnupg.org>
1472         * protect-tool.c: New option --enable-status-msg.
1473         (store_private_key): Print status messages for imported keys.
1474         (read_and_unprotect): Ditto for bad passphrase.
1476         * gpg-agent.c (parse_rereadable_options): New arg REREAD.  Allow
1477         changing oLogFile.
1478         (current_logfile): New.
1480 2004-04-26  Werner Koch  <wk@gnupg.org>
1482         * call-scd.c (start_scd): Do not register an event signal if we
1483         are running as a pipe server.
1485 2004-04-21  Werner Koch  <wk@gnupg.org>
1487         * call-scd.c (start_scd): Send event-signal option. Always check
1488         that the scdaemon is still running.
1490         * gpg-agent.c (handle_signal): Do not use SIGUSR{1,2} anymore for
1491         changing the verbosity.
1493 2004-04-16  Werner Koch  <wk@gnupg.org>
1495         * gpg-agent.c (main): Tell the logging code that we are running
1496         detached.
1498 2004-04-06  Werner Koch  <wk@gnupg.org>
1500         * gpg-agent.c (main): Use new libgcrypt thread library register
1501         scheme.
1503 2004-03-23  Marcus Brinkmann  <marcus@g10code.de>
1505         * gpg-agent.c (main): For now, always print the default config
1506         file name for --gpgconf-list.
1508 2004-03-17  Werner Koch  <wk@gnupg.org>
1510         * gpg-agent.c (main) <gpgconf>: Fixed default value quoting.
1512 2004-03-16  Werner Koch  <wk@gnupg.org>
1514         * gpg-agent.c (parse_rereadable_options): Use the new
1515         DEFAULT_CACHE_TTL macro.
1516         (main): Updated --gpgconf-list output.
1518 2004-02-21  Werner Koch  <wk@gnupg.org>
1520         * command.c (cmd_passwd): Take acount of a key description.
1522         * genkey.c (reenter_compare_cb): Do not set the error text.
1523         (agent_protect_and_store, agent_genkey): Force a re-enter after a
1524         non-matching passphrase.
1525         * query.c (agent_askpin): Add new arg INITIAL_ERRTEXT; changed
1526         all callers.
1528 2004-02-19  Werner Koch  <wk@gnupg.org>
1530         * protect-tool.c: New options --have-cert and --prompt.
1531         (export_p12_file): Read a certificate from STDIN and pass it to
1532         p12_build.  Detect a keygrip and construct the filename in that
1533         case.  Unprotcet a key if needed.  Print error messages for key
1534         formats we can't handle.
1535         (release_passphrase): New.
1536         (get_passphrase): New arg PROMPTNO. Return the allocated
1537         string. Changed all callers.
1539         * minip12.c: Revamped the build part.
1540         (p12_build): New args CERT and CERTLEN.  
1542 2004-02-18  Werner Koch  <wk@gnupg.org>
1544         * protect-tool.c (main): Setup the used character set.
1545         * gpg-agent.c (main): Ditto.
1547         * gpg-agent.c (set_debug): New.  New option --debug-level.
1548         (main): New option --gpgconf-list.
1550 2004-02-17  Werner Koch  <wk@gnupg.org>
1552         * pksign.c (do_encode_md): Cleaned up by using gcry_sexp_build.
1554         * Makefile.am (gpg_protect_tool_SOURCES): Removed
1555         simple-pwquery.[ch], as we once moved it to ../common.
1557 2004-02-13  Werner Koch  <wk@gnupg.org>
1559         * command.c (cmd_setkeydesc): New.
1560         (register_commands): Add command SETKEYDESC.
1561         (cmd_pksign, cmd_pkdecrypt): Use the key description.
1562         (reset_notify): Reset the description.
1563         * findkey.c (unprotect): Add arg DESC_TEXT.
1564         (agent_key_from_file): Ditto.
1565         * pksign.c (agent_pksign): Ditto.
1566         * pkdecrypt.c (agent_pkdecrypt): Ditto. Made CIPHERTEXT an
1567         unsigned char*.
1569         * protect-tool.c (main): New options --no-fail-on-exist, --homedir.
1570         (store_private_key): Use them here.
1572 2004-02-12  Werner Koch  <wk@gnupg.org>
1574         * protect-tool.c (read_file, main): Allow reading from stdin.
1576         * Makefile.am: Include cmacros.am for common flags.
1577         (libexec_PROGRAMS): Put gpg-protect-tool there.
1579 2004-02-10  Werner Koch  <wk@gnupg.org>
1581         * minip12.c (parse_bag_encrypted_data): Finished implementation.
1582         (p12_parse): Add callback args.
1583         * protect-tool.c (import_p12_cert_cb): New.
1584         (import_p12_file): Use it.
1586 2004-02-06  Werner Koch  <wk@gnupg.org>
1588         * minip12.c (crypt_block): Add arg CIPHER_ALGO; changed all callers.
1589         (set_key_iv): Add arg KEYBYTES; changed caller.
1591 2004-02-03  Werner Koch  <wk@gnupg.org>
1593         * findkey.c (agent_key_from_file): Extra paranoid wipe.
1594         * protect.c (agent_unprotect): Ditto.
1595         (merge_lists): Ditto. Add arg RESULTLEN.
1596         * pkdecrypt.c (agent_pkdecrypt): Don't show the secret key even in
1597         debug mode.
1599         * protect.c: Add DSA and Elgamal description.
1601 2004-01-29  Werner Koch  <wk@gnupg.org>
1603         * agent.h (server_control_s): Add connection_fd field.
1604         * command.c (start_command_handler): Init it here.
1605         * gpg-agent.c (agent_init_default_ctrl): and here.
1606         * call-scd.c: Add the CTRL arg to all functions calling start_scd
1607         and pass it to start_scd.  Changed all callers
1608         (start_scd): Keep track of the current active connection.
1609         (agent_reset_scd): New.
1610         * command.c (start_command_handler): Call it here.
1611         * learncard.c (agent_handle_learn): Add arg CTRL; changed caller.
1612         (send_cert_back): Ditto.
1614 2004-01-28  Werner Koch  <wk@gnupg.org>
1616         * trustlist.c (agent_marktrusted): Check whether the trustlist is
1617         writable.
1619 2004-01-27  Werner Koch  <wk@gnupg.org>
1621         * sexp-parse.h: Moved to ../common.
1623 2004-01-24  Werner Koch  <wk@gnupg.org>
1625         * call-scd.c (atfork_cb): New.
1626         (start_scd): Make sure secmem gets cleared.
1627         * query.c  (atfork_cb): New.
1628         (start_pinentry): Make sure secmem gets cleared.
1630 2004-01-16  Werner Koch  <wk@gnupg.org>
1632         * findkey.c (agent_key_from_file): Now return an error code so
1633         that we have more detailed error messages in the upper layers.
1634         This fixes the handling of pinentry's cancel button. 
1635         * pksign.c (agent_pksign): Changed accordingly.
1636         * pkdecrypt.c (agent_pkdecrypt): Ditto.
1637         * command.c (cmd_passwd): Ditto.
1639 2003-12-16  Werner Koch  <wk@gnupg.org>
1641         * gpg-agent.c (main): Set the prefixes for assuan logging.
1643 2003-12-15  Werner Koch  <wk@gnupg.org>
1645         * protect.c (do_encryption): Use gcry_create_nonce instad of the
1646         obsolete WEAK_RANDOM.
1648 2003-11-20  Werner Koch  <wk@gnupg.org>
1650         * sexp-parse.h (snext): Don't use atoi_1 and digitp macros, so
1651         that this file is useful by other applications too.
1653 2003-10-27  Werner Koch  <wk@gnupg.org>
1655         * command.c (cmd_get_confirmation): New command.
1657 2003-08-20  Timo Schulz  <twoaday@freakmail.de>
1659         * pksign.c (do_encode_md): Allocate enough space. Cast md
1660         byte to unsigned char to prevent sign extension.
1661         
1662 2003-08-14  Timo Schulz  <twoaday@freakmail.de>
1664         * pksign.c (do_encode_md): Due to the fact pkcs#1 padding
1665         is now in Libgcrypt, use the new interface.
1666         
1667 2003-07-31  Werner Koch  <wk@gnupg.org>
1669         * Makefile.am (gpg_agent_LDADD): Added INTLLIBS.
1670         (gpg_protect_tool_SOURCES): Added simple-pwquery.[ch]
1672 2003-07-27  Werner Koch  <wk@gnupg.org>
1674         Adjusted for gcry_mpi_print and gcry_mpi_scan API change.
1676 2003-07-15  Werner Koch  <wk@gnupg.org>
1678         * simple-pwquery.c, simple-pwquery.h:  Moved to ../common.
1679         * Makefile.am (gpg_protect_tool_LDADD): Add simple-pwquery.o.
1680         Removed it from xx_SOURCES.
1682 2003-07-04  Werner Koch  <wk@gnupg.org>
1684         * gpg-agent.c (handle_connections): Kludge to allow use of Pth 1
1685         and 2.
1687 2003-06-30  Werner Koch  <wk@gnupg.org>
1689         * call-scd.c (learn_status_cb): Store the serialno in PARM.
1691 2003-06-26  Werner Koch  <wk@gnupg.org>
1693         * call-scd.c (agent_card_serialno): Don't do a RESET anymore.
1695 2003-06-25  Werner Koch  <wk@gnupg.org>
1697         * command.c (cmd_scd): New.
1698         * call-scd.c (agent_card_scd): New.
1699         * divert-scd.c (divert_generic_cmd): New
1701         * call-scd.c (agent_card_learn): New callback args SINFO.
1702         (learn_status_cb): Pass all other status lines to the sinfo
1703         callback.
1704         * learncard.c (release_sinfo, sinfo_cb): New.
1705         (agent_handle_learn): Pass the new cb to the learn function and
1706         pass the collected information back to the client's assuan
1707         connection.
1709         * gpg-agent.c (main): Moved pth_init before gcry_check_version.
1711 2003-06-24  Werner Koch  <wk@gnupg.org>
1713         * gpg-agent.c (handle_connections): Adjusted for Pth 2.0
1715         Adjusted for changes in the libgcrypt API. Some more fixes for the
1716         libgpg-error stuff.  
1718 2003-06-04  Werner Koch  <wk@gnupg.org>
1720         Renamed error codes from INVALID to INV and removed _ERROR suffixes.
1722 2003-06-03  Werner Koch  <wk@gnupg.org>
1724         Changed all error codes in all files to the new libgpg-error scheme.
1726         * agent.h: Include gpg-error.h and errno.h
1727         * Makefile.am: Link with libgpg-error
1729         * query.c: assuan.h is now a system header.
1730         * genkey.c (agent_genkey): Fixed silly use of xmalloc by
1731         xtrymalloc.
1733 2003-04-29  Werner Koch  <wk@gnupg.org>
1735         * command.c (register_commands): Adjusted for new Assuan semantics.
1737         * Makefile.am: Don't override LDFLAGS.
1739 2002-12-04  Werner Koch  <wk@gnupg.org>
1741         * gpg-agent.c: New variable config_filename.
1742         (parse_rereadable_options): New.
1743         (main): Use it here.  Add setting of default values, set
1744         config_filename.
1745         (reread_configuration): Filled with actual code.
1747 2002-12-03  Werner Koch  <wk@gnupg.org>
1749         * protect-tool.c (read_key): Don't run make_canonical on a NULL
1750         buffer.
1752         * command.c (parse_hexstring): New.
1753         (cmd_sethash): Use it.
1754         (parse_keygrip): New.
1755         (cmd_havekey, cmd_sigkey): Use it.
1756         (cmd_passwd): New.
1757         * genkey.c (agent_protect_and_store): New.
1758         (store_key): Add arg FORCE.
1759         (agent_genkey): Pass false to this force of store_key.
1761 2002-11-13  Werner Koch  <wk@gnupg.org>
1763         * gpg-agent.c (main): Switch all messages to utf-8.
1765         * simple-pwquery.c (agent_send_all_options): Use $GPG_TTY and
1766         stdin with ttyname.
1768         * cache.c (new_data): Uiih - /sizeof d/sizeof *d/.
1770 2002-11-10  Werner Koch  <wk@gnupg.org>
1772         * command.c (option_handler): Fix keep_tty check.
1774 2002-11-06  Werner Koch  <wk@gnupg.org>
1776         * gpg-agent.c (main): Make sure we have a default ttyname.
1777         * command.c (option_handler): Check opt.keep_tty here
1778         * query.c (start_pinentry): but not anymore here.
1780 2002-11-05  Werner Koch  <wk@gnupg.org>
1782         * agent.h (opt,server_control_s): Move display and lc_ variables
1783         to the control struct so that they are per connection.
1784         * gpg-agent.c (agent_init_default_ctrl): New.
1785         (main): Assign those command line options to new default_* variables.
1786         Reset DISPLAY in server mode so that tehre is no implicit default.
1787         * command.c (start_command_handler): Initialize and deinitialize
1788         the control values.
1789         (option_handler): Work on the ctrl values and not on the opt.
1790         * query.c (start_pinentry): New argument CTRL to set the display
1791         connection specific.  Changed all callers to pass this value.
1792         (agent_askpin,agent_get_passphrase,agent_get_confirmation): Add
1793         CTRL arg and pass it ot start_pinentry.
1794         * command.c (cmd_get_passphrase): Pass CTRL argument.
1795         * trustlist.c (agent_marktrusted):  Add CTRL argument  
1796         * command.c (cmd_marktrusted): Pass CTRL argument
1797         * divert-scd.c (ask_for_card):  Add CTRL arg. 
1798         (divert_pksign,divert_pkdecrypt): Ditto.  Changed caller.
1799         (getpin_cb): Use OPAQUE to pass the CTRL variable.  Changed both 
1800         users.
1801         * findkey.c (unprotect): Add CTRL arg.
1802         (agent_key_from_file): Ditto.
1804         * query.c (unlock_pinentry): Disconnect the pinentry so that we
1805         start a new one for each request.  This is required to support
1806         clients with different environments (e.g. X magic cookies).
1808 2002-09-05  Neal H. Walfield  <neal@cs.uml.edu>
1810         * gpg-agent.c (main) [USE_GNU_PTH]: No need to call
1811         assuan_set_io_func as assuan is smart.
1813 2002-09-25  Werner Koch  <wk@gnupg.org>
1815         * gpg-agent.c (handle_signal): Flush cache on SIGHUP.
1816         * cache.c (agent_flush_cache): New.
1818         * gpg-agent.c, agent.h: Add --keep-display and --keep-tty.
1819         * query.c (start_pinentry): Implement them.  The option passing
1820         needs more thoughts.
1822 2002-09-09  Werner Koch  <wk@gnupg.org>
1824         * gpg-agent.c (create_private_keys_directory)
1825         (create_directories): New.
1826         (main): Try to create a home directory.
1828 2002-09-04  Neal H. Walfield  <neal@g10code.de>
1830         * gpg-agent.c (main): Use sigaction, not signal.
1832 2002-09-03  Neal H. Walfield  <neal@g10code.de>
1834         * findkey.c: Include <fcntl.h>.
1835         (agent_write_private_key): Prefer POSIX compatibity, open and
1836         fdopen, over the simplicity of GNU extensions, fopen(file, "x").
1838 2002-08-22  Werner Koch  <wk@gnupg.org>
1840         * query.c (agent_askpin): Provide the default desc text depending
1841         on the pininfo.  Do the basic PIN verification only when
1842         min_digits is set.
1844 2002-08-21  Werner Koch  <wk@gnupg.org>
1846         * query.c (agent_askpin): Hack to show the right default prompt.
1847         (agent_get_passphrase): Ditto.
1849         * trans.c: Removed and replaced all usages with standard _()
1851         * divert-scd.c (getpin_cb): Pass a more descritive text to the
1852         pinentry.
1854         * Makefile.am: Renamed the binary protect-tool to gpg-protect-tool.
1855         * protect-tool.c: Removed the note about internal use only.
1857         * gpg-agent.c (main): New option --daemon so that the program is
1858         not accidently started in the background.
1860 2002-08-16  Werner Koch  <wk@gnupg.org>
1862         * call-scd.c (learn_status_cb): Handle CERTINFO status.
1863         (agent_card_learn): Add args for certinfo cb.
1864         * learncard.c (release_certinfo,certinfo_cb): New.
1865         (send_cert_back): New. With factored out code from ..
1866         (agent_handle_learn): here.  Return certinfo stuff.
1868 2002-07-26  Werner Koch  <wk@gnupg.org>
1870         * gpg-agent.c (main): New option --ignore-cache-for-signing.
1871         * command.c (option_handler): New server option
1872         use-cache-for-signing defaulting to true.
1873         (cmd_pksign): handle global and per session option.
1874         * findkey.c (agent_key_from_file, unprotect): New arg
1875         ignore_cache.  Changed all callers.
1876         * pksign.c (agent_pksign): Likewise.
1878 2002-06-29  Werner Koch  <wk@gnupg.org>
1880         * query.c (start_pinentry): Use GNUPG_DERAULT_PINENTRY.
1881         * call-scd.c (start_scd): Use GNUPG_DEFAULT_SCDAEMON.
1883 2002-06-28  Werner Koch  <wk@gnupg.org>
1885         * protect-tool.c (export_p12_file): New.
1886         (main): New command --p12-export.
1887         * minip12.c (create_final,p12_build,compute_tag_length): New.
1888         (store_tag_length): New.
1890 2002-06-27  Werner Koch  <wk@gnupg.org>
1892         * minip12.c (crypt_block): Renamed from decrypt_block, add arg to
1893         allow encryption.
1895         * Makefile.am (pkglib_PROGRAMS): Put protect-tool there.
1897         * findkey.c (agent_write_private_key,agent_key_from_file)
1898         (agent_key_available): Use GNUPG_PRIVATE_KEYS_DIR constant.
1899         * gpg-agent.c (main): Use GNUPG_DEFAULT_HOMEDIR constant.
1901         * protect-tool.c (store_private_key): New.
1902         (import_p12_file): Store the new file if requested.
1903         (main): New options --force and --store.
1905         * gpg-agent.c (main): Set a global flag when running detached.
1906         * query.c (start_pinentry): Pass the list of FD to keep in the
1907         child when not running detached.
1908         * call-scd.c (start_scd): Ditto.
1910 2002-06-26  Werner Koch  <wk@gnupg.org>
1912         * command.c (cmd_istrusted, cmd_listtrusted, cmd_marktrusted)
1913         (cmd_pksign, cmd_pkdecrypt, cmd_genkey, cmd_get_passphrase)
1914         (cmd_learn): Print an error message for a failed operation.
1916         * simple-pwquery.c, simple-pwquery.h: New.
1917         * protect-tool. (get_passphrase): New, used to get a passphrase
1918         from the agent if none was given on the command line.
1920 2002-06-25  Werner Koch  <wk@gnupg.org>
1922         * protect-tool.c (rsa_key_check): New.
1923         (import_p12_file): New.
1924         (main): New command --p12-import.
1925         * minip12.c, minip12.h: New.
1927 2002-06-24  Werner Koch  <wk@gnupg.org>
1929         * protect-tool.c (read_file): New.
1930         (read_key): Factored most code out to read_file.
1932 2002-06-17  Werner Koch  <wk@gnupg.org>
1934         * agent.h: Add a callback function to the pin_entry_info structure.
1935         * query.c (agent_askpin): Use the callback to check for a correct
1936         PIN.  Removed the start_err_text argument because it is not
1937         anymore needed; changed callers.
1938         * findkey.c (unprotect): Replace our own check loop by a callback.
1939         (try_unprotect_cb): New.
1940         * genkey.c (reenter_compare_cb): New.
1941         (agent_genkey): Use this callback here.  Fixed setting of the pi2
1942         variable and a segv in case of an empty PIN.
1944         * divert-scd.c (getpin_cb): Removed some unused stuff and
1945         explained what we still have to change.
1947 2002-06-12  Werner Koch  <wk@gnupg.org>
1949         * gpg-agent.c (main): New option --disable-pth.
1951 2002-06-11  Werner Koch  <wk@gnupg.org>
1953         * protect-tool.c: Add command --show-keygrip
1954         (show_keygrip): New.
1956 2002-05-23  Werner Koch  <wk@gnupg.org>
1958         * call-scd.c: Seirialized all scdaeom access when using Pth.
1960         * cache.c: Made the cache Pth-thread-safe.
1961         (agent_unlock_cache_entry): New.
1962         * findkey.c (unprotect): Unlock the returned cache value.
1963         * command.c (cmd_get_passphrase): Ditto.
1965         * gpg-agent.c (main): Register pth_read/write with Assuan.
1967 2002-05-22  Werner Koch  <wk@gnupg.org>
1969         * query.c: Serialized all pinentry access when using Pth.
1971         * gpg-agent.c (handle_signal,start_connection_thread)
1972         (handle_connections): New
1973         (main): Use the new Pth stuff to allow concurrent connections.
1974         * command.c (start_command_handler): Add new arg FD so that the
1975         fucntion can also be used for an already connected socket.
1976         * Makefile.am: Link with Pth.
1978 2002-05-14  Werner Koch  <wk@gnupg.org>
1980         * cache.c (housekeeping, agent_put_cache): Use our time() wrapper.
1982 2002-04-26  Werner Koch  <wk@gnupg.org>
1984         * cache.c (agent_put_cache): Reinitialize the creation time and
1985         the ttl when reusing a slot.
1987         * call-scd.c (start_scd): Print debug messages only with debug
1988         flags set.
1989         * query.c (start_pinentry): Ditto.
1991 2002-04-25  Marcus Brinkmann  <marcus@g10code.de>
1993         * agent.h (agent_get_confirmation): Replace paramter prompt with
1994         two parameters ok and cancel.
1995         * query.c (agent_get_confirmation): Likewise.  Implement this.
1996         * trustlist.c (agent_marktrusted): Fix invocation of
1997         agent_get_confirmation.
1998         * divert-scd.c (ask_for_card): Likewise.
2000 2002-04-24  Marcus Brinkmann  <marcus@g10code.de>
2002         * agent.h (struct opt): Add members display, ttyname, ttytype,
2003         lc_ctype, and lc_messages.
2004         * gpg-agent.c (enum cmd_and_opt_values): Add oDisplay, oTTYname,
2005         oTTYtype, oLCctype, and LCmessages.
2006         (main): Handle these options.
2007         * command.c (option_handler): New function.
2008         (register_commands): Register option handler.
2009         * query.c (start_pinentry): Pass the various display and tty
2010         options to the pinentry.
2012 2002-04-05  Werner Koch  <wk@gnupg.org>
2014         * protect-tool.c (show_file): New.  Used as default action.
2016 2002-03-28  Werner Koch  <wk@gnupg.org>
2018         * divert-scd.c (encode_md_for_card): Don't do the pkcs-1 padding,
2019         the scdaemon should take care of it.
2020         (ask_for_card): Hack to not display the trailing zero.
2022 2002-03-11  Werner Koch  <wk@gnupg.org>
2024         * learncard.c (kpinfo_cb): Remove the content restrictions from
2025         the keyID.
2027 2002-03-06  Werner Koch  <wk@gnupg.org>
2029         * learncard.c: New.
2030         * divert-scd.c (ask_for_card): The serial number is binary so
2031         convert it to hex here.
2032         * findkey.c (agent_write_private_key): New.
2033         * genkey.c (store_key): And use it here.
2034         
2035         * pkdecrypt.c (agent_pkdecrypt): Changed the way the diversion is done.
2036         * divert-scd.c (divert_pkdecrypt): Changed interface and
2037         implemented it.
2039 2002-03-05  Werner Koch  <wk@gnupg.org>
2041         * call-scd.c (inq_needpin): New.
2042         (agent_card_pksign): Add getpin_cb args.
2043         (agent_card_pkdecrypt): New.
2045 2002-03-04  Werner Koch  <wk@gnupg.org>
2047         * pksign.c (agent_pksign): Changed how the diversion is done.
2048         * divert-scd.c (divert_pksign): Changed interface and implemented it.
2049         (encode_md_for_card): New.
2050         * call-scd.c (agent_card_pksign): New.
2052 2002-02-28  Werner Koch  <wk@gnupg.org>
2054         * pksign.c (agent_pksign): Detect whether a Smartcard is to be
2055         used and divert the operation in this case.
2056         * pkdecrypt.c (agent_pkdecrypt): Likewise
2057         * findkey.c (agent_key_from_file): Add optional arg shadow_info
2058         and have it return information about a shadowed key.
2059         * protect.c (agent_get_shadow_info): New.
2061         * protect.c (snext,sskip,smatch): Moved to
2062         * sexp-parse.h: New file.
2063         * divert-scd.c: New.
2064         
2065 2002-02-27  Werner Koch  <wk@gnupg.org>
2067         * protect.c (agent_shadow_key): New.
2069         * command.c (cmd_learn): New command LEARN.
2070         * gpg-agent.c: New option --scdaemon-program.
2071         * call-scd.c (start_scd): New. Based on query.c
2072         * query.c: Add 2 more arguments to all uses of assuan_transact.
2074 2002-02-18  Werner Koch  <wk@gnupg.org>
2076         * findkey.c (unprotect): Show an error message for a bad passphrase.
2078         * command.c (cmd_marktrusted): Implemented.
2079         * trustlist.c (agent_marktrusted): New.
2080         (open_list): Add APPEND arg.
2082         * query.c (agent_get_confirmation): New.
2084 2002-02-06  Werner Koch  <wk@gnupg.org>
2086         * cache.c (housekeeping): Fixed linking in the remove case.
2088 2002-02-01  Werner Koch  <wk@gnupg.org>
2090         * gpg-agent.c: New option --default-cache-ttl.
2091         * cache.c (agent_put_cache): Use it.
2092         
2093         * cache.c: Add a few debug outputs.
2095         * protect.c (agent_private_key_type): New.
2096         * agent.h: Add PRIVATE_KEY_ enums.
2097         * findkey.c (agent_key_from_file): Use it to decide whether we
2098         have to unprotect a key.
2099         (unprotect): Cache the passphrase.
2100         
2101         * findkey.c (agent_key_from_file,agent_key_available): The key
2102         files do now require a ".key" suffix to make a script's life
2103         easier. 
2104         * genkey.c (store_key): Ditto.
2106 2002-01-31  Werner Koch  <wk@gnupg.org>
2108         * genkey.c (store_key): Protect the key.
2109         (agent_genkey): Ask for the passphrase.
2110         * findkey.c (unprotect): Actually unprotect the key.
2111         * query.c (agent_askpin): Add an optional start_err_text. 
2113 2002-01-30  Werner Koch  <wk@gnupg.org>
2115         * protect.c: New.  
2116         (hash_passphrase): Based on the GnuPG 1.0.6 version.
2117         * protect-tool.c: New
2119 2002-01-29  Werner Koch  <wk@gnupg.org>
2121         * findkey.c (agent_key_available): New.
2122         * command.c (cmd_havekey): New.
2123         (register_commands): And register new command.
2125 2002-01-20  Werner Koch  <wk@gnupg.org>
2127         * command.c (cmd_get_passphrase): Remove the plus signs.
2129         * query.c (start_pinentry): Send no-grab option to pinentry
2130         * gpg-agent.c (main): Move variable grab as no_grab to agent.h.
2132 2002-01-19  Werner Koch  <wk@gnupg.org>
2134         * gpg-agent.c (main): Disable core dumps.
2136         * cache.c: New.
2137         * command.c (cmd_get_passphrase): Use the cache.
2138         (cmd_clear_passphrase): Ditto.
2140         * gpg-agent.c:  Removed unused cruft and implement the socket
2141         based server.
2142         (my_strusage): Take bug report address from configure.ac.
2143         * command.c (start_command_handler): Add an argument to start as
2144         regular server.
2145         (start_command_handler): Enable Assuan logging.
2147 2002-01-15  Werner Koch  <wk@gnupg.org>
2149         * trustlist.c: New.
2150         * command.c (cmd_istrusted, cmd_listtrusted, cmd_marktrusted): New.
2152 2002-01-07  Werner Koch  <wk@gnupg.org>
2154         * genkey.c: Store the secret part and return the public part.
2156 2002-01-03  Werner Koch  <wk@gnupg.org>
2158         * command.c (cmd_get_passphrase): New.
2159         (cmd_clear_passphrase): New.
2160         * query.c (agent_get_passphrase): New.
2162 2002-01-02  Werner Koch  <wk@gnupg.org>
2164         * genkey.c: New.
2165         * command.c (cmd_genkey): New.
2167         * command.c (rc_to_assuan_status): Removed and changed all callers
2168         to use map_to_assuan_status.
2169         
2170 2001-12-19  Werner Koch  <wk@gnupg.org>
2172         * keyformat.txt: New. 
2174 2001-12-19  Marcus Brinkmann  <marcus@g10code.de>
2176         * query.c (start_pinentry): Add new argument to assuan_pipe_connect.
2178 2001-12-18  Werner Koch  <wk@gnupg.org>
2180         * Makefile.am: Use LIBGCRYPT macros
2182 2001-12-14  Werner Koch  <wk@gnupg.org>
2184         * gpg-agent.c (main): New option --batch.  New option --debug-wait
2185         n, so that it is possible to attach gdb when used in server mode.
2186         * query.c (agent_askpin): Don't ask in batch mode.
2188         * command.c: Removed the conversion macros as they are now in
2189         ../common/util.h.
2191 2001-12-14  Marcus Brinkmann  <marcus@g10code.de>
2193         * query.c (LINELENGTH): Removed.
2194         (agent_askpin): Use ASSUAN_LINELENGTH, not LINELENGTH.
2196 2001-11-19  Werner Koch  <wk@gnupg.org>
2198         * gpg-agent.c: Removed all GUI code, removed code for old
2199         protocol.  New code to use the Assuan protocol as a server and
2200         also to communicate with a new ask-passphrase utility.
2202 2000-11-22  Werner Koch  <wk@gnupg.org>
2204         * gpg-agent.c (main): csh support by Dan Winship, new options --sh
2205         and --csh and set default by consulting $SHELL.
2207 Mon Aug 21 17:59:17 CEST 2000  Werner Koch  <wk@openit.de>
2209         * gpg-agent.c (passphrase_dialog): Cleanup the window and added the
2210         user supplied text to the window.
2211         (main): Fixed segv in gtk_init when used without a command to start.
2213         * gpg-agent.c: --flush option.
2214         (req_flush): New.
2215         (req_clear_passphrase): Implemented.
2217 Fri Aug 18 14:27:14 CEST 2000  Werner Koch  <wk@openit.de>
2219         * gpg-agent.c: New.
2220         * Makefile.am: New.
2223  Copyright 2001, 2002, 2003, 2004, 2005,
2224            2007 Free Software Foundation, Inc.
2226  This file is free software; as a special exception the author gives
2227  unlimited permission to copy and/or distribute it, with or without
2228  modifications, as long as this notice is preserved.
2230  This file is distributed in the hope that it will be useful, but
2231  WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
2232  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.