1 2009-08-11 Werner Koch <wk@g10code.com>
3 * divert-scd.c (ask_for_card): I18n a prompt string.
5 2009-07-06 Werner Koch <wk@g10code.com>
7 * agent.h: Include session-env.h.
8 (opt): Replace most of the startup_xxx fields by a session_env_t.
9 (struct server_control_s): Likewise.
10 * gpg-agent.c (main): Rewrite setting of the startup fields.
11 (handle_connections, main): Allocate SESSION_ENV.
12 (agent_init_default_ctrl, agent_deinit_default_ctrl): Change
14 * command.c (option_handler): Ditto.
15 (cmd_updatestartuptty): Change accordingly. Protect old values
16 from out of core failures.
17 * command-ssh.c (start_command_handler_ssh): Ditto.
18 (start_command_handler_ssh): Replace strdup by xtrystrdup.
19 * call-pinentry.c (atfork_cb): Pass new envrinmnet variables.
20 (start_pinentry): Use session_env stuff.
21 * protect-tool.c (main): Adjust call to gnupg_prepare_get_passphrase.
23 2009-06-24 Werner Koch <wk@g10code.com>
25 * genkey.c (agent_protect_and_store): Return RC and not 0.
26 * protect.c (do_encryption): Fix ignored error code from malloc.
27 Reported by Fabian Keil.
29 2009-06-17 Werner Koch <wk@g10code.com>
31 * call-pinentry.c (agent_get_confirmation): Add arg WITH_CANCEL.
33 * trustlist.c (agent_marktrusted): Use WITH_CANCEL
35 2009-06-09 Werner Koch <wk@g10code.com>
37 * learncard.c (send_cert_back): Ignore certain error codes.
39 2009-06-05 Werner Koch <wk@g10code.com>
41 * protect-tool.c (store_private_key): Fix last change by appending
44 2009-06-03 Werner Koch <wk@g10code.com>
46 * protect-tool.c: Include estream.h.
47 (store_private_key): Replace stdio streams by estream functions
48 for a portable use of the "x" mode.
49 * trustlist.c: Include estream.h.
50 (agent_marktrusted): Replace stdio stream by estream functions.
52 * protect-tool.c (store_private_key): Use bin2hex.
54 2009-06-02 Werner Koch <wk@g10code.com>
56 * gpg-agent.c (main): Run pth_kill after fork. Fixes bug#1066.
58 2009-05-19 Werner Koch <wk@g10code.com>
60 * gpg-agent.c (JNLIB_NEED_AFLOCAL): Define.
61 (create_server_socket): Use SUN_LEN macro.
63 2009-05-15 Werner Koch <wk@g10code.com>
67 * agent.h (lookup_ttl_t): New.
68 * findkey.c (unprotect): Add arg LOOKUP_TTL.
69 (agent_key_from_file): Ditto.
70 * pksign.c (agent_pksign_do): Ditto.
71 * command-ssh.c (ttl_from_sshcontrol): New.
72 (data_sign): Pass new function to agent_pksign_do.
73 (search_control_file): Add new arg R_TTL.
75 2009-05-14 Werner Koch <wk@g10code.com>
77 * command.c (cmd_get_passphrase): Add option --qualitybar.
78 * call-pinentry.c (agent_askpin): Factor some code out to ...
79 (setup_qualitybar): .. new.
80 (agent_get_passphrase): Add arg WITH_QUALITYBAR and implement it.
82 2009-04-14 Marcus Brinkmann <marcus@g10code.de>
84 * call-pinentry.c (agent_get_confirmation): Try SETNOTOK command
87 2009-04-01 Werner Koch <wk@g10code.com>
89 * protect-tool.c (pe_opt): New.
90 (opts): Add option --agent-program. Use ARGPARSE macros.
91 (get_new_passphrase): Remove.
92 (get_passphrase): Use gpg-agent directly. Remove arg OPT_CHECK and
94 * Makefile.am (gpg_protect_tool_LDADD): Replace pwquery_libs by
96 (gpg_protect_tool_CFLAGS): New.
98 * command.c (percent_plus_unescape): Remove.
99 (cmd_putval): Use percent_plus_unescape_inplace.
100 * call-scd.c (unescape_status_string): Remove.
101 (card_getattr_cb): Use percent_plus_unescape.
102 * protect-tool.c (main): Use percent_plus_unescape from common/.
103 (percent_plus_unescape, percent_plus_unescape_string): Remove.
105 2009-03-27 Werner Koch <wk@g10code.com>
107 * learncard.c (agent_handle_learn): Add new certtype 111.
109 2009-03-26 Werner Koch <wk@g10code.com>
111 * agent.h (MAX_DIGEST_LEN): Change to 64.
112 * command.c (cmd_sethash): Allow digest length of 48 and 64.
113 (cmd_sethash): Allow more hash algos.
115 * trustlist.c (reformat_name): New.
116 (agent_marktrusted): Use a reformatted name. Reload the table
117 before the update and always reload it at the end.
118 (agent_istrusted): Check early for the disabled flag.
120 2009-03-25 Werner Koch <wk@g10code.com>
122 * pkdecrypt.c (agent_pkdecrypt): Return a specific error message
123 if the key is not available.
125 * gpg-agent.c (main): Print a started message to show the real pid.
127 2009-03-20 Werner Koch <wk@g10code.com>
129 * learncard.c (struct kpinfo_cp_parm_s): Add field CTRL.
130 (struct certinfo_cb_parm_s): Ditto.
131 (agent_handle_learn): Set CTRL field.
132 (kpinfo_cb, certinfo_cb): Send progress status.
134 * agent.h (agent_write_status): Flag with GNUPG_GCC_A_SENTINEL.
136 2009-03-19 Werner Koch <wk@g10code.com>
138 * trustlist.c (struct trustitem_s): Add field DISABLED.
139 (read_one_trustfile): Parse the '!' flag.
140 (agent_istrusted, agent_listtrusted): Check flag.
141 (agent_istrusted): Add arg R_DISABLED. Change all callers.
142 (agent_marktrusted): Do not ask if flagged as disabled. Reverse
143 the order of the questions. Store the disabled flag.
145 * gpg-agent.c (main): Save signal mask and open fds. Restore mask
146 and close all fds prior to the exec. Fixes bug#1013.
148 2009-03-17 Werner Koch <wk@g10code.com>
150 * command.c (cmd_get_passphrase): Break repeat loop on error.
152 (cmd_getinfo): Add subcommand "cmd_has_option".
153 (command_has_option): New.
155 2009-03-17 Daiki Ueno <ueno@unixuser.org>
157 * command.c (option_value): New function.
158 (cmd_get_passphrase): Accept new option --repeat, which makes
159 gpg-agent to ask passphrase several times.
161 2009-03-06 Werner Koch <wk@g10code.com>
163 * command.c (cmd_keyinfo): New command.
164 (register_commands): Register it.
165 (agent_write_status): Make sure not to print LR or CR.
166 * divert-scd.c (ask_for_card): Factor shadow info parsing out to ...
167 * protect.c (parse_shadow_info): New.
168 * findkey.c (agent_key_from_file): Use make_canon_sexp.
169 (agent_write_private_key, unprotect, read_key_file)
170 (agent_key_available): Use bin2hex.
171 (agent_key_info_from_file): New.
172 (read_key_file): Log no error message for ENOENT.
174 2009-03-05 Werner Koch <wk@g10code.com>
176 * divert-scd.c (getpin_cb): Support flag 'P'. Change max_digits
177 from 8 to 16. Append a message about keypads.
178 * findkey.c (unprotect): Change max digits to 16.
180 2009-03-02 Werner Koch <wk@g10code.com>
182 * command.c (cmd_getinfo): Add subcommand "scd_running".
184 * call-scd.c (agent_scd_check_running): New.
186 * gpg-agent.c: Add missing option strings for "--batch" and
187 "--homedir". Reported by Petr Uzel.
189 * protect-tool.c (import_p12_file): Take care of canceled
190 passphrase entry. Fixes bug#1003.
191 (export_p12_file): Ditto.
193 2008-12-17 Werner Koch <wk@g10code.com>
195 * gpg-agent.c (handle_connections): Set action of all pth event
196 handled signals to SIG_IGN. Use a different pth_sigmask strategy.
198 2008-12-10 Werner Koch <wk@g10code.com>
200 * command.c (cmd_get_passphrase): Implement option --no-ask.
202 2008-12-09 Werner Koch <wk@g10code.com>
204 * gpg-agent.c (main): Call i18n_init before init_common_subsystems.
205 * preset-passphrase.c (main): Ditto.
206 * protect-tool.c (main): Ditto.
208 * command.c (cmd_preset_passphrase): Allow an arbitrary string for
211 2008-12-08 Werner Koch <wk@g10code.com>
213 * gpg-agent.c (handle_connections): Sync the ticker to the next
214 full second. This is bug#871.
216 2008-12-05 Werner Koch <wk@g10code.com>
218 * minip12.c (decrypt_block): Fix const modified of CHARSETS.
219 * learncard.c (sinfo_cb_parm_s): Remove superflous semicolon.
220 Reported by Stoyan Angelov.
222 2008-11-18 Werner Koch <wk@g10code.com>
224 * gpg-agent.c (make_libversion): New.
225 (my_strusage): Print libgcrypt version
227 2008-11-11 Werner Koch <wk@g10code.com>
229 * call-scd.c (membuf_data_cb): Change return type to
230 assuan_error_t to avoid warnings with newer libassuan versions.
232 2008-11-04 Werner Koch <wk@g10code.com>
234 * command.c (cmd_killagent): Stop the agent immediately.
235 (start_command_handler): Take care of GPG_ERR_EOF.
237 2008-10-29 Werner Koch <wk@g10code.com>
239 * gpg-agent.c (main): Move USE_STANDARD_SOCKET to the outer scope.
240 (create_socket_name): Remove arg USE_STANDARD_SOCKET. Change all
242 (create_server_socket): Remove IS_STANDARD_NAME and replace it by
243 USE_STANDARD_SOCKET. Change all callers.
244 (check_own_socket_running): New.
245 (check_own_socket, check_own_socket_thread): New.
246 (handle_tick): Check server socket once a minute.
247 (handle_connections): Remove the extra pth_wait in the shutdown
250 2008-10-20 Werner Koch <wk@g10code.com>
252 * command.c (cmd_geteventcounter): Mark unused arg.
253 (cmd_listtrusted, cmd_pksign, cmd_pkdecrypt, cmd_genkey): Ditto.
254 (cmd_updatestartuptty, post_cmd_notify): Ditto.
255 * command-ssh.c (add_control_entry)
256 (ssh_handler_request_identities, ssh_handler_remove_identity)
257 (ssh_handler_remove_all_identities, ssh_handler_lock)
258 (ssh_handler_unlock): Ditto.
259 * call-pinentry.c (pinentry_active_p, popup_message_thread)
260 (agent_popup_message_stop): Ditto.
261 * findkey.c (agent_public_key_from_file): Ditto.
262 * genkey.c (check_passphrase_pattern): Ditto.
263 * call-scd.c (atfork_cb): Ditto.
264 * protect-tool.c (import_p12_cert_cb): Ditto.
265 * t-protect.c (main): Ditto.
267 2008-10-17 Werner Koch <wk@g10code.com>
269 * call-scd.c (start_scd) [W32]: Use snprintf again because we now
270 always use the estream variant.
272 2008-10-15 Werner Koch <wk@g10code.com>
274 * call-scd.c (start_scd): Enable assuan loggging if requested.
275 (agent_scd_check_aliveness) [W32]: Fix use of GetExitCodeProcess.
277 2008-10-14 Werner Koch <wk@g10code.com>
279 * gpg-agent.c (get_agent_scd_notify_event): Need to use a manual
282 2008-09-29 Werner Koch <wk@g10code.com>
284 * agent.h (GCRY_MD_USER): Rename to GCRY_MODULE_ID_USER.
285 (GCRY_MD_USER_TLS_MD5SHA1): Rename to MD_USER_TLS_MD5SHA1 and
288 2008-09-25 Werner Koch <wk@g10code.com>
290 * divert-scd.c (getpin_cb): Support a Reset Code style PINs..
292 2008-09-03 Werner Koch <wk@g10code.com>
294 * command.c (parse_keygrip): Use hex2bin.
295 (cmd_preset_passphrase): Decode the passphrase. Reported by Kiss
296 Gabor. Fixes #679 again.
297 * preset-passphrase.c (make_hexstring): Remove.
298 (preset_passphrase): Use bin2hex.
300 2008-05-27 Werner Koch <wk@g10code.com>
302 * trustlist.c (insert_colons): Fix stupidly wrong allocation size
305 2008-05-26 Werner Koch <wk@g10code.com>
307 * gpg-agent.c (main): Re-initialize default assuan log stream if a
310 * trustlist.c (agent_marktrusted): Use xtryasprintf and xfree.
312 * gpg-agent.c (main, agent_deinit_default_ctrl): Always use xfree
313 because our asprintf is mapped to an xmalloc style function in
314 util.h. Replace xstrdup by xtrystrdup.
315 * w32main.c (build_argv): Ditto.
316 * preset-passphrase.c (preset_passphrase): Ditto.
317 * divert-scd.c (ask_for_card): Ditto.
318 * command.c (option_handler): Ditto.
319 * command-ssh.c (ssh_handler_request_identities): Ditto.
320 * call-pinentry.c (start_pinentry): Ditto.
322 * gpg-agent.c (start_connection_thread)
323 (start_connection_thread_ssh): Use pth_thread_id for useful output
325 (pth_thread_id) [!PTH_HAVE_PTH_THREAD_ID]: New.
327 2008-03-17 Werner Koch <wk@g10code.com>
329 * agent.h (agent_inq_pinentry_launched): New prototype.
331 * call-pinentry.c: Include sys/types.h and signal.h.
333 2008-02-14 Werner Koch <wk@g10code.com>
335 * command.c (agent_inq_pinentry_launched): New.
336 (option_handler): Add option allow-pinentry-notify.
337 * call-pinentry.c (getinfo_pid_cb): New.
338 (start_pinentry): Ask for the PID and notify the client.
340 2008-01-15 Marcus Brinkmann <marcus@g10code.de>
342 * call-pinentry.c (start_pinentry): Start pinentry in detached
345 2007-12-04 Werner Koch <wk@g10code.com>
347 * call-pinentry.c (agent_askpin): Use gnupg_get_help_string.
349 2007-12-03 Werner Koch <wk@g10code.com>
351 * gpg-agent.c (main): s/standard_socket/use_standard_socket/ for
353 (create_server_socket): New arg IS_SSH to avoid testing with
356 2007-11-20 Werner Koch <wk@g10code.com>
358 * gpg-agent.c (get_agent_scd_notify_event): New.
359 (handle_signal): Factor SIGUSR2 code out to:
360 (agent_sigusr2_action): .. New.
361 (agent_sighup_action): Print info message here and not in
363 (handle_connections) [PTH_EVENT_HANDLE]: Call agent_sigusr2_action.
365 * call-scd.c (agent_scd_check_aliveness) [W32]: Implemented.
366 (start_scd) [W32]: Send event-signal option.
368 2007-11-19 Werner Koch <wk@g10code.com>
370 * call-pinentry.c (agent_askpin): Set the tooltip for the quality
373 2007-11-15 Werner Koch <wk@g10code.com>
375 * agent.h (struct server_control_s): Add XAUTHORITY and
377 * gpg-agent.c: New option --xauthority.
378 (main, agent_init_default_ctrl)
379 (agent_deinit_default_ctrl): Implemented
380 * command.c (cmd_updatestartuptty): Ditto.
381 * command-ssh.c (start_command_handler_ssh): Ditto.
382 * call-pinentry.c (atfork_cb): Set the environment.
383 (start_pinentry): Pass CTRL as arg to atfork_cb.
385 2007-11-14 Werner Koch <wk@g10code.com>
387 * call-scd.c (start_scd) [W32]: Take care of fflush peculiarities.
389 2007-11-07 Werner Koch <wk@g10code.com>
391 * agent.h: Remove errors.h.
393 2007-10-24 Werner Koch <wk@g10code.com>
395 * genkey.c (check_passphrase_constraints): Changed the wording of
396 the warning messages.
398 2007-10-19 Werner Koch <wk@g10code.com>
400 * protect-tool.c (get_passphrase): Use new utf8 switch fucntions.
402 2007-10-15 Daiki Ueno <ueno@unixuser.org> (wk)
404 * command-ssh.c (reenter_compare_cb): New function; imported from
406 (ssh_identity_register): Ask initial passphrase twice.
408 2007-10-02 Werner Koch <wk@g10code.com>
410 * command.c (cmd_getinfo): Add "pid" subcommand.
412 2007-10-01 Werner Koch <wk@g10code.com>
414 * agent.h (struct server_control_s): Remove unused CONNECTION_FD.
416 * gpg-agent.c: Remove w32-afunix.h. Include mkdtemp.h.
417 (socket_nonce, socket_nonce_ssh): New.
418 (create_server_socket): Use assuan socket wrappers. Remove W32
419 specific stuff. Save the server nonce.
421 (start_connection_thread, start_connection_thread_ssh): Call it.
422 (handle_connections): Change args to gnupg_fd_t.
423 * command.c (start_command_handler): Change LISTEN_FD to gnupg_fd_t.
424 * command-ssh.c (start_command_handler_ssh): Ditto.
426 2007-09-18 Werner Koch <wk@g10code.com>
428 * agent.h (struct pin_entry_info_s): Add element WITH_QUALITYBAR.
429 * genkey.c (check_passphrase_constraints): New arg SILENT.
431 (agent_protect_and_store, agent_genkey): Enable qualitybar.
432 * call-pinentry.c (agent_askpin): Send that option.
433 (unescape_passphrase_string): New.
435 (estimate_passphrase_quality): New.
437 2007-09-14 Marcus Brinkmann <marcus@g10code.de>
439 * call-pinentry.c (agent_popup_message_stop): Implement kill for
442 2007-08-28 Werner Koch <wk@g10code.com>
444 * gpg-agent.c (main): Add option --faked-system-time.
446 * protect-tool.c (read_and_unprotect): Print the protected-at date.
448 * agent.h (struct server_control_s): Add member IN_PASSWD.
449 * command.c (cmd_passwd): Set it.
450 * findkey.c (try_unprotect_cb): Use it.
452 * protect.c (do_encryption): Replace asprintf by xtryasprint.
453 (agent_protect): Create the protected-at item.
454 (agent_unprotect): Add optional arg PROTECTED_AT.
455 (merge_lists): Add args CUTOFF and CUTLEN.
456 (agent_unprotect): Use them.
457 * findkey.c (try_unprotect_cb): Add code to test for expired keys.
458 (unprotect): Allow changing the passphrase.
460 2007-08-27 Werner Koch <wk@g10code.com>
462 * gpg-agent.c: Add options --min-passphrase-nonalpha,
463 --check-passphrase-pattern and --enforce-passphrase-constraints.
464 (MIN_PASSPHRASE_NONALPHA): Init nonalpha option to 1.
465 (main): Declare options for gpgconf.
466 * agent.h (struct): Add members MIN_PASSPHRASE_NONALPHA,
467 ENFORCE_PASSPHRASE_CONSTRAINTS and CHECK_PASSPHRASE_PATTERN.
468 * genkey.c (nonalpha_charcount): New.
469 (check_passphrase_pattern): New.
470 (check_passphrase_constraints): Implement. Factor some code out...
471 (take_this_one_anyway, take_this_one_anyway2): .. New.
473 * call-pinentry.c (agent_show_message): New.
474 (agent_askpin): We better reset the pin buffer before asking.
476 * trustlist.c (insert_colons): New.
477 (agent_marktrusted): Pretty print the fpr.
479 2007-08-22 Werner Koch <wk@g10code.com>
481 * findkey.c (O_BINARY): Make sure it is defined.
482 (agent_write_private_key): Use O_BINARY
484 * protect-tool.c (import_p12_file): Add hack to allow importing of
485 gnupg 2.0.4 generated files.
487 2007-08-06 Werner Koch <wk@g10code.com>
489 * trustlist.c (read_one_trustfile): Add flag "cm".
490 (agent_istrusted): Ditto.
492 2007-08-02 Werner Koch <wk@g10code.com>
494 * gpg-agent.c: Include gc-opt-flags.h and remove their definition
497 2007-07-13 Werner Koch <wk@g10code.com>
499 * genkey.c (check_passphrase_constraints): Require a confirmation
500 for an empty passphrase.
501 (agent_genkey, agent_protect_and_store): No need to repeat an
504 2007-07-05 Werner Koch <wk@g10code.com>
506 * call-scd.c (struct inq_needpin_s): New.
507 (inq_needpin): Pass unknown inquiries up.
509 2007-07-04 Werner Koch <wk@g10code.com>
511 * gpg-agent.c (TIMERTICK_INTERVAL): New.
512 (fixed_gcry_pth_init, main): Kludge to fix Pth initialization.
514 2007-07-03 Werner Koch <wk@g10code.com>
516 * gpg-agent.c (handle_connections): Do not use FD_SETSIZE for
517 select but compute the correct number.
519 2007-07-02 Werner Koch <wk@g10code.com>
521 * command.c (cmd_reloadagent) [W32]: New.
522 (register_commands) [W32]: New command RELOADAGENT.
524 * Makefile.am (gpg_agent_SOURCES): Remove w32main.c and w32main.h.
525 (gpg_agent_res_ldflags): Remove icon file as we don't have a
527 * gpg-agent.c (main): do not include w32main.h. Remove all calls
529 (agent_sighup_action): New.
530 (handle_signal): Use it.
532 2007-06-26 Werner Koch <wk@g10code.com>
534 * gpg-agent.c (create_directories) [W32]: Made it work.
536 2007-06-21 Werner Koch <wk@g10code.com>
538 * agent.h (ctrl_t): Remove. It is now declared in ../common/util.h.
540 * gpg-agent.c (check_for_running_agent): New arg SILENT. Changed
542 (create_server_socket): If the standard socket is in use check
543 whether a agent is running and avoid starting another one.
545 2007-06-18 Marcus Brinkmann <marcus@g10code.de>
547 * gpg-agent.c (main): Percent escape pathname in --gpgconf-list
550 2007-06-18 Werner Koch <wk@g10code.com>
552 * w32main.c (build_argv): New.
555 * command.c (cmd_killagent) [W32]: New.
557 * gpg-agent.c (get_agent_ssh_socket_name): New.
558 (no_force_standard_socket) New.
559 (create_server_socket): Use it.
560 * Makefile.am (gpg_agent_res_ldflags): Pass windows option to ld.
562 2007-06-14 Werner Koch <wk@g10code.com>
564 * protect-tool.c (main): Setup default socket name for
566 (MAP_SPWQ_ERROR_IMPL): New. Use map_spwq_error for spqw related
568 * preset-passphrase.c (main): Setup default socket name for
570 (map_spwq_error): Remove.
571 (MAP_SPWQ_ERROR_IMPL): New.
573 * call-pinentry.c (start_pinentry): Use gnupg_module_name.
574 * call-scd.c (start_scd): Ditto.
576 2007-06-12 Werner Koch <wk@g10code.com>
580 * trustlist.c (read_one_trustfile): Replace GNUPG_SYSCONFDIR by a
582 (read_trustfiles): Ditto.
584 * gpg-agent.c (main): Replace some calls by init_common_subsystems.
585 * preset-passphrase.c (main): Ditto.
586 * protect-tool.c (main): Ditto.
588 2007-06-11 Werner Koch <wk@g10code.com>
590 * Makefile.am (common_libs): Use libcommonstd macro.
591 (commonpth_libs): Use libcommonpth macro.
593 * protect-tool.c (main) [W32]: Call pth_init.
595 * preset-passphrase.c (main) [W32]: Replace the explicit Winsocket
596 init by a call to pth_init.
598 * trustlist.c (initialize_module_trustlist): New.
599 * gpg-agent.c (main): Call it.
601 * call-pinentry.c (initialize_module_query): Rename to
602 initialize_module_call_pinentry.
604 * minip12.c: Remove iconv.h. Add utf8conf.h. Changed all iconv
605 calss to use these jnlib wrappers.
607 2007-06-06 Werner Koch <wk@g10code.com>
609 * minip12.c (enum): Rename CONTEXT to ASNCONTEXT as winnt.h
610 defines such a symbol to access the process context.
612 * call-pinentry.c (dump_mutex_state) [W32]: Handle the W32Pth case.
613 * call-scd.c (dump_mutex_state): Ditto.
615 * protect-tool.c (i18n_init): Remove.
616 * preset-passphrase.c (i18n_init): Remove.
617 * gpg-agent.c (i18n_init): Remove.
619 2007-05-19 Marcus Brinkmann <marcus@g10code.de>
621 * protect-tool.c (get_passphrase): Free ORIG_CODESET on error.
623 2007-05-14 Werner Koch <wk@g10code.com>
625 * protect.c (make_shadow_info): Replace sprintf by smklen.
627 2007-04-20 Werner Koch <wk@g10code.com>
629 * gpg-agent.c (my_gcry_logger, my_gcry_outofcore_handler): Removed.
630 (main): Call the setup_libgcrypt_logging helper.
631 * protect-tool.c (my_gcry_logger): Removed.
632 (main): Call the setup_libgcrypt_logging helper.
634 2007-04-03 Werner Koch <wk@g10code.com>
636 * trustlist.c (read_trustfiles): Take a missing trustlist as an
639 2007-03-20 Werner Koch <wk@g10code.com>
641 * protect-tool.c: New option --p12-charset.
642 * minip12.c (p12_build): Implement it.
644 2007-03-19 Werner Koch <wk@g10code.com>
646 * minip12.c: Include iconv.h.
647 (decrypt_block): New.
648 (parse_bag_encrypted_data, parse_bag_data): Use it here.
649 (bag_data_p, bag_decrypted_data_p): New helpers.
651 2007-03-06 Werner Koch <wk@g10code.com>
653 * gpg-agent.c (main) <gpgconf>: Add entries for all ttl options.
655 2007-02-20 Werner Koch <wk@g10code.com>
657 * call-pinentry.c (start_pinentry): Fix for OS X to allow loading
658 of the bundle. Tested by Benjamin Donnachie.
660 2007-02-14 Werner Koch <wk@g10code.com>
662 * gpg-agent.c: New option --pinentry-touch-file.
663 (get_agent_socket_name): New.
664 * agent.h (opt): Add pinentry_touch_file.
665 * call-pinentry.c (start_pinentry): Send new option to the
668 2007-01-31 Moritz Schulte <moritz@g10code.com> (wk)
670 * command-ssh.c (stream_read_string): Initialize LENGTH to zero.
671 (start_command_handler_ssh): Use es_fgetc/es_ungetc to check if
672 EOF has been reached before trying to process another request.
674 2007-01-31 Werner Koch <wk@g10code.com>
676 * command-ssh.c (start_command_handler_ssh):
678 * Makefile.am (t_common_ldadd): Add LIBICONV.
680 2007-01-25 Werner Koch <wk@g10code.com>
682 * genkey.c (check_passphrase_constraints): Get ngettext call right
683 and use UTF-8 aware strlen.
685 * protect-tool.c (get_passphrase): New arg OPT_CHECK.
686 (get_new_passphrase): Enable OPT_CHECK on the first call.
687 * command.c (cmd_get_passphrase): Implement option --check.
689 2007-01-24 Werner Koch <wk@g10code.com>
691 * gpg-agent.c (MIN_PASSPHRASE_LEN): New
692 (parse_rereadable_options): New option --min-passphrase-len.
693 * genkey.c (check_passphrase_constraints): New.
694 (agent_genkey, agent_protect_and_store): Call new function. Fix
697 * call-pinentry.c (agent_askpin): Allow translation of the displayed
699 (agent_popup_message_start): Remove arg CANCEL_BTN.
700 (popup_message_thread): Use --one-button option.
702 * command.c (cmd_passwd): Now that we don't distinguish between
703 assuan and regular error codes we can jump to the end on error.
705 2006-12-07 David Shaw <dshaw@jabberwocky.com>
707 * Makefile.am: Link to iconv for jnlib dependency.
709 2006-11-20 Werner Koch <wk@g10code.com>
711 * call-pinentry.c (agent_popup_message_stop): Use SIGKILL.
712 * call-scd.c (inq_needpin): Implement POPUPKEYPADPROMPT and
715 2006-11-15 Werner Koch <wk@g10code.com>
717 * protect.c (make_shadow_info): Cast printf arg to unsigned int.
718 * minip12.c (parse_bag_encrypted_data): Ditto.
719 (parse_bag_data, p12_parse): Ditto.
720 * command-ssh.c (ssh_identity_register): Changed buffer_n to
723 * agent.h (struct server_control_s): New field thread_startup.
724 * command.c (start_command_handler): Moved CTRL init code to ..
725 * gpg-agent.c (start_connection_thread): .. here.
726 (agent_deinit_default_ctrl): New.
727 (agent_init_default_ctrl): Made static.
728 (handle_connections): Allocate CTRL and pass it pth_spawn.
729 * command-ssh.c (start_command_handler_ssh): Moved CTRL init code
731 * gpg-agent.c (start_connection_thread_ssh): .. here.
733 2006-11-14 Werner Koch <wk@g10code.com>
735 * command.c (bump_key_eventcounter): New.
736 (bump_card_eventcounter): New.
737 (cmd_geteventcounter): New command.
738 * gpg-agent.c (handle_signal): Call bump_card_eventcounter.
739 * findkey.c (agent_write_private_key): Call bump_key_eventcounter.
740 * trustlist.c (agent_reload_trustlist): Ditto.
742 * command.c (post_cmd_notify, io_monitor): New.
743 (register_commands, start_command_handler): Register them.
745 2006-11-09 Werner Koch <wk@g10code.com>
747 * gpg-agent.c (main): In detached mode connect standard
748 descriptors to /dev/null.
750 * trustlist.c (read_trustfiles): Make sure not to pass a zero size
751 to realloc as the C standards says that this behaves like free.
753 2006-11-06 Werner Koch <wk@g10code.com>
755 * protect-tool.c (my_strusage): Fixed typo.
757 2006-10-23 Werner Koch <wk@g10code.com>
759 * gpg-agent.c (main): New command --gpgconf-test.
761 * minip12.c (parse_bag_encrypted_data, parse_bag_data): Allow for
764 2006-10-20 Werner Koch <wk@g10code.com>
766 * Makefile.am (t_common_ldadd): Use GPG_ERROR_LIBS instead -o just -l
768 2006-10-19 Werner Koch <wk@g10code.com>
770 * findkey.c (unprotect): Use it to avoid unnecessary calls to
772 * call-pinentry.c (pinentry_active_p): New.
774 2006-10-17 Werner Koch <wk@g10code.com>
776 * Makefile.am (gpg_agent_LDADD): Link to libcommonpth.
777 (gpg_agent_CFLAGS): New. This allows to only link this with Pth.
779 2006-10-16 Werner Koch <wk@g10code.com>
781 * call-pinentry.c (agent_get_confirmation): Map Cancel code here too.
782 * trustlist.c (agent_marktrusted): Return Cancel instead of
783 Not_Confirmed for the first question.
785 2006-10-12 Werner Koch <wk@g10code.com>
787 * protect-tool.c (get_passphrase): Fix if !HAVE_LANGINFO_CODESET.
789 2006-10-06 Werner Koch <wk@g10code.com>
791 * Makefile.am (AM_CFLAGS): Use PTH version of libassuan.
792 (gpg_agent_LDADD): Ditto.
794 * divert-scd.c (divert_pksign): Use PKAUTH for the TLS algo.
796 2006-10-05 Werner Koch <wk@g10code.com>
798 * command.c (has_option_name): New.
799 (cmd_sethash): New --hash option.
800 * pksign.c (do_encode_raw_pkcs1): New.
801 (agent_pksign_do): Use it here for the TLS algo.
802 * agent.h (GCRY_MD_USER_TLS_MD5SHA1): New.
803 * divert-scd.c (pksign): Add case for tls-md5sha1.
805 * divert-scd.c (encode_md_for_card): Check that the algo is valid.
807 2006-10-04 Werner Koch <wk@g10code.com>
809 * call-pinentry.c (agent_get_passphrase): Changed to return the
810 unencoded passphrase.
811 (agent_askpin, agent_get_passphrase, agent_get_confirmation): Need
812 to map the cancel error.
813 * command.c (send_back_passphrase): New.
814 (cmd_get_passphrase): Use it here. Also implement --data option.
817 2006-09-26 Werner Koch <wk@g10code.com>
819 * learncard.c (agent_handle_learn): Send back the keypair
822 2006-09-25 Werner Koch <wk@g10code.com>
824 * trustlist.c (read_one_trustfile): Allow extra flags.
825 (struct trustitem_s): Replaced KEYFLAGS by a FLAGS struct.
826 Changed all code to use this.
827 (agent_istrusted): New arg CTRL. Changed all callers. Send back
829 * command.c (agent_write_status): New.
831 2006-09-20 Werner Koch <wk@g10code.com>
833 * Makefile.am: Changes to allow parallel make runs.
835 2006-09-15 Werner Koch <wk@g10code.com>
837 * trustlist.c: Entirely rewritten.
838 (agent_trustlist_housekeeping): Removed and removed all calls.
840 2006-09-14 Werner Koch <wk@g10code.com>
842 Replaced all call gpg_error_from_errno(errno) by
843 gpg_error_from_syserror().
845 * call-pinentry.c (start_pinentry): Replaced pipe_connect2 by
847 * call-scd.c (start_scd): Ditto.
848 * command.c (start_command_handler): Replaced
849 init_connected_socket_server by init_socket_server_ext.
851 2006-09-13 Werner Koch <wk@g10code.com>
853 * preset-passphrase.c (main) [W32]: Check for WSAStartup error.
855 2006-09-08 Werner Koch <wk@g10code.com>
857 * call-scd.c: Add signal.h as we are referencing SIGUSR2.
859 2006-09-06 Marcus Brinkmann <marcus@g10code.de>
861 * Makefile.am (AM_CFLAGS): Add $(GPG_ERR_CFLAGS).
862 (gpg_agent_LDADD): Replace -lgpg-error with $(GPG_ERROR_LIBS).
864 2006-09-06 Werner Koch <wk@g10code.com>
866 * query.c: Renamed to ..
867 * call-pinentry.c: .. this.
869 * agent.h (out_of_core): Removed.
870 (CTRL): Removed and changed everywhere to ctrl_t.
872 Replaced all Assuan error codes by libgpg-error codes. Removed
873 all map_to_assuan_status and map_assuan_err.
875 * gpg-agent.c (main): Call assuan_set_assuan_err_source to have Assuan
876 switch to gpg-error codes.
877 * command.c (set_error): Adjusted.
879 2006-09-04 Werner Koch <wk@g10code.com>
881 * command.c (percent_plus_unescape): New.
882 (cmd_get_val, cmd_putval): New.
884 2006-08-29 Werner Koch <wk@g10code.com>
886 * command-ssh.c (stream_read_mpi): Sanity check for early
887 detecting of too large keys.
888 * gpg-agent.c (my_gcry_outofcore_handler): New.
890 (main): No allocate 32k secure memory (was 16k).
892 2006-07-31 Werner Koch <wk@g10code.com>
894 * preset-passphrase.c (make_hexstring): For consistency use
895 xtrymalloc and changed caller to use xfree. Fixed function
898 2006-07-29 Marcus Brinkmann <marcus@g10code.de>
900 * preset-passphrase.c (preset_passphrase): Do not strip off last
901 character of passphrase.
902 (make_hexstring): New function.
903 * command.c (cmd_preset_passphrase): Use parse_hexstring to syntax
904 check passphrase argument. Truncate passphrase at delimiter.
906 2006-07-24 Werner Koch <wk@g10code.com>
908 * minip12.c (build_key_bag): New args SHA1HASH and
909 KEYIDSTR. Append bag Attributes if these args are given.
910 (build_cert_sequence): ditto.
911 (p12_build): Calculate certificate hash and pass to build
914 2006-07-21 Werner Koch <wk@g10code.com>
916 * minip12.c (oid_pkcs_12_keyBag): New.
917 (parse_bag_encrypted_data): New arg R_RESULT. Support keybags and
918 return the key object.
919 (p12_parse): Take new arg into account. Free RESULT on error.
921 2006-06-26 Werner Koch <wk@g10code.com>
923 * gpg-agent.c (handle_signal): Print info for SIGUSR2 only in
926 2006-06-22 Werner Koch <wk@g10code.com>
928 * command-ssh.c (make_cstring): Use memcpy instead of strncpy.
929 (ssh_receive_mpint_list, sexp_key_extract, data_sign): Use
930 xtrycalloc instead of xtrymalloc followed by memset.
932 2006-06-20 Werner Koch <wk@g10code.com>
934 * minip12.c (create_final): New arg PW. Add code to calculate the
937 2006-06-09 Marcus Brinkmann <marcus@g10code.de>
939 * Makefile.am (gpg_agent_LDADD): Add $(NETLIBS).
940 (gpg_protect_tool_LDADD): Likewise.
941 (gpg_preset_passphrase_LDADD): Likewise.
943 2006-04-09 Moritz Schulte <moritz@g10code.com>
945 * command-ssh.c (ssh_request_process): Removed FIXME mentioning a
948 2006-04-01 Moritz Schulte <moritz@g10code.com>
950 * command-ssh.c (ssh_identity_register): Make KEY_GRIP_RAW be 20
951 instead of 21 bytes long; do not fill KEY_GRIP_RAW[20] with NUL
952 byte - KEY_GRIP_RAW is a raw binary string anyway.
954 2006-02-09 Werner Koch <wk@g10code.com>
956 * call-scd.c (struct scd_local_s): New field next_local.
957 (scd_local_list): New.
958 (start_scd): Put new local into list.
959 (agent_reset_scd): Remove it from the list.
960 (agent_scd_check_aliveness): Here is the actual reason why we need
962 (agent_reset_scd): Send the new command RESTART instead of RESET.
964 2005-12-16 Werner Koch <wk@g10code.com>
966 * minip12.c (cram_octet_string): New
967 (p12_parse): Use it for NDEFed bags.
968 (parse_bag_data): Ditto.
969 (string_to_key, set_key_iv, crypt_block): New arg SALTLEN.
970 (p12_build): Use old value 8 for new arg.
971 (parse_bag_encrypted_data, parse_bag_data): Allow for salts of 8
972 to 16 bytes. Add new arg R_CONSUMED.
974 2005-11-24 Werner Koch <wk@g10code.com>
976 * minip12.c (p12_parse): Fixed for case that the key object comes
977 prior to the certificate.
979 2005-10-19 Werner Koch <wk@g10code.com>
981 * divert-scd.c (getpin_cb): Hack to use it for a keypad message.
983 * call-scd.c (inq_needpin): Reworked to support the new KEYPADINFO.
985 * query.c (start_pinentry): Keep track of the owner.
986 (popup_message_thread, agent_popup_message_start)
987 (agent_popup_message_stop, agent_reset_query): New.
988 * command.c (start_command_handler): Make sure a popup window gets
991 2005-10-08 Marcus Brinkmann <marcus@g10code.de>
993 * Makefile.am (gpg_protect_tool_LDADD): Add ../gl/libgnu.a.
994 (gpg_preset_passphrase_LDADD, t_common_ldadd): Likewise.
995 (gpg_agent_LDADD): Add ../gl/libgnu.a after ../common/libcommon.a.
997 2005-09-16 Werner Koch <wk@g10code.com>
999 * minip12.c (build_key_sequence, build_cert_sequence): Fixed
1002 2005-09-15 Moritz Schulte <moritz@g10code.com>
1004 * t-protect.c (test_agent_protect): Implemented.
1005 (main): Disable use of secure memory.
1007 2005-09-09 Werner Koch <wk@g10code.com>
1009 * minip12.c (p12_build): Oops, array needs to be larger for the
1011 (build_cert_bag): Fixed yesterdays change.
1013 * command-ssh.c (card_key_available): Let the card handler decide
1014 whether the card is supported here. Also get a short serial
1015 number to return from the card handler.
1017 2005-09-08 Werner Koch <wk@g10code.com>
1019 * minip12.c (build_cert_bag): Use a non constructed object.
1020 i.e. 0x80 and not 0xa0.
1022 2005-08-16 Werner Koch <wk@g10code.com>
1024 * gpg-agent.c (main): Use a default file name for --write-env-file.
1026 2005-07-25 Werner Koch <wk@g10code.com>
1028 * findkey.c (agent_public_key_from_file): Fixed array assignment.
1029 This was the cause for random segvs.
1031 2005-06-29 Werner Koch <wk@g10code.com>
1033 * command-ssh.c (data_sign): Removed empty statement.
1035 2005-06-21 Werner Koch <wk@g10code.com>
1037 * minip12.c (create_final): Cast size_t to ulong for printf.
1038 (build_key_bag, build_cert_bag, build_cert_sequence): Ditto.
1040 2005-06-16 Werner Koch <wk@g10code.com>
1042 * protect-tool.c (make_advanced): Makde RESULT a plain char.
1043 * call-scd.c (unescape_status_string): Need to cast unsigned char*
1045 (agent_card_pksign): Made arg R_BUF an unsigned char**.
1046 * divert-scd.c (divert_pksign): Made SIGVAL unsigned char*.
1047 (encode_md_for_card): Initialize R_VAL and R_LEN.
1048 * genkey.c (store_key): Made BUF unsigned.
1049 * protect.c (do_encryption): Ditto.
1050 (do_encryption): Made arg PROTBEGIN unsigned. Initialize RESULT
1051 and RESULTLEN even on error.
1052 (merge_lists): Need to cast unsigned char * for strcpy. Initialize
1053 RESULTand RESULTLEN even on error.
1054 (agent_unprotect): Likewise for strtoul.
1055 (make_shadow_info): Made P and INFO plain char.
1056 (agent_shadow_key): Made P plain char.
1058 2005-06-15 Werner Koch <wk@g10code.com>
1060 * query.c (agent_get_passphrase): Made HEXSTRING a char*.
1061 * command-ssh.c (ssh_key_grip): Made arg BUFFER unsigned.
1062 (ssh_key_grip): Simplified.
1063 (data_sign): Initialize variables with the definition.
1064 (ssh_convert_key_to_blob): Make sure that BLOB and BLOB_SIZE
1065 are set to NULL on error. Cool, gcc-4 detects uninitialized stuff
1066 beyond function boundaries; well it can't know that we do error
1067 proper error handling so that this was not a real error.
1068 (file_to_buffer): Likewise for BUFFER and BUFFER_N.
1069 (data_sign): Likewise for SIG and SIG_N.
1070 (stream_read_byte): Set B to a value even on error.
1071 * command.c (cmd_genkey): Changed VALUE to char.
1072 (cmd_readkey): Cast arg for gcry_sexp_sprint.
1073 * agent.h (struct server_control_s): Made KEYGRIP unsigned.
1075 2005-06-13 Werner Koch <wk@g10code.com>
1077 * command-ssh.c (start_command_handler_ssh): Reset the SCD.
1079 2005-06-09 Werner Koch <wk@g10code.com>
1081 * gpg-agent.c (create_socket_name): New option --max-cache-ttl-ssh.
1082 * cache.c (housekeeping): Use it.
1083 (agent_put_cache): Use a switch to get the default ttl so that it
1084 is easier to add more cases.
1086 2005-06-06 Werner Koch <wk@g10code.com>
1088 * gpg-agent.c: New option --default-cache-ttl-ssh.
1089 * agent.h (cache_mode_t): New.
1090 * pksign.c (agent_pksign_do): New arg CACHE_MODE to replace the
1091 ARG IGNORE_CACHE. Changed all callers.
1092 (agent_pksign): Ditto.
1093 * findkey.c (agent_key_from_file): Ditto. Canged all callers.
1095 * command-ssh.c (data_sign): Use CACHE_MODE_SSH.
1096 * cache.c (agent_get_cache): New arg CACHE_MODE.
1097 (agent_put_cache): Ditto. Store it in the cache.
1099 * query.c (agent_query_dump_state, dump_mutex_state): New.
1100 (unlock_pinentry): Reset the global context before releasing the
1102 * gpg-agent.c (handle_signal): Dump query.c info on SIGUSR1.
1104 * call-scd.c (agent_scd_check_aliveness): Always do a waitpid and
1105 add a timeout to the locking.
1107 2005-06-03 Werner Koch <wk@g10code.com>
1109 * command.c (cmd_updatestartuptty): New.
1111 * gpg-agent.c: New option --write-env-file.
1113 * gpg-agent.c (handle_connections): Make sure that the signals we
1114 are handling are not blocked.Block signals while creating new
1117 2005-06-02 Werner Koch <wk@g10code.com>
1119 * call-scd.c (agent_scd_dump_state, dump_mutex_state): New.
1120 * gpg-agent.c (handle_signal): Print it on SIGUSR1.
1121 (handle_connections): Include the file descriptor into the
1124 2005-06-01 Werner Koch <wk@g10code.com>
1126 * gpg-agent.c: Include setenv.h.
1128 2005-05-31 Werner Koch <wk@g10code.com>
1130 * agent.h (out_of_core): s/__inline__/inine. Noted by Ray Link.
1132 2005-05-25 Werner Koch <wk@g10code.com>
1134 * gpg-agent.c (main): Do not unset the DISPLAY when we are
1135 continuing as child.
1137 2005-05-24 Werner Koch <wk@g10code.com>
1139 * call-scd.c (inq_needpin): Skip leading spaces in of PIN
1141 * divert-scd.c (getpin_cb): Enhanced to cope with description
1143 * query.c (agent_askpin): Add arg PROMPT_TEXT. Changed all
1146 2005-05-21 Werner Koch <wk@g10code.com>
1148 * call-scd.c (start_scd): Don't test for an alive scdaemon here.
1149 (agent_scd_check_aliveness): New.
1150 * gpg-agent.c (handle_tick): Test for an alive scdaemon.
1151 (handle_signal): Print thread info on SIGUSR1.
1153 2005-05-20 Werner Koch <wk@g10code.com>
1155 * protect-tool.c: New option --canonical.
1156 (show_file): Implement it.
1158 * keyformat.txt: Define the created-at attribute for keys.
1160 2005-05-18 Werner Koch <wk@g10code.com>
1162 * divert-scd.c (ask_for_card): Removed the card reset kludge.
1164 2005-05-17 Werner Koch <wk@g10code.com>
1166 * call-scd.c (unlock_scd): Add new arg CTRL. Changed all callers.
1167 (start_scd): Reoworked to allow for additional connections.
1168 * agent.h (ctrl_t): Add local data for the SCdaemon.
1169 * command.c (start_command_handler): Release SERVER_LOCAL.
1171 * gpg-agent.c (create_server_socket): Use xmalloc.
1172 (main): Removed option --disable-pth a dummy. Removed non-pth
1174 (cleanup_sh): Removed. Not needed anymore.
1176 2005-05-05 Moritz Schulte <moritz@g10code.com>
1178 * command-ssh.c (ssh_key_to_buffer): Rename to ...
1179 (ssh_key_to_protected_buffer): ... this; change callers.
1180 Improved documentation.
1181 Use ssh_key_grip(), where gcry_pk_get_keygrip() has been used
1183 (ssh_handler_sign_request): Removed unusued variable P.
1185 2005-04-20 Moritz Schulte <moritz@g10code.com>
1187 * command-ssh.c (ssh_handler_request_identities): Removed
1188 debugging code (sleep call), which was commited unintenionally.
1190 2005-04-20 Werner Koch <wk@g10code.com>
1192 * minip12.c (parse_bag_encrypted_data): Fix the unpadding hack.
1194 * gpg-agent.c: New option --disable-scdaemon.
1195 (handle_connections): Add time event to drive ...
1196 (handle_tick): New function.
1197 (main): Record the parent PID. Fixed segv when using ssh and a
1200 * call-scd.c (start_scd): Take care of this option.
1202 2005-04-03 Moritz Schulte <moritz@g10code.com>
1204 * command-ssh.c (ssh_request_spec): New member: secret_input.
1205 (REQUEST_SPEC_DEFINE): New argument: secret_input.
1206 (request_specs): Add secret_input flag.
1207 (request_spec_lookup): New function ...
1208 (ssh_request_process): ... use it here; depending on secret_input
1209 flag allocate secure or non-secure memory.
1211 2005-03-02 Moritz Schulte <moritz@g10code.com>
1213 * command-ssh.c (sexp_key_extract): Removed FIXME, since
1214 xtrymallos does set errno correctly by now.
1215 (sexp_extract_identifier): Remove const attribute from identifier.
1216 (ssh_handler_request_identities): Remove const attribute from
1217 key_type; removes ugly casts and FIXME.
1218 (sexp_key_extract): Remove const attribute from comment.
1219 (ssh_send_key_public): Remove const attribute from
1220 key_type/comment; removes ugly cast.
1221 (data_sign): Remove const attribute from identifier; removes ugly
1223 (key_secret_to_public): Remove const attribute from comment;
1225 (ssh_handler_sign_request): Remove const attribute from p.
1226 (sexp_key_extract): Use make_cstring().
1227 (ssh_key_extract_comment): Likewise.
1228 (ssh_key_to_buffer): Use secure memory for memory area to hold the
1230 Added more comments.
1232 2005-02-25 Werner Koch <wk@g10code.com>
1234 * findkey.c (modify_description): Keep invalid % escapes, so that
1235 %0A may pass through.
1237 * agent.h (server_control_s): New field USE_AUTH_CALL.
1238 * call-scd.c (agent_card_pksign): Make use of it.
1239 * command-ssh.c (data_sign): Set the flag.
1240 (ssh_send_key_public): New arg OVERRIDE_COMMENT.
1241 (card_key_available): Add new arg CARDSN.
1242 (ssh_handler_request_identities): Use the card s/n as comment.
1243 (sexp_key_extract): Use GCRYMPI_FMT_STD.
1246 * learncard.c (make_shadow_info): Moved to ..
1247 * protect.c (make_shadow_info): .. here. Return NULL on malloc
1248 failure. Made global.
1249 * agent.h: Add prototype.
1251 2005-02-24 Werner Koch <wk@g10code.com>
1253 * call-scd.c (unescape_status_string): New. Actual a copy of
1255 (card_getattr_cb, agent_card_getattr): New.
1257 * command-ssh.c (card_key_available): New.
1258 (ssh_handler_request_identities): First see whether a card key is
1261 * gpg-agent.c (handle_connections): Need to check for events if
1262 select returns with -1.
1264 2005-02-23 Werner Koch <wk@g10code.com>
1266 * command-ssh.c (get_passphrase): Removed.
1267 (ssh_identity_register): Partly rewritten.
1268 (open_control_file, search_control_file, add_control_entry): New.
1269 (ssh_handler_request_identities): Return only files listed in our
1272 * findkey.c (unprotect): Check for allocation error.
1274 * agent.h (opt): Add fields to record the startup terminal
1276 * gpg-agent.c (main): Record them and do not force keep display
1277 with --enable-ssh-support.
1278 * command-ssh.c (start_command_handler_ssh): Use them here.
1280 * gpg-agent.c: Renamed option --ssh-support to
1281 --enable-ssh-support.
1283 * command.c (cmd_readkey): New.
1284 (register_commands): Register new command "READKEY".
1286 * command-ssh.c (ssh_request_process): Improved logging.
1288 * findkey.c (agent_write_private_key): Always use plain open.
1289 Don't depend on an umask for permissions.
1290 (agent_key_from_file): Factored file reading code out to ..
1291 (read_key_file): .. new function.
1292 (agent_public_key_from_file): New.
1294 2005-02-22 Werner Koch <wk@g10code.com>
1296 * command-ssh.c (stream_read_string): Removed call to abort on
1297 memory error because the CVS version of libgcrypt makes sure
1298 that ERRNO gets always set on error even with a faulty user
1301 2005-02-19 Moritz Schulte <moritz@g10code.com>
1303 * command-ssh.c (ssh_receive_mpint_list): Slightly rewritten, do
1304 not use elems_secret member of key_spec.
1305 (ssh_key_type_spec): Removed member: elems_secret.
1306 (ssh_key_types): Removed elems_secret data.
1307 (ssh_sexp_construct): Renamed to ...
1308 (sexp_key_construct): ... this; changed callers.
1309 (ssh_sexp_extract): Renamed to ...
1310 (sexp_key_extract): ... this; changed callers.
1311 (ssh_sexp_extract_key_type): Renamed to ...
1312 (sexp_extract_identifier): ... this; changed callers; use
1314 Added more comments.
1316 2005-02-18 Moritz Schulte <moritz@g10code.com>
1318 * command-ssh.c (ssh_sexp_construct): Rewritten generation of sexp
1319 template, clarified.
1320 (ssh_sexp_extract): Support shadowed-private-key-sexp; treat
1321 protected-private key and shadowed-private-key as public keys.
1322 (key_secret_to_public): Rewritten: simply use ssh_sexp_extract()
1323 and ssh_sexp_construct().
1325 2005-02-15 Werner Koch <wk@g10code.com>
1327 * findkey.c (modify_description): Don't increment OUT_LEN during
1330 2005-02-14 Moritz Schulte <moritz@g10code.com>
1332 * command-ssh.c (es_read_byte): Renamed to ...
1333 (stream_es_read_byte): ... this; changed callers.
1334 (es_write_byte): Renamed to ...
1335 (stream_write_byte): ... this; changed callers.
1336 (es_read_uint32): Renamed to ...
1337 (stream_read_uint32): ... this; changed callers.
1338 (es_write_uint32): Renamed to ...
1339 (stream_write_uint32): ... this; changed callers.
1340 (es_read_data): Renamed to ...
1341 (stream_read_data): ... this; changed callers.
1342 (es_write_data): Renamed to ...
1343 (stream_write_data): ... this; changed callers.
1344 (es_read_string): Renamed to ...
1345 (stream_read_string): ... this; changed callers.
1346 (es_read_cstring): Renamed to ...
1347 (stream_read_cstring): ... this; changed callers.
1348 (es_write_string): Renamed to ...
1349 (stream_write_string): ... this; changed callers.
1350 (es_write_cstring): Renamed to ...
1351 (stream_write_cstring): ... this; changed callers.
1352 (es_read_mpi): Renamed to ...
1353 (stream_read_mpi): ... this; changed callers.
1354 (es_write_mpi): Renamed to ...
1355 (stream_write_mpi): ... this; changed callers.
1356 (es_copy): Renamed to ...
1357 (stream_copy): ... this; changed callers.
1358 (es_read_file): Renamed to ...
1359 (file_to_buffer): ... this; changed callers.
1360 (ssh_identity_register): Removed variable description_length;
1361 changed code to use asprintf for description.
1362 (stream_write_uint32): Do not filter out the last byte of shift
1364 (uint32_construct): New macro ...
1365 (stream_read_uint32): ... use it; removed unnecessary cast.
1367 2005-02-03 Werner Koch <wk@g10code.com>
1369 * agent.h (agent_exit): Add JNLIB_GCC_A_NR to indicate that this
1370 function won't return.
1372 * gpg-agent.c (check_for_running_agent): Initialize pid to a
1373 default value if not needed.
1375 * command-ssh.c: Removed stdint.h. s/byte_t/unsigned char/,
1376 s/uint32/u32/ becuase that is what we have always used in GnuPG.
1377 (ssh_request_specs): Moved to top of file.
1378 (ssh_key_types): Ditto.
1379 (make_cstring): Ditto.
1380 (data_sign): Don't use a variable for the passphrase prompt, make
1382 (ssh_request_process):
1385 * findkey.c (modify_description): Renamed arguments for clarity,
1386 polished documentation. Make comment a C-string. Fixed case of
1387 DESCRIPTION being just "%".
1388 (agent_key_from_file): Make sure comment string to a C-string.
1390 * gpg-agent.c (create_socket_name): Cleanup the implemntation, use
1391 DIMof, agent_exit, removed superflous args and return the
1392 allocated string as value. Documented. Changed callers.
1393 (create_server_socket): Cleanups similar to above. Changed callers.
1394 (cleanup_do): Renamed to ..
1395 (remove_socket): .. this. Changed caller.
1396 (handle_connections): The signals are to be handled in the select
1397 and not in the accept. Test all FDs after returning from a
1398 select. Remove the event tests from the accept calls. The select
1399 already assured that the accept won't block.
1401 2005-01-29 Moritz Schulte <moritz@g10code.com>
1403 * command-ssh.c (ssh_handler_request_identities)
1404 (ssh_handler_sign_request, ssh_handler_add_identity)
1405 (ssh_handler_remove_identity, ssh_handler_remove_all_identities)
1406 (ssh_handler_lock, ssh_handler_unlock): Changed to return an error
1407 code instead of a boolean.
1408 (ssh_request_process): Changed to return a boolean instead of an
1409 error; adjust caller.
1410 (ssh_request_handle_t): Adjusted type.
1411 (ssh_request_spec): New member: identifier.
1412 (REQUEST_SPEC_DEFINE): New macro; use it for initialization of
1414 (ssh_request_process): In debugging mode, log identifier of
1416 (start_command_handler_ssh): Moved most of the stream handling
1418 (ssh_request_process): ... here.
1420 2005-01-28 Moritz Schulte <moritz@g10code.com>
1422 * command-ssh.c (ssh_handler_add_identity): Pass ctrl to
1423 ssh_identity_register().
1424 (ssh_identity_register): New argument: ctrl; pass ctrl to
1426 (get_passphrase): Pass ctrl instead of NULL to agent_askpin().
1427 (start_command_handler_ssh): Use agent_init_default_ctrl();
1428 deallocate structure members, which might be dynamically
1430 (lifetime_default): Removed variable.
1431 (ssh_handler_add_identity): Fix ttl handling; renamed variable
1433 (ssh_identity_register): Fix key grip handling.
1435 2005-01-26 Moritz Schulte <moritz@g10code.com>
1437 * command-ssh.c (ssh_handler_sign_request): Confirm to agent
1438 protocol in case of failure.
1440 * command-ssh.c: New file.
1442 * Makefile.am (gpg_agent_SOURCES): New source file: command-ssh.c.
1444 * findkey.c (modify_description): New function.
1445 (agent_key_from_file): Support comment field in key s-expressions.
1447 * gpg-agent.c (enum cmd_and_opt_values): New item: oSSHSupport.
1448 (opts) New entry for oSSHSupport.
1449 New variable: socket_name_ssh.
1450 (cleanup_do): New function based on cleanup().
1451 (cleanup): Use cleanup_do() for socket_name and socket_name_ssh.
1452 (main): New switch case for oSSHSupport.
1453 (main): Move socket name creation code to ...
1454 (create_socket_name): ... this new function.
1455 (main): Use create_socket_name() for creating socket names for
1456 socket_name and for socket_name_ssh in case ssh support is
1458 Move socket creation code to ...
1459 (create_server_socket): ... this new function.
1460 (main): Use create_server_socket() for creating sockets.
1461 In case standard_socket is set, do not only store a socket name in
1462 socket_name, but also in socket_name_ssh.
1463 Generate additional environment info strings for ssh support.
1464 Pass additional ssh socket argument to handle_connections.
1465 (start_connection_thread_ssh): New function.
1466 (handle_connections): Use select to multiplex between gpg-agent
1467 and ssh-agent protocol.
1469 * agent.h (struct opt): New member: ssh_support.
1470 (start_command_handler_ssh): Add prototype.
1472 2005-01-04 Werner Koch <wk@g10code.com>
1474 * trustlist.c (agent_marktrusted): Use "Cancel" for the first
1475 confirmation and made the strings translatable.
1477 * cache.c (agent_put_cache): Fix the test for using the default
1480 2004-12-21 Werner Koch <wk@g10code.com>
1482 * preset-passphrase.c (preset_passphrase): Handle --passphrase.
1484 * Makefile.am (gpg_preset_passphrase_LDADD): Reorder libs so that
1485 pwquery may use stuff from jnlib. Conditionally add -lwsock2
1486 (gpg_protect_tool_LDADD): Ditto.
1488 * preset-passphrase.c (main): Use default_homedir().
1489 (main) [W32]: Initialize sockets.
1491 2004-12-21 Marcus Brinkmann <marcus@g10code.de>
1493 * Makefile.am (libexec_PROGRAMS): Add gpg-preset-passphrase.
1494 (gpg_preset_passphrase_SOURCES, gpg_preset_passphrase_LDADD): New
1496 * agent.h (opt): New member allow_cache_passphrase.
1497 * cache.c (housekeeping): Check if R->ttl is not negative.
1498 (agent_put_cache): Allow ttl to be negative.
1499 * command.c (parse_hexstring): Allow something to follow the
1501 (cmd_cache_passphrase): New function.
1502 (register_commands): Add it.
1503 * gpg-agent.c: Handle --allow-preset-passphrase.
1504 * preset-passphrase.c: New file.
1506 2004-12-21 Werner Koch <wk@g10code.com>
1508 * gpg-agent.c (main): Use default_homedir().
1509 * protect-tool.c (main): Ditto.
1511 2004-12-20 Werner Koch <wk@g10code.com>
1513 * gpg-agent.c (main) [W32]: Now that Mutexes work we can remove
1514 the pth_init kludge.
1515 (main): Add new options --[no-]use-standard-socket.
1516 (check_for_running_agent): Check whether it is running on the
1519 * call-scd.c (init_membuf, put_membuf, get_membuf): Removed. We
1520 now use the identical implementation from ../common/membuf.c.
1522 * pksign.c (agent_pksign): Changed arg OUTFP to OUTBUF and use
1523 membuf functions to return the value.
1524 * pkdecrypt.c (agent_pkdecrypt): Ditto.
1525 * genkey.c (agent_genkey): Ditto.
1526 * command.c (cmd_pksign, cmd_pkdecrypt, cmd_genkey): Replaced
1527 assuan_get_data_fp() by a the membuf scheme.
1528 (clear_outbuf, write_and_clear_outbuf): New.
1530 2004-12-19 Werner Koch <wk@g10code.com>
1532 * query.c (initialize_module_query): New.
1533 * call-scd.c (initialize_module_call_scd): New.
1534 * gpg-agent.c (main): Call them.
1536 2004-12-18 Werner Koch <wk@g10code.com>
1538 * gpg-agent.c (main): Remove special Pth initialize.
1540 * agent.h (map_assuan_err): Define in terms of
1541 map_assuan_err_with_source.
1543 2004-12-17 Moritz Schulte <moritz@g10code.com>
1545 * query.c: Undo change from 2004-12-05.
1547 2004-12-15 Werner Koch <wk@g10code.com>
1549 * gpg-agent.c [W32]: Various hacks to make it work.
1551 * findkey.c (agent_write_private_key) [W32]: Adjust open call.
1553 * call-scd.c (start_scd) [W32]: Don't check whether the daemon
1554 didn't died. To hard to do under Windows.
1555 (start_scd) [W32]: Disable sending of the event signal option.
1557 * protect-tool.c (read_file, export_p12_file) [W32]: Use setmode
1558 to get stdout and stin into binary mode.
1560 2004-12-05 Moritz Schulte <moritz@g10code.com>
1562 * query.c (start_pinentry): Allow CTRL be NULL.
1564 2004-10-22 Werner Koch <wk@g10code.com>
1566 * gpg-agent.c (parse_rereadable_options): Return "not handled"
1567 when the log file has not beend hadled. This is will let the main
1568 option processing continue. Fixed a bug introduced on 2004-09-4
1569 resulting in logging to stderr until a HUP has been given.
1570 (main): Don't close the listen FD.
1572 2004-09-30 Werner Koch <wk@g10code.com>
1574 * Makefile.am: Adjusted from gettext 1.14.
1576 2004-09-29 Werner Koch <wk@g10code.com>
1578 * minip12.c (parse_bag_encrypted_data): Print error if a bad
1579 passphrase has been given.
1581 2004-09-28 Werner Koch <wk@g10code.com>
1583 * protect.c (agent_unprotect): Fixed wiping of CLEARTEXT. Thanks
1584 to Moritz for pointing this out.
1586 2004-09-25 Moritz Schulte <moritz@g10code.com>
1588 * agent.h: Declare: agent_pksign_do.
1589 (struct server_control_s): New member: raw_value.
1591 * pksign.c (do_encode_md): New argument: raw_value; support
1592 generation of raw (non-pkcs1) data objects; adjust callers.
1593 (agent_pksign_do): New function, based on code ripped
1594 out from agent_pksign.
1595 (agent_pksign): Use agent_pksign_do.
1597 * command.c (start_command_handler): Set ctrl.digest.raw_value.
1599 2004-09-09 Werner Koch <wk@g10code.de>
1601 * gpg-agent.c (check_for_running_agent): New.
1602 (main): The default action is now to check for an already running
1604 (parse_rereadable_options): Set logfile only on reread.
1605 (main): Do not print the "is development version" note.
1607 2004-08-20 Werner Koch <wk@g10code.de>
1609 * gpg-agent.c: New option --max-cache-ttl. Suggested by Alexander
1611 * cache.c (housekeeping): Use it here instead of the hardwired
1614 * query.c (start_pinentry): Use a timeout for the pinentry lock.
1616 2004-08-18 Werner Koch <wk@g10code.de>
1618 * protect-tool.c (get_passphrase): Make sure that the default
1619 prompts passed to gpg-agent are utf-8 encoded. Add new prompt values.
1620 (import_p12_file, import_p12_file, export_p12_file): Changed calls
1621 to get_passphrase so that better prompts are displayed.
1622 (get_new_passphrase): New.
1624 2004-07-22 Werner Koch <wk@g10code.de>
1626 * trustlist.c (read_list): Allow colons in the fingerprint.
1627 (headerblurb): Rephrased.
1629 * gpg-agent.c (handle_connections): Increase the stack size ot 256k.
1631 2004-06-20 Moritz Schulte <moritz@g10code.com>
1633 * gpg-agent.c: Include <sys/stat.h> (build fix for BSD).
1635 2004-05-11 Werner Koch <wk@gnupg.org>
1637 * gpg-agent.c (handle_signal): Reload the trustlist on SIGHUP.
1638 (start_connection_thread): Hack to simulate a ticker.
1639 * trustlist.c (agent_trustlist_housekeeping)
1640 (agent_reload_trustlist): New. Protected all global functions
1641 here with a simple counter which is sufficient for Pth.
1643 2004-05-03 Werner Koch <wk@gnupg.org>
1645 * gpg-agent.c: Remove help texts for options lile --lc-ctype.
1646 (main): New option --allow-mark-trusted.
1647 * trustlist.c (agent_marktrusted): Use it here.
1649 2004-04-30 Werner Koch <wk@gnupg.org>
1651 * protect-tool.c: New option --enable-status-msg.
1652 (store_private_key): Print status messages for imported keys.
1653 (read_and_unprotect): Ditto for bad passphrase.
1655 * gpg-agent.c (parse_rereadable_options): New arg REREAD. Allow
1657 (current_logfile): New.
1659 2004-04-26 Werner Koch <wk@gnupg.org>
1661 * call-scd.c (start_scd): Do not register an event signal if we
1662 are running as a pipe server.
1664 2004-04-21 Werner Koch <wk@gnupg.org>
1666 * call-scd.c (start_scd): Send event-signal option. Always check
1667 that the scdaemon is still running.
1669 * gpg-agent.c (handle_signal): Do not use SIGUSR{1,2} anymore for
1670 changing the verbosity.
1672 2004-04-16 Werner Koch <wk@gnupg.org>
1674 * gpg-agent.c (main): Tell the logging code that we are running
1677 2004-04-06 Werner Koch <wk@gnupg.org>
1679 * gpg-agent.c (main): Use new libgcrypt thread library register
1682 2004-03-23 Marcus Brinkmann <marcus@g10code.de>
1684 * gpg-agent.c (main): For now, always print the default config
1685 file name for --gpgconf-list.
1687 2004-03-17 Werner Koch <wk@gnupg.org>
1689 * gpg-agent.c (main) <gpgconf>: Fixed default value quoting.
1691 2004-03-16 Werner Koch <wk@gnupg.org>
1693 * gpg-agent.c (parse_rereadable_options): Use the new
1694 DEFAULT_CACHE_TTL macro.
1695 (main): Updated --gpgconf-list output.
1697 2004-02-21 Werner Koch <wk@gnupg.org>
1699 * command.c (cmd_passwd): Take acount of a key description.
1701 * genkey.c (reenter_compare_cb): Do not set the error text.
1702 (agent_protect_and_store, agent_genkey): Force a re-enter after a
1703 non-matching passphrase.
1704 * query.c (agent_askpin): Add new arg INITIAL_ERRTEXT; changed
1707 2004-02-19 Werner Koch <wk@gnupg.org>
1709 * protect-tool.c: New options --have-cert and --prompt.
1710 (export_p12_file): Read a certificate from STDIN and pass it to
1711 p12_build. Detect a keygrip and construct the filename in that
1712 case. Unprotcet a key if needed. Print error messages for key
1713 formats we can't handle.
1714 (release_passphrase): New.
1715 (get_passphrase): New arg PROMPTNO. Return the allocated
1716 string. Changed all callers.
1718 * minip12.c: Revamped the build part.
1719 (p12_build): New args CERT and CERTLEN.
1721 2004-02-18 Werner Koch <wk@gnupg.org>
1723 * protect-tool.c (main): Setup the used character set.
1724 * gpg-agent.c (main): Ditto.
1726 * gpg-agent.c (set_debug): New. New option --debug-level.
1727 (main): New option --gpgconf-list.
1729 2004-02-17 Werner Koch <wk@gnupg.org>
1731 * pksign.c (do_encode_md): Cleaned up by using gcry_sexp_build.
1733 * Makefile.am (gpg_protect_tool_SOURCES): Removed
1734 simple-pwquery.[ch], as we once moved it to ../common.
1736 2004-02-13 Werner Koch <wk@gnupg.org>
1738 * command.c (cmd_setkeydesc): New.
1739 (register_commands): Add command SETKEYDESC.
1740 (cmd_pksign, cmd_pkdecrypt): Use the key description.
1741 (reset_notify): Reset the description.
1742 * findkey.c (unprotect): Add arg DESC_TEXT.
1743 (agent_key_from_file): Ditto.
1744 * pksign.c (agent_pksign): Ditto.
1745 * pkdecrypt.c (agent_pkdecrypt): Ditto. Made CIPHERTEXT an
1748 * protect-tool.c (main): New options --no-fail-on-exist, --homedir.
1749 (store_private_key): Use them here.
1751 2004-02-12 Werner Koch <wk@gnupg.org>
1753 * protect-tool.c (read_file, main): Allow reading from stdin.
1755 * Makefile.am: Include cmacros.am for common flags.
1756 (libexec_PROGRAMS): Put gpg-protect-tool there.
1758 2004-02-10 Werner Koch <wk@gnupg.org>
1760 * minip12.c (parse_bag_encrypted_data): Finished implementation.
1761 (p12_parse): Add callback args.
1762 * protect-tool.c (import_p12_cert_cb): New.
1763 (import_p12_file): Use it.
1765 2004-02-06 Werner Koch <wk@gnupg.org>
1767 * minip12.c (crypt_block): Add arg CIPHER_ALGO; changed all callers.
1768 (set_key_iv): Add arg KEYBYTES; changed caller.
1770 2004-02-03 Werner Koch <wk@gnupg.org>
1772 * findkey.c (agent_key_from_file): Extra paranoid wipe.
1773 * protect.c (agent_unprotect): Ditto.
1774 (merge_lists): Ditto. Add arg RESULTLEN.
1775 * pkdecrypt.c (agent_pkdecrypt): Don't show the secret key even in
1778 * protect.c: Add DSA and Elgamal description.
1780 2004-01-29 Werner Koch <wk@gnupg.org>
1782 * agent.h (server_control_s): Add connection_fd field.
1783 * command.c (start_command_handler): Init it here.
1784 * gpg-agent.c (agent_init_default_ctrl): and here.
1785 * call-scd.c: Add the CTRL arg to all functions calling start_scd
1786 and pass it to start_scd. Changed all callers
1787 (start_scd): Keep track of the current active connection.
1788 (agent_reset_scd): New.
1789 * command.c (start_command_handler): Call it here.
1790 * learncard.c (agent_handle_learn): Add arg CTRL; changed caller.
1791 (send_cert_back): Ditto.
1793 2004-01-28 Werner Koch <wk@gnupg.org>
1795 * trustlist.c (agent_marktrusted): Check whether the trustlist is
1798 2004-01-27 Werner Koch <wk@gnupg.org>
1800 * sexp-parse.h: Moved to ../common.
1802 2004-01-24 Werner Koch <wk@gnupg.org>
1804 * call-scd.c (atfork_cb): New.
1805 (start_scd): Make sure secmem gets cleared.
1806 * query.c (atfork_cb): New.
1807 (start_pinentry): Make sure secmem gets cleared.
1809 2004-01-16 Werner Koch <wk@gnupg.org>
1811 * findkey.c (agent_key_from_file): Now return an error code so
1812 that we have more detailed error messages in the upper layers.
1813 This fixes the handling of pinentry's cancel button.
1814 * pksign.c (agent_pksign): Changed accordingly.
1815 * pkdecrypt.c (agent_pkdecrypt): Ditto.
1816 * command.c (cmd_passwd): Ditto.
1818 2003-12-16 Werner Koch <wk@gnupg.org>
1820 * gpg-agent.c (main): Set the prefixes for assuan logging.
1822 2003-12-15 Werner Koch <wk@gnupg.org>
1824 * protect.c (do_encryption): Use gcry_create_nonce instad of the
1825 obsolete WEAK_RANDOM.
1827 2003-11-20 Werner Koch <wk@gnupg.org>
1829 * sexp-parse.h (snext): Don't use atoi_1 and digitp macros, so
1830 that this file is useful by other applications too.
1832 2003-10-27 Werner Koch <wk@gnupg.org>
1834 * command.c (cmd_get_confirmation): New command.
1836 2003-08-20 Timo Schulz <twoaday@freakmail.de>
1838 * pksign.c (do_encode_md): Allocate enough space. Cast md
1839 byte to unsigned char to prevent sign extension.
1841 2003-08-14 Timo Schulz <twoaday@freakmail.de>
1843 * pksign.c (do_encode_md): Due to the fact pkcs#1 padding
1844 is now in Libgcrypt, use the new interface.
1846 2003-07-31 Werner Koch <wk@gnupg.org>
1848 * Makefile.am (gpg_agent_LDADD): Added INTLLIBS.
1849 (gpg_protect_tool_SOURCES): Added simple-pwquery.[ch]
1851 2003-07-27 Werner Koch <wk@gnupg.org>
1853 Adjusted for gcry_mpi_print and gcry_mpi_scan API change.
1855 2003-07-15 Werner Koch <wk@gnupg.org>
1857 * simple-pwquery.c, simple-pwquery.h: Moved to ../common.
1858 * Makefile.am (gpg_protect_tool_LDADD): Add simple-pwquery.o.
1859 Removed it from xx_SOURCES.
1861 2003-07-04 Werner Koch <wk@gnupg.org>
1863 * gpg-agent.c (handle_connections): Kludge to allow use of Pth 1
1866 2003-06-30 Werner Koch <wk@gnupg.org>
1868 * call-scd.c (learn_status_cb): Store the serialno in PARM.
1870 2003-06-26 Werner Koch <wk@gnupg.org>
1872 * call-scd.c (agent_card_serialno): Don't do a RESET anymore.
1874 2003-06-25 Werner Koch <wk@gnupg.org>
1876 * command.c (cmd_scd): New.
1877 * call-scd.c (agent_card_scd): New.
1878 * divert-scd.c (divert_generic_cmd): New
1880 * call-scd.c (agent_card_learn): New callback args SINFO.
1881 (learn_status_cb): Pass all other status lines to the sinfo
1883 * learncard.c (release_sinfo, sinfo_cb): New.
1884 (agent_handle_learn): Pass the new cb to the learn function and
1885 pass the collected information back to the client's assuan
1888 * gpg-agent.c (main): Moved pth_init before gcry_check_version.
1890 2003-06-24 Werner Koch <wk@gnupg.org>
1892 * gpg-agent.c (handle_connections): Adjusted for Pth 2.0
1894 Adjusted for changes in the libgcrypt API. Some more fixes for the
1897 2003-06-04 Werner Koch <wk@gnupg.org>
1899 Renamed error codes from INVALID to INV and removed _ERROR suffixes.
1901 2003-06-03 Werner Koch <wk@gnupg.org>
1903 Changed all error codes in all files to the new libgpg-error scheme.
1905 * agent.h: Include gpg-error.h and errno.h
1906 * Makefile.am: Link with libgpg-error
1908 * query.c: assuan.h is now a system header.
1909 * genkey.c (agent_genkey): Fixed silly use of xmalloc by
1912 2003-04-29 Werner Koch <wk@gnupg.org>
1914 * command.c (register_commands): Adjusted for new Assuan semantics.
1916 * Makefile.am: Don't override LDFLAGS.
1918 2002-12-04 Werner Koch <wk@gnupg.org>
1920 * gpg-agent.c: New variable config_filename.
1921 (parse_rereadable_options): New.
1922 (main): Use it here. Add setting of default values, set
1924 (reread_configuration): Filled with actual code.
1926 2002-12-03 Werner Koch <wk@gnupg.org>
1928 * protect-tool.c (read_key): Don't run make_canonical on a NULL
1931 * command.c (parse_hexstring): New.
1932 (cmd_sethash): Use it.
1933 (parse_keygrip): New.
1934 (cmd_havekey, cmd_sigkey): Use it.
1936 * genkey.c (agent_protect_and_store): New.
1937 (store_key): Add arg FORCE.
1938 (agent_genkey): Pass false to this force of store_key.
1940 2002-11-13 Werner Koch <wk@gnupg.org>
1942 * gpg-agent.c (main): Switch all messages to utf-8.
1944 * simple-pwquery.c (agent_send_all_options): Use $GPG_TTY and
1947 * cache.c (new_data): Uiih - /sizeof d/sizeof *d/.
1949 2002-11-10 Werner Koch <wk@gnupg.org>
1951 * command.c (option_handler): Fix keep_tty check.
1953 2002-11-06 Werner Koch <wk@gnupg.org>
1955 * gpg-agent.c (main): Make sure we have a default ttyname.
1956 * command.c (option_handler): Check opt.keep_tty here
1957 * query.c (start_pinentry): but not anymore here.
1959 2002-11-05 Werner Koch <wk@gnupg.org>
1961 * agent.h (opt,server_control_s): Move display and lc_ variables
1962 to the control struct so that they are per connection.
1963 * gpg-agent.c (agent_init_default_ctrl): New.
1964 (main): Assign those command line options to new default_* variables.
1965 Reset DISPLAY in server mode so that tehre is no implicit default.
1966 * command.c (start_command_handler): Initialize and deinitialize
1968 (option_handler): Work on the ctrl values and not on the opt.
1969 * query.c (start_pinentry): New argument CTRL to set the display
1970 connection specific. Changed all callers to pass this value.
1971 (agent_askpin,agent_get_passphrase,agent_get_confirmation): Add
1972 CTRL arg and pass it ot start_pinentry.
1973 * command.c (cmd_get_passphrase): Pass CTRL argument.
1974 * trustlist.c (agent_marktrusted): Add CTRL argument
1975 * command.c (cmd_marktrusted): Pass CTRL argument
1976 * divert-scd.c (ask_for_card): Add CTRL arg.
1977 (divert_pksign,divert_pkdecrypt): Ditto. Changed caller.
1978 (getpin_cb): Use OPAQUE to pass the CTRL variable. Changed both
1980 * findkey.c (unprotect): Add CTRL arg.
1981 (agent_key_from_file): Ditto.
1983 * query.c (unlock_pinentry): Disconnect the pinentry so that we
1984 start a new one for each request. This is required to support
1985 clients with different environments (e.g. X magic cookies).
1987 2002-09-05 Neal H. Walfield <neal@cs.uml.edu>
1989 * gpg-agent.c (main) [USE_GNU_PTH]: No need to call
1990 assuan_set_io_func as assuan is smart.
1992 2002-09-25 Werner Koch <wk@gnupg.org>
1994 * gpg-agent.c (handle_signal): Flush cache on SIGHUP.
1995 * cache.c (agent_flush_cache): New.
1997 * gpg-agent.c, agent.h: Add --keep-display and --keep-tty.
1998 * query.c (start_pinentry): Implement them. The option passing
1999 needs more thoughts.
2001 2002-09-09 Werner Koch <wk@gnupg.org>
2003 * gpg-agent.c (create_private_keys_directory)
2004 (create_directories): New.
2005 (main): Try to create a home directory.
2007 2002-09-04 Neal H. Walfield <neal@g10code.de>
2009 * gpg-agent.c (main): Use sigaction, not signal.
2011 2002-09-03 Neal H. Walfield <neal@g10code.de>
2013 * findkey.c: Include <fcntl.h>.
2014 (agent_write_private_key): Prefer POSIX compatibity, open and
2015 fdopen, over the simplicity of GNU extensions, fopen(file, "x").
2017 2002-08-22 Werner Koch <wk@gnupg.org>
2019 * query.c (agent_askpin): Provide the default desc text depending
2020 on the pininfo. Do the basic PIN verification only when
2023 2002-08-21 Werner Koch <wk@gnupg.org>
2025 * query.c (agent_askpin): Hack to show the right default prompt.
2026 (agent_get_passphrase): Ditto.
2028 * trans.c: Removed and replaced all usages with standard _()
2030 * divert-scd.c (getpin_cb): Pass a more descritive text to the
2033 * Makefile.am: Renamed the binary protect-tool to gpg-protect-tool.
2034 * protect-tool.c: Removed the note about internal use only.
2036 * gpg-agent.c (main): New option --daemon so that the program is
2037 not accidently started in the background.
2039 2002-08-16 Werner Koch <wk@gnupg.org>
2041 * call-scd.c (learn_status_cb): Handle CERTINFO status.
2042 (agent_card_learn): Add args for certinfo cb.
2043 * learncard.c (release_certinfo,certinfo_cb): New.
2044 (send_cert_back): New. With factored out code from ..
2045 (agent_handle_learn): here. Return certinfo stuff.
2047 2002-07-26 Werner Koch <wk@gnupg.org>
2049 * gpg-agent.c (main): New option --ignore-cache-for-signing.
2050 * command.c (option_handler): New server option
2051 use-cache-for-signing defaulting to true.
2052 (cmd_pksign): handle global and per session option.
2053 * findkey.c (agent_key_from_file, unprotect): New arg
2054 ignore_cache. Changed all callers.
2055 * pksign.c (agent_pksign): Likewise.
2057 2002-06-29 Werner Koch <wk@gnupg.org>
2059 * query.c (start_pinentry): Use GNUPG_DERAULT_PINENTRY.
2060 * call-scd.c (start_scd): Use GNUPG_DEFAULT_SCDAEMON.
2062 2002-06-28 Werner Koch <wk@gnupg.org>
2064 * protect-tool.c (export_p12_file): New.
2065 (main): New command --p12-export.
2066 * minip12.c (create_final,p12_build,compute_tag_length): New.
2067 (store_tag_length): New.
2069 2002-06-27 Werner Koch <wk@gnupg.org>
2071 * minip12.c (crypt_block): Renamed from decrypt_block, add arg to
2074 * Makefile.am (pkglib_PROGRAMS): Put protect-tool there.
2076 * findkey.c (agent_write_private_key,agent_key_from_file)
2077 (agent_key_available): Use GNUPG_PRIVATE_KEYS_DIR constant.
2078 * gpg-agent.c (main): Use GNUPG_DEFAULT_HOMEDIR constant.
2080 * protect-tool.c (store_private_key): New.
2081 (import_p12_file): Store the new file if requested.
2082 (main): New options --force and --store.
2084 * gpg-agent.c (main): Set a global flag when running detached.
2085 * query.c (start_pinentry): Pass the list of FD to keep in the
2086 child when not running detached.
2087 * call-scd.c (start_scd): Ditto.
2089 2002-06-26 Werner Koch <wk@gnupg.org>
2091 * command.c (cmd_istrusted, cmd_listtrusted, cmd_marktrusted)
2092 (cmd_pksign, cmd_pkdecrypt, cmd_genkey, cmd_get_passphrase)
2093 (cmd_learn): Print an error message for a failed operation.
2095 * simple-pwquery.c, simple-pwquery.h: New.
2096 * protect-tool. (get_passphrase): New, used to get a passphrase
2097 from the agent if none was given on the command line.
2099 2002-06-25 Werner Koch <wk@gnupg.org>
2101 * protect-tool.c (rsa_key_check): New.
2102 (import_p12_file): New.
2103 (main): New command --p12-import.
2104 * minip12.c, minip12.h: New.
2106 2002-06-24 Werner Koch <wk@gnupg.org>
2108 * protect-tool.c (read_file): New.
2109 (read_key): Factored most code out to read_file.
2111 2002-06-17 Werner Koch <wk@gnupg.org>
2113 * agent.h: Add a callback function to the pin_entry_info structure.
2114 * query.c (agent_askpin): Use the callback to check for a correct
2115 PIN. Removed the start_err_text argument because it is not
2116 anymore needed; changed callers.
2117 * findkey.c (unprotect): Replace our own check loop by a callback.
2118 (try_unprotect_cb): New.
2119 * genkey.c (reenter_compare_cb): New.
2120 (agent_genkey): Use this callback here. Fixed setting of the pi2
2121 variable and a segv in case of an empty PIN.
2123 * divert-scd.c (getpin_cb): Removed some unused stuff and
2124 explained what we still have to change.
2126 2002-06-12 Werner Koch <wk@gnupg.org>
2128 * gpg-agent.c (main): New option --disable-pth.
2130 2002-06-11 Werner Koch <wk@gnupg.org>
2132 * protect-tool.c: Add command --show-keygrip
2133 (show_keygrip): New.
2135 2002-05-23 Werner Koch <wk@gnupg.org>
2137 * call-scd.c: Seirialized all scdaeom access when using Pth.
2139 * cache.c: Made the cache Pth-thread-safe.
2140 (agent_unlock_cache_entry): New.
2141 * findkey.c (unprotect): Unlock the returned cache value.
2142 * command.c (cmd_get_passphrase): Ditto.
2144 * gpg-agent.c (main): Register pth_read/write with Assuan.
2146 2002-05-22 Werner Koch <wk@gnupg.org>
2148 * query.c: Serialized all pinentry access when using Pth.
2150 * gpg-agent.c (handle_signal,start_connection_thread)
2151 (handle_connections): New
2152 (main): Use the new Pth stuff to allow concurrent connections.
2153 * command.c (start_command_handler): Add new arg FD so that the
2154 fucntion can also be used for an already connected socket.
2155 * Makefile.am: Link with Pth.
2157 2002-05-14 Werner Koch <wk@gnupg.org>
2159 * cache.c (housekeeping, agent_put_cache): Use our time() wrapper.
2161 2002-04-26 Werner Koch <wk@gnupg.org>
2163 * cache.c (agent_put_cache): Reinitialize the creation time and
2164 the ttl when reusing a slot.
2166 * call-scd.c (start_scd): Print debug messages only with debug
2168 * query.c (start_pinentry): Ditto.
2170 2002-04-25 Marcus Brinkmann <marcus@g10code.de>
2172 * agent.h (agent_get_confirmation): Replace paramter prompt with
2173 two parameters ok and cancel.
2174 * query.c (agent_get_confirmation): Likewise. Implement this.
2175 * trustlist.c (agent_marktrusted): Fix invocation of
2176 agent_get_confirmation.
2177 * divert-scd.c (ask_for_card): Likewise.
2179 2002-04-24 Marcus Brinkmann <marcus@g10code.de>
2181 * agent.h (struct opt): Add members display, ttyname, ttytype,
2182 lc_ctype, and lc_messages.
2183 * gpg-agent.c (enum cmd_and_opt_values): Add oDisplay, oTTYname,
2184 oTTYtype, oLCctype, and LCmessages.
2185 (main): Handle these options.
2186 * command.c (option_handler): New function.
2187 (register_commands): Register option handler.
2188 * query.c (start_pinentry): Pass the various display and tty
2189 options to the pinentry.
2191 2002-04-05 Werner Koch <wk@gnupg.org>
2193 * protect-tool.c (show_file): New. Used as default action.
2195 2002-03-28 Werner Koch <wk@gnupg.org>
2197 * divert-scd.c (encode_md_for_card): Don't do the pkcs-1 padding,
2198 the scdaemon should take care of it.
2199 (ask_for_card): Hack to not display the trailing zero.
2201 2002-03-11 Werner Koch <wk@gnupg.org>
2203 * learncard.c (kpinfo_cb): Remove the content restrictions from
2206 2002-03-06 Werner Koch <wk@gnupg.org>
2209 * divert-scd.c (ask_for_card): The serial number is binary so
2210 convert it to hex here.
2211 * findkey.c (agent_write_private_key): New.
2212 * genkey.c (store_key): And use it here.
2214 * pkdecrypt.c (agent_pkdecrypt): Changed the way the diversion is done.
2215 * divert-scd.c (divert_pkdecrypt): Changed interface and
2218 2002-03-05 Werner Koch <wk@gnupg.org>
2220 * call-scd.c (inq_needpin): New.
2221 (agent_card_pksign): Add getpin_cb args.
2222 (agent_card_pkdecrypt): New.
2224 2002-03-04 Werner Koch <wk@gnupg.org>
2226 * pksign.c (agent_pksign): Changed how the diversion is done.
2227 * divert-scd.c (divert_pksign): Changed interface and implemented it.
2228 (encode_md_for_card): New.
2229 * call-scd.c (agent_card_pksign): New.
2231 2002-02-28 Werner Koch <wk@gnupg.org>
2233 * pksign.c (agent_pksign): Detect whether a Smartcard is to be
2234 used and divert the operation in this case.
2235 * pkdecrypt.c (agent_pkdecrypt): Likewise
2236 * findkey.c (agent_key_from_file): Add optional arg shadow_info
2237 and have it return information about a shadowed key.
2238 * protect.c (agent_get_shadow_info): New.
2240 * protect.c (snext,sskip,smatch): Moved to
2241 * sexp-parse.h: New file.
2242 * divert-scd.c: New.
2244 2002-02-27 Werner Koch <wk@gnupg.org>
2246 * protect.c (agent_shadow_key): New.
2248 * command.c (cmd_learn): New command LEARN.
2249 * gpg-agent.c: New option --scdaemon-program.
2250 * call-scd.c (start_scd): New. Based on query.c
2251 * query.c: Add 2 more arguments to all uses of assuan_transact.
2253 2002-02-18 Werner Koch <wk@gnupg.org>
2255 * findkey.c (unprotect): Show an error message for a bad passphrase.
2257 * command.c (cmd_marktrusted): Implemented.
2258 * trustlist.c (agent_marktrusted): New.
2259 (open_list): Add APPEND arg.
2261 * query.c (agent_get_confirmation): New.
2263 2002-02-06 Werner Koch <wk@gnupg.org>
2265 * cache.c (housekeeping): Fixed linking in the remove case.
2267 2002-02-01 Werner Koch <wk@gnupg.org>
2269 * gpg-agent.c: New option --default-cache-ttl.
2270 * cache.c (agent_put_cache): Use it.
2272 * cache.c: Add a few debug outputs.
2274 * protect.c (agent_private_key_type): New.
2275 * agent.h: Add PRIVATE_KEY_ enums.
2276 * findkey.c (agent_key_from_file): Use it to decide whether we
2277 have to unprotect a key.
2278 (unprotect): Cache the passphrase.
2280 * findkey.c (agent_key_from_file,agent_key_available): The key
2281 files do now require a ".key" suffix to make a script's life
2283 * genkey.c (store_key): Ditto.
2285 2002-01-31 Werner Koch <wk@gnupg.org>
2287 * genkey.c (store_key): Protect the key.
2288 (agent_genkey): Ask for the passphrase.
2289 * findkey.c (unprotect): Actually unprotect the key.
2290 * query.c (agent_askpin): Add an optional start_err_text.
2292 2002-01-30 Werner Koch <wk@gnupg.org>
2295 (hash_passphrase): Based on the GnuPG 1.0.6 version.
2296 * protect-tool.c: New
2298 2002-01-29 Werner Koch <wk@gnupg.org>
2300 * findkey.c (agent_key_available): New.
2301 * command.c (cmd_havekey): New.
2302 (register_commands): And register new command.
2304 2002-01-20 Werner Koch <wk@gnupg.org>
2306 * command.c (cmd_get_passphrase): Remove the plus signs.
2308 * query.c (start_pinentry): Send no-grab option to pinentry
2309 * gpg-agent.c (main): Move variable grab as no_grab to agent.h.
2311 2002-01-19 Werner Koch <wk@gnupg.org>
2313 * gpg-agent.c (main): Disable core dumps.
2316 * command.c (cmd_get_passphrase): Use the cache.
2317 (cmd_clear_passphrase): Ditto.
2319 * gpg-agent.c: Removed unused cruft and implement the socket
2321 (my_strusage): Take bug report address from configure.ac.
2322 * command.c (start_command_handler): Add an argument to start as
2324 (start_command_handler): Enable Assuan logging.
2326 2002-01-15 Werner Koch <wk@gnupg.org>
2329 * command.c (cmd_istrusted, cmd_listtrusted, cmd_marktrusted): New.
2331 2002-01-07 Werner Koch <wk@gnupg.org>
2333 * genkey.c: Store the secret part and return the public part.
2335 2002-01-03 Werner Koch <wk@gnupg.org>
2337 * command.c (cmd_get_passphrase): New.
2338 (cmd_clear_passphrase): New.
2339 * query.c (agent_get_passphrase): New.
2341 2002-01-02 Werner Koch <wk@gnupg.org>
2344 * command.c (cmd_genkey): New.
2346 * command.c (rc_to_assuan_status): Removed and changed all callers
2347 to use map_to_assuan_status.
2349 2001-12-19 Werner Koch <wk@gnupg.org>
2351 * keyformat.txt: New.
2353 2001-12-19 Marcus Brinkmann <marcus@g10code.de>
2355 * query.c (start_pinentry): Add new argument to assuan_pipe_connect.
2357 2001-12-18 Werner Koch <wk@gnupg.org>
2359 * Makefile.am: Use LIBGCRYPT macros
2361 2001-12-14 Werner Koch <wk@gnupg.org>
2363 * gpg-agent.c (main): New option --batch. New option --debug-wait
2364 n, so that it is possible to attach gdb when used in server mode.
2365 * query.c (agent_askpin): Don't ask in batch mode.
2367 * command.c: Removed the conversion macros as they are now in
2370 2001-12-14 Marcus Brinkmann <marcus@g10code.de>
2372 * query.c (LINELENGTH): Removed.
2373 (agent_askpin): Use ASSUAN_LINELENGTH, not LINELENGTH.
2375 2001-11-19 Werner Koch <wk@gnupg.org>
2377 * gpg-agent.c: Removed all GUI code, removed code for old
2378 protocol. New code to use the Assuan protocol as a server and
2379 also to communicate with a new ask-passphrase utility.
2381 2000-11-22 Werner Koch <wk@gnupg.org>
2383 * gpg-agent.c (main): csh support by Dan Winship, new options --sh
2384 and --csh and set default by consulting $SHELL.
2386 Mon Aug 21 17:59:17 CEST 2000 Werner Koch <wk@openit.de>
2388 * gpg-agent.c (passphrase_dialog): Cleanup the window and added the
2389 user supplied text to the window.
2390 (main): Fixed segv in gtk_init when used without a command to start.
2392 * gpg-agent.c: --flush option.
2394 (req_clear_passphrase): Implemented.
2396 Fri Aug 18 14:27:14 CEST 2000 Werner Koch <wk@openit.de>
2402 Copyright 2001, 2002, 2003, 2004, 2005,
2403 2007, 2008, 2009 Free Software Foundation, Inc.
2405 This file is free software; as a special exception the author gives
2406 unlimited permission to copy and/or distribute it, with or without
2407 modifications, as long as this notice is preserved.
2409 This file is distributed in the hope that it will be useful, but
2410 WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
2411 implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.