1 2008-11-11 Werner Koch <wk@g10code.com>
3 * call-scd.c (membuf_data_cb): Change return type to
4 assuan_error_t to avoid warnings with newer libassuan versions.
6 2008-11-04 Werner Koch <wk@g10code.com>
8 * command.c (cmd_killagent): Stop the agent immediately.
9 (start_command_handler): Take care of GPG_ERR_EOF.
11 2008-10-29 Werner Koch <wk@g10code.com>
13 * gpg-agent.c (main): Move USE_STANDARD_SOCKET to the outer scope.
14 (create_socket_name): Remove arg USE_STANDARD_SOCKET. Change all
16 (create_server_socket): Remove IS_STANDARD_NAME and replace it by
17 USE_STANDARD_SOCKET. Change all callers.
18 (check_own_socket_running): New.
19 (check_own_socket, check_own_socket_thread): New.
20 (handle_tick): Check server socket once a minute.
21 (handle_connections): Remove the extra pth_wait in the shutdown
24 2008-10-20 Werner Koch <wk@g10code.com>
26 * command.c (cmd_geteventcounter): Mark unused arg.
27 (cmd_listtrusted, cmd_pksign, cmd_pkdecrypt, cmd_genkey): Ditto.
28 (cmd_updatestartuptty, post_cmd_notify): Ditto.
29 * command-ssh.c (add_control_entry)
30 (ssh_handler_request_identities, ssh_handler_remove_identity)
31 (ssh_handler_remove_all_identities, ssh_handler_lock)
32 (ssh_handler_unlock): Ditto.
33 * call-pinentry.c (pinentry_active_p, popup_message_thread)
34 (agent_popup_message_stop): Ditto.
35 * findkey.c (agent_public_key_from_file): Ditto.
36 * genkey.c (check_passphrase_pattern): Ditto.
37 * call-scd.c (atfork_cb): Ditto.
38 * protect-tool.c (import_p12_cert_cb): Ditto.
39 * t-protect.c (main): Ditto.
41 2008-10-17 Werner Koch <wk@g10code.com>
43 * call-scd.c (start_scd) [W32]: Use snprintf again because we now
44 always use the estream variant.
46 2008-10-15 Werner Koch <wk@g10code.com>
48 * call-scd.c (start_scd): Enable assuan loggging if requested.
49 (agent_scd_check_aliveness) [W32]: Fix use of GetExitCodeProcess.
51 2008-10-14 Werner Koch <wk@g10code.com>
53 * gpg-agent.c (get_agent_scd_notify_event): Need to use a manual
56 2008-09-29 Werner Koch <wk@g10code.com>
58 * agent.h (GCRY_MD_USER): Rename to GCRY_MODULE_ID_USER.
59 (GCRY_MD_USER_TLS_MD5SHA1): Rename to MD_USER_TLS_MD5SHA1 and
62 2008-09-25 Werner Koch <wk@g10code.com>
64 * divert-scd.c (getpin_cb): Support a Reset Code style PINs..
66 2008-09-03 Werner Koch <wk@g10code.com>
68 * command.c (parse_keygrip): Use hex2bin.
69 (cmd_preset_passphrase): Decode the passphrase. Reported by Kiss
70 Gabor. Fixes #679 again.
71 * preset-passphrase.c (make_hexstring): Remove.
72 (preset_passphrase): Use bin2hex.
74 2008-05-27 Werner Koch <wk@g10code.com>
76 * trustlist.c (insert_colons): Fix stupidly wrong allocation size
79 2008-05-26 Werner Koch <wk@g10code.com>
81 * gpg-agent.c (main): Re-initialize default assuan log stream if a
84 * trustlist.c (agent_marktrusted): Use xtryasprintf and xfree.
86 * gpg-agent.c (main, agent_deinit_default_ctrl): Always use xfree
87 because our asprintf is mapped to an xmalloc style function in
88 util.h. Replace xstrdup by xtrystrdup.
89 * w32main.c (build_argv): Ditto.
90 * preset-passphrase.c (preset_passphrase): Ditto.
91 * divert-scd.c (ask_for_card): Ditto.
92 * command.c (option_handler): Ditto.
93 * command-ssh.c (ssh_handler_request_identities): Ditto.
94 * call-pinentry.c (start_pinentry): Ditto.
96 * gpg-agent.c (start_connection_thread)
97 (start_connection_thread_ssh): Use pth_thread_id for useful output
99 (pth_thread_id) [!PTH_HAVE_PTH_THREAD_ID]: New.
101 2008-03-17 Werner Koch <wk@g10code.com>
103 * agent.h (agent_inq_pinentry_launched): New prototype.
105 * call-pinentry.c: Include sys/types.h and signal.h.
107 2008-02-14 Werner Koch <wk@g10code.com>
109 * command.c (agent_inq_pinentry_launched): New.
110 (option_handler): Add option allow-pinentry-notify.
111 * call-pinentry.c (getinfo_pid_cb): New.
112 (start_pinentry): Ask for the PID and notify the client.
114 2008-01-15 Marcus Brinkmann <marcus@g10code.de>
116 * call-pinentry.c (start_pinentry): Start pinentry in detached
119 2007-12-04 Werner Koch <wk@g10code.com>
121 * call-pinentry.c (agent_askpin): Use gnupg_get_help_string.
123 2007-12-03 Werner Koch <wk@g10code.com>
125 * gpg-agent.c (main): s/standard_socket/use_standard_socket/ for
127 (create_server_socket): New arg IS_SSH to avoid testing with
130 2007-11-20 Werner Koch <wk@g10code.com>
132 * gpg-agent.c (get_agent_scd_notify_event): New.
133 (handle_signal): Factor SIGUSR2 code out to:
134 (agent_sigusr2_action): .. New.
135 (agent_sighup_action): Print info message here and not in
137 (handle_connections) [PTH_EVENT_HANDLE]: Call agent_sigusr2_action.
139 * call-scd.c (agent_scd_check_aliveness) [W32]: Implemented.
140 (start_scd) [W32]: Send event-signal option.
142 2007-11-19 Werner Koch <wk@g10code.com>
144 * call-pinentry.c (agent_askpin): Set the tooltip for the quality
147 2007-11-15 Werner Koch <wk@g10code.com>
149 * agent.h (struct server_control_s): Add XAUTHORITY and
151 * gpg-agent.c: New option --xauthority.
152 (main, agent_init_default_ctrl)
153 (agent_deinit_default_ctrl): Implemented
154 * command.c (cmd_updatestartuptty): Ditto.
155 * command-ssh.c (start_command_handler_ssh): Ditto.
156 * call-pinentry.c (atfork_cb): Set the environment.
157 (start_pinentry): Pass CTRL as arg to atfork_cb.
159 2007-11-14 Werner Koch <wk@g10code.com>
161 * call-scd.c (start_scd) [W32]: Take care of fflush peculiarities.
163 2007-11-07 Werner Koch <wk@g10code.com>
165 * agent.h: Remove errors.h.
167 2007-10-24 Werner Koch <wk@g10code.com>
169 * genkey.c (check_passphrase_constraints): Changed the wording of
170 the warning messages.
172 2007-10-19 Werner Koch <wk@g10code.com>
174 * protect-tool.c (get_passphrase): Use new utf8 switch fucntions.
176 2007-10-15 Daiki Ueno <ueno@unixuser.org> (wk)
178 * command-ssh.c (reenter_compare_cb): New function; imported from
180 (ssh_identity_register): Ask initial passphrase twice.
182 2007-10-02 Werner Koch <wk@g10code.com>
184 * command.c (cmd_getinfo): Add "pid" subcommand.
186 2007-10-01 Werner Koch <wk@g10code.com>
188 * agent.h (struct server_control_s): Remove unused CONNECTION_FD.
190 * gpg-agent.c: Remove w32-afunix.h. Include mkdtemp.h.
191 (socket_nonce, socket_nonce_ssh): New.
192 (create_server_socket): Use assuan socket wrappers. Remove W32
193 specific stuff. Save the server nonce.
195 (start_connection_thread, start_connection_thread_ssh): Call it.
196 (handle_connections): Change args to gnupg_fd_t.
197 * command.c (start_command_handler): Change LISTEN_FD to gnupg_fd_t.
198 * command-ssh.c (start_command_handler_ssh): Ditto.
200 2007-09-18 Werner Koch <wk@g10code.com>
202 * agent.h (struct pin_entry_info_s): Add element WITH_QUALITYBAR.
203 * genkey.c (check_passphrase_constraints): New arg SILENT.
205 (agent_protect_and_store, agent_genkey): Enable qualitybar.
206 * call-pinentry.c (agent_askpin): Send that option.
207 (unescape_passphrase_string): New.
209 (estimate_passphrase_quality): New.
211 2007-09-14 Marcus Brinkmann <marcus@g10code.de>
213 * call-pinentry.c (agent_popup_message_stop): Implement kill for
216 2007-08-28 Werner Koch <wk@g10code.com>
218 * gpg-agent.c (main): Add option --faked-system-time.
220 * protect-tool.c (read_and_unprotect): Print the protected-at date.
222 * agent.h (struct server_control_s): Add member IN_PASSWD.
223 * command.c (cmd_passwd): Set it.
224 * findkey.c (try_unprotect_cb): Use it.
226 * protect.c (do_encryption): Replace asprintf by xtryasprint.
227 (agent_protect): Create the protected-at item.
228 (agent_unprotect): Add optional arg PROTECTED_AT.
229 (merge_lists): Add args CUTOFF and CUTLEN.
230 (agent_unprotect): Use them.
231 * findkey.c (try_unprotect_cb): Add code to test for expired keys.
232 (unprotect): Allow changing the passphrase.
234 2007-08-27 Werner Koch <wk@g10code.com>
236 * gpg-agent.c: Add options --min-passphrase-nonalpha,
237 --check-passphrase-pattern and --enforce-passphrase-constraints.
238 (MIN_PASSPHRASE_NONALPHA): Init nonalpha option to 1.
239 (main): Declare options for gpgconf.
240 * agent.h (struct): Add members MIN_PASSPHRASE_NONALPHA,
241 ENFORCE_PASSPHRASE_CONSTRAINTS and CHECK_PASSPHRASE_PATTERN.
242 * genkey.c (nonalpha_charcount): New.
243 (check_passphrase_pattern): New.
244 (check_passphrase_constraints): Implement. Factor some code out...
245 (take_this_one_anyway, take_this_one_anyway2): .. New.
247 * call-pinentry.c (agent_show_message): New.
248 (agent_askpin): We better reset the pin buffer before asking.
250 * trustlist.c (insert_colons): New.
251 (agent_marktrusted): Pretty print the fpr.
253 2007-08-22 Werner Koch <wk@g10code.com>
255 * findkey.c (O_BINARY): Make sure it is defined.
256 (agent_write_private_key): Use O_BINARY
258 * protect-tool.c (import_p12_file): Add hack to allow importing of
259 gnupg 2.0.4 generated files.
261 2007-08-06 Werner Koch <wk@g10code.com>
263 * trustlist.c (read_one_trustfile): Add flag "cm".
264 (agent_istrusted): Ditto.
266 2007-08-02 Werner Koch <wk@g10code.com>
268 * gpg-agent.c: Include gc-opt-flags.h and remove their definition
271 2007-07-13 Werner Koch <wk@g10code.com>
273 * genkey.c (check_passphrase_constraints): Require a confirmation
274 for an empty passphrase.
275 (agent_genkey, agent_protect_and_store): No need to repeat an
278 2007-07-05 Werner Koch <wk@g10code.com>
280 * call-scd.c (struct inq_needpin_s): New.
281 (inq_needpin): Pass unknown inquiries up.
283 2007-07-04 Werner Koch <wk@g10code.com>
285 * gpg-agent.c (TIMERTICK_INTERVAL): New.
286 (fixed_gcry_pth_init, main): Kludge to fix Pth initialization.
288 2007-07-03 Werner Koch <wk@g10code.com>
290 * gpg-agent.c (handle_connections): Do not use FD_SETSIZE for
291 select but compute the correct number.
293 2007-07-02 Werner Koch <wk@g10code.com>
295 * command.c (cmd_reloadagent) [W32]: New.
296 (register_commands) [W32]: New command RELOADAGENT.
298 * Makefile.am (gpg_agent_SOURCES): Remove w32main.c and w32main.h.
299 (gpg_agent_res_ldflags): Remove icon file as we don't have a
301 * gpg-agent.c (main): do not include w32main.h. Remove all calls
303 (agent_sighup_action): New.
304 (handle_signal): Use it.
306 2007-06-26 Werner Koch <wk@g10code.com>
308 * gpg-agent.c (create_directories) [W32]: Made it work.
310 2007-06-21 Werner Koch <wk@g10code.com>
312 * agent.h (ctrl_t): Remove. It is now declared in ../common/util.h.
314 * gpg-agent.c (check_for_running_agent): New arg SILENT. Changed
316 (create_server_socket): If the standard socket is in use check
317 whether a agent is running and avoid starting another one.
319 2007-06-18 Marcus Brinkmann <marcus@g10code.de>
321 * gpg-agent.c (main): Percent escape pathname in --gpgconf-list
324 2007-06-18 Werner Koch <wk@g10code.com>
326 * w32main.c (build_argv): New.
329 * command.c (cmd_killagent) [W32]: New.
331 * gpg-agent.c (get_agent_ssh_socket_name): New.
332 (no_force_standard_socket) New.
333 (create_server_socket): Use it.
334 * Makefile.am (gpg_agent_res_ldflags): Pass windows option to ld.
336 2007-06-14 Werner Koch <wk@g10code.com>
338 * protect-tool.c (main): Setup default socket name for
340 (MAP_SPWQ_ERROR_IMPL): New. Use map_spwq_error for spqw related
342 * preset-passphrase.c (main): Setup default socket name for
344 (map_spwq_error): Remove.
345 (MAP_SPWQ_ERROR_IMPL): New.
347 * call-pinentry.c (start_pinentry): Use gnupg_module_name.
348 * call-scd.c (start_scd): Ditto.
350 2007-06-12 Werner Koch <wk@g10code.com>
354 * trustlist.c (read_one_trustfile): Replace GNUPG_SYSCONFDIR by a
356 (read_trustfiles): Ditto.
358 * gpg-agent.c (main): Replace some calls by init_common_subsystems.
359 * preset-passphrase.c (main): Ditto.
360 * protect-tool.c (main): Ditto.
362 2007-06-11 Werner Koch <wk@g10code.com>
364 * Makefile.am (common_libs): Use libcommonstd macro.
365 (commonpth_libs): Use libcommonpth macro.
367 * protect-tool.c (main) [W32]: Call pth_init.
369 * preset-passphrase.c (main) [W32]: Replace the explicit Winsocket
370 init by a call to pth_init.
372 * trustlist.c (initialize_module_trustlist): New.
373 * gpg-agent.c (main): Call it.
375 * call-pinentry.c (initialize_module_query): Rename to
376 initialize_module_call_pinentry.
378 * minip12.c: Remove iconv.h. Add utf8conf.h. Changed all iconv
379 calss to use these jnlib wrappers.
381 2007-06-06 Werner Koch <wk@g10code.com>
383 * minip12.c (enum): Rename CONTEXT to ASNCONTEXT as winnt.h
384 defines such a symbol to access the process context.
386 * call-pinentry.c (dump_mutex_state) [W32]: Handle the W32Pth case.
387 * call-scd.c (dump_mutex_state): Ditto.
389 * protect-tool.c (i18n_init): Remove.
390 * preset-passphrase.c (i18n_init): Remove.
391 * gpg-agent.c (i18n_init): Remove.
393 2007-05-19 Marcus Brinkmann <marcus@g10code.de>
395 * protect-tool.c (get_passphrase): Free ORIG_CODESET on error.
397 2007-05-14 Werner Koch <wk@g10code.com>
399 * protect.c (make_shadow_info): Replace sprintf by smklen.
401 2007-04-20 Werner Koch <wk@g10code.com>
403 * gpg-agent.c (my_gcry_logger, my_gcry_outofcore_handler): Removed.
404 (main): Call the setup_libgcrypt_logging helper.
405 * protect-tool.c (my_gcry_logger): Removed.
406 (main): Call the setup_libgcrypt_logging helper.
408 2007-04-03 Werner Koch <wk@g10code.com>
410 * trustlist.c (read_trustfiles): Take a missing trustlist as an
413 2007-03-20 Werner Koch <wk@g10code.com>
415 * protect-tool.c: New option --p12-charset.
416 * minip12.c (p12_build): Implement it.
418 2007-03-19 Werner Koch <wk@g10code.com>
420 * minip12.c: Include iconv.h.
421 (decrypt_block): New.
422 (parse_bag_encrypted_data, parse_bag_data): Use it here.
423 (bag_data_p, bag_decrypted_data_p): New helpers.
425 2007-03-06 Werner Koch <wk@g10code.com>
427 * gpg-agent.c (main) <gpgconf>: Add entries for all ttl options.
429 2007-02-20 Werner Koch <wk@g10code.com>
431 * call-pinentry.c (start_pinentry): Fix for OS X to allow loading
432 of the bundle. Tested by Benjamin Donnachie.
434 2007-02-14 Werner Koch <wk@g10code.com>
436 * gpg-agent.c: New option --pinentry-touch-file.
437 (get_agent_socket_name): New.
438 * agent.h (opt): Add pinentry_touch_file.
439 * call-pinentry.c (start_pinentry): Send new option to the
442 2007-01-31 Moritz Schulte <moritz@g10code.com> (wk)
444 * command-ssh.c (stream_read_string): Initialize LENGTH to zero.
445 (start_command_handler_ssh): Use es_fgetc/es_ungetc to check if
446 EOF has been reached before trying to process another request.
448 2007-01-31 Werner Koch <wk@g10code.com>
450 * command-ssh.c (start_command_handler_ssh):
452 * Makefile.am (t_common_ldadd): Add LIBICONV.
454 2007-01-25 Werner Koch <wk@g10code.com>
456 * genkey.c (check_passphrase_constraints): Get ngettext call right
457 and use UTF-8 aware strlen.
459 * protect-tool.c (get_passphrase): New arg OPT_CHECK.
460 (get_new_passphrase): Enable OPT_CHECK on the first call.
461 * command.c (cmd_get_passphrase): Implement option --check.
463 2007-01-24 Werner Koch <wk@g10code.com>
465 * gpg-agent.c (MIN_PASSPHRASE_LEN): New
466 (parse_rereadable_options): New option --min-passphrase-len.
467 * genkey.c (check_passphrase_constraints): New.
468 (agent_genkey, agent_protect_and_store): Call new function. Fix
471 * call-pinentry.c (agent_askpin): Allow translation of the displayed
473 (agent_popup_message_start): Remove arg CANCEL_BTN.
474 (popup_message_thread): Use --one-button option.
476 * command.c (cmd_passwd): Now that we don't distinguish between
477 assuan and regular error codes we can jump to the end on error.
479 2006-12-07 David Shaw <dshaw@jabberwocky.com>
481 * Makefile.am: Link to iconv for jnlib dependency.
483 2006-11-20 Werner Koch <wk@g10code.com>
485 * call-pinentry.c (agent_popup_message_stop): Use SIGKILL.
486 * call-scd.c (inq_needpin): Implement POPUPKEYPADPROMPT and
489 2006-11-15 Werner Koch <wk@g10code.com>
491 * protect.c (make_shadow_info): Cast printf arg to unsigned int.
492 * minip12.c (parse_bag_encrypted_data): Ditto.
493 (parse_bag_data, p12_parse): Ditto.
494 * command-ssh.c (ssh_identity_register): Changed buffer_n to
497 * agent.h (struct server_control_s): New field thread_startup.
498 * command.c (start_command_handler): Moved CTRL init code to ..
499 * gpg-agent.c (start_connection_thread): .. here.
500 (agent_deinit_default_ctrl): New.
501 (agent_init_default_ctrl): Made static.
502 (handle_connections): Allocate CTRL and pass it pth_spawn.
503 * command-ssh.c (start_command_handler_ssh): Moved CTRL init code
505 * gpg-agent.c (start_connection_thread_ssh): .. here.
507 2006-11-14 Werner Koch <wk@g10code.com>
509 * command.c (bump_key_eventcounter): New.
510 (bump_card_eventcounter): New.
511 (cmd_geteventcounter): New command.
512 * gpg-agent.c (handle_signal): Call bump_card_eventcounter.
513 * findkey.c (agent_write_private_key): Call bump_key_eventcounter.
514 * trustlist.c (agent_reload_trustlist): Ditto.
516 * command.c (post_cmd_notify, io_monitor): New.
517 (register_commands, start_command_handler): Register them.
519 2006-11-09 Werner Koch <wk@g10code.com>
521 * gpg-agent.c (main): In detached mode connect standard
522 descriptors to /dev/null.
524 * trustlist.c (read_trustfiles): Make sure not to pass a zero size
525 to realloc as the C standards says that this behaves like free.
527 2006-11-06 Werner Koch <wk@g10code.com>
529 * protect-tool.c (my_strusage): Fixed typo.
531 2006-10-23 Werner Koch <wk@g10code.com>
533 * gpg-agent.c (main): New command --gpgconf-test.
535 * minip12.c (parse_bag_encrypted_data, parse_bag_data): Allow for
538 2006-10-20 Werner Koch <wk@g10code.com>
540 * Makefile.am (t_common_ldadd): Use GPG_ERROR_LIBS instead -o just -l
542 2006-10-19 Werner Koch <wk@g10code.com>
544 * findkey.c (unprotect): Use it to avoid unnecessary calls to
546 * call-pinentry.c (pinentry_active_p): New.
548 2006-10-17 Werner Koch <wk@g10code.com>
550 * Makefile.am (gpg_agent_LDADD): Link to libcommonpth.
551 (gpg_agent_CFLAGS): New. This allows to only link this with Pth.
553 2006-10-16 Werner Koch <wk@g10code.com>
555 * call-pinentry.c (agent_get_confirmation): Map Cancel code here too.
556 * trustlist.c (agent_marktrusted): Return Cancel instead of
557 Not_Confirmed for the first question.
559 2006-10-12 Werner Koch <wk@g10code.com>
561 * protect-tool.c (get_passphrase): Fix if !HAVE_LANGINFO_CODESET.
563 2006-10-06 Werner Koch <wk@g10code.com>
565 * Makefile.am (AM_CFLAGS): Use PTH version of libassuan.
566 (gpg_agent_LDADD): Ditto.
568 * divert-scd.c (divert_pksign): Use PKAUTH for the TLS algo.
570 2006-10-05 Werner Koch <wk@g10code.com>
572 * command.c (has_option_name): New.
573 (cmd_sethash): New --hash option.
574 * pksign.c (do_encode_raw_pkcs1): New.
575 (agent_pksign_do): Use it here for the TLS algo.
576 * agent.h (GCRY_MD_USER_TLS_MD5SHA1): New.
577 * divert-scd.c (pksign): Add case for tls-md5sha1.
579 * divert-scd.c (encode_md_for_card): Check that the algo is valid.
581 2006-10-04 Werner Koch <wk@g10code.com>
583 * call-pinentry.c (agent_get_passphrase): Changed to return the
584 unencoded passphrase.
585 (agent_askpin, agent_get_passphrase, agent_get_confirmation): Need
586 to map the cancel error.
587 * command.c (send_back_passphrase): New.
588 (cmd_get_passphrase): Use it here. Also implement --data option.
591 2006-09-26 Werner Koch <wk@g10code.com>
593 * learncard.c (agent_handle_learn): Send back the keypair
596 2006-09-25 Werner Koch <wk@g10code.com>
598 * trustlist.c (read_one_trustfile): Allow extra flags.
599 (struct trustitem_s): Replaced KEYFLAGS by a FLAGS struct.
600 Changed all code to use this.
601 (agent_istrusted): New arg CTRL. Changed all callers. Send back
603 * command.c (agent_write_status): New.
605 2006-09-20 Werner Koch <wk@g10code.com>
607 * Makefile.am: Changes to allow parallel make runs.
609 2006-09-15 Werner Koch <wk@g10code.com>
611 * trustlist.c: Entirely rewritten.
612 (agent_trustlist_housekeeping): Removed and removed all calls.
614 2006-09-14 Werner Koch <wk@g10code.com>
616 Replaced all call gpg_error_from_errno(errno) by
617 gpg_error_from_syserror().
619 * call-pinentry.c (start_pinentry): Replaced pipe_connect2 by
621 * call-scd.c (start_scd): Ditto.
622 * command.c (start_command_handler): Replaced
623 init_connected_socket_server by init_socket_server_ext.
625 2006-09-13 Werner Koch <wk@g10code.com>
627 * preset-passphrase.c (main) [W32]: Check for WSAStartup error.
629 2006-09-08 Werner Koch <wk@g10code.com>
631 * call-scd.c: Add signal.h as we are referencing SIGUSR2.
633 2006-09-06 Marcus Brinkmann <marcus@g10code.de>
635 * Makefile.am (AM_CFLAGS): Add $(GPG_ERR_CFLAGS).
636 (gpg_agent_LDADD): Replace -lgpg-error with $(GPG_ERROR_LIBS).
638 2006-09-06 Werner Koch <wk@g10code.com>
640 * query.c: Renamed to ..
641 * call-pinentry.c: .. this.
643 * agent.h (out_of_core): Removed.
644 (CTRL): Removed and changed everywhere to ctrl_t.
646 Replaced all Assuan error codes by libgpg-error codes. Removed
647 all map_to_assuan_status and map_assuan_err.
649 * gpg-agent.c (main): Call assuan_set_assuan_err_source to have Assuan
650 switch to gpg-error codes.
651 * command.c (set_error): Adjusted.
653 2006-09-04 Werner Koch <wk@g10code.com>
655 * command.c (percent_plus_unescape): New.
656 (cmd_get_val, cmd_putval): New.
658 2006-08-29 Werner Koch <wk@g10code.com>
660 * command-ssh.c (stream_read_mpi): Sanity check for early
661 detecting of too large keys.
662 * gpg-agent.c (my_gcry_outofcore_handler): New.
664 (main): No allocate 32k secure memory (was 16k).
666 2006-07-31 Werner Koch <wk@g10code.com>
668 * preset-passphrase.c (make_hexstring): For consistency use
669 xtrymalloc and changed caller to use xfree. Fixed function
672 2006-07-29 Marcus Brinkmann <marcus@g10code.de>
674 * preset-passphrase.c (preset_passphrase): Do not strip off last
675 character of passphrase.
676 (make_hexstring): New function.
677 * command.c (cmd_preset_passphrase): Use parse_hexstring to syntax
678 check passphrase argument. Truncate passphrase at delimiter.
680 2006-07-24 Werner Koch <wk@g10code.com>
682 * minip12.c (build_key_bag): New args SHA1HASH and
683 KEYIDSTR. Append bag Attributes if these args are given.
684 (build_cert_sequence): ditto.
685 (p12_build): Calculate certificate hash and pass to build
688 2006-07-21 Werner Koch <wk@g10code.com>
690 * minip12.c (oid_pkcs_12_keyBag): New.
691 (parse_bag_encrypted_data): New arg R_RESULT. Support keybags and
692 return the key object.
693 (p12_parse): Take new arg into account. Free RESULT on error.
695 2006-06-26 Werner Koch <wk@g10code.com>
697 * gpg-agent.c (handle_signal): Print info for SIGUSR2 only in
700 2006-06-22 Werner Koch <wk@g10code.com>
702 * command-ssh.c (make_cstring): Use memcpy instead of strncpy.
703 (ssh_receive_mpint_list, sexp_key_extract, data_sign): Use
704 xtrycalloc instead of xtrymalloc followed by memset.
706 2006-06-20 Werner Koch <wk@g10code.com>
708 * minip12.c (create_final): New arg PW. Add code to calculate the
711 2006-06-09 Marcus Brinkmann <marcus@g10code.de>
713 * Makefile.am (gpg_agent_LDADD): Add $(NETLIBS).
714 (gpg_protect_tool_LDADD): Likewise.
715 (gpg_preset_passphrase_LDADD): Likewise.
717 2006-04-09 Moritz Schulte <moritz@g10code.com>
719 * command-ssh.c (ssh_request_process): Removed FIXME mentioning a
722 2006-04-01 Moritz Schulte <moritz@g10code.com>
724 * command-ssh.c (ssh_identity_register): Make KEY_GRIP_RAW be 20
725 instead of 21 bytes long; do not fill KEY_GRIP_RAW[20] with NUL
726 byte - KEY_GRIP_RAW is a raw binary string anyway.
728 2006-02-09 Werner Koch <wk@g10code.com>
730 * call-scd.c (struct scd_local_s): New field next_local.
731 (scd_local_list): New.
732 (start_scd): Put new local into list.
733 (agent_reset_scd): Remove it from the list.
734 (agent_scd_check_aliveness): Here is the actual reason why we need
736 (agent_reset_scd): Send the new command RESTART instead of RESET.
738 2005-12-16 Werner Koch <wk@g10code.com>
740 * minip12.c (cram_octet_string): New
741 (p12_parse): Use it for NDEFed bags.
742 (parse_bag_data): Ditto.
743 (string_to_key, set_key_iv, crypt_block): New arg SALTLEN.
744 (p12_build): Use old value 8 for new arg.
745 (parse_bag_encrypted_data, parse_bag_data): Allow for salts of 8
746 to 16 bytes. Add new arg R_CONSUMED.
748 2005-11-24 Werner Koch <wk@g10code.com>
750 * minip12.c (p12_parse): Fixed for case that the key object comes
751 prior to the certificate.
753 2005-10-19 Werner Koch <wk@g10code.com>
755 * divert-scd.c (getpin_cb): Hack to use it for a keypad message.
757 * call-scd.c (inq_needpin): Reworked to support the new KEYPADINFO.
759 * query.c (start_pinentry): Keep track of the owner.
760 (popup_message_thread, agent_popup_message_start)
761 (agent_popup_message_stop, agent_reset_query): New.
762 * command.c (start_command_handler): Make sure a popup window gets
765 2005-10-08 Marcus Brinkmann <marcus@g10code.de>
767 * Makefile.am (gpg_protect_tool_LDADD): Add ../gl/libgnu.a.
768 (gpg_preset_passphrase_LDADD, t_common_ldadd): Likewise.
769 (gpg_agent_LDADD): Add ../gl/libgnu.a after ../common/libcommon.a.
771 2005-09-16 Werner Koch <wk@g10code.com>
773 * minip12.c (build_key_sequence, build_cert_sequence): Fixed
776 2005-09-15 Moritz Schulte <moritz@g10code.com>
778 * t-protect.c (test_agent_protect): Implemented.
779 (main): Disable use of secure memory.
781 2005-09-09 Werner Koch <wk@g10code.com>
783 * minip12.c (p12_build): Oops, array needs to be larger for the
785 (build_cert_bag): Fixed yesterdays change.
787 * command-ssh.c (card_key_available): Let the card handler decide
788 whether the card is supported here. Also get a short serial
789 number to return from the card handler.
791 2005-09-08 Werner Koch <wk@g10code.com>
793 * minip12.c (build_cert_bag): Use a non constructed object.
794 i.e. 0x80 and not 0xa0.
796 2005-08-16 Werner Koch <wk@g10code.com>
798 * gpg-agent.c (main): Use a default file name for --write-env-file.
800 2005-07-25 Werner Koch <wk@g10code.com>
802 * findkey.c (agent_public_key_from_file): Fixed array assignment.
803 This was the cause for random segvs.
805 2005-06-29 Werner Koch <wk@g10code.com>
807 * command-ssh.c (data_sign): Removed empty statement.
809 2005-06-21 Werner Koch <wk@g10code.com>
811 * minip12.c (create_final): Cast size_t to ulong for printf.
812 (build_key_bag, build_cert_bag, build_cert_sequence): Ditto.
814 2005-06-16 Werner Koch <wk@g10code.com>
816 * protect-tool.c (make_advanced): Makde RESULT a plain char.
817 * call-scd.c (unescape_status_string): Need to cast unsigned char*
819 (agent_card_pksign): Made arg R_BUF an unsigned char**.
820 * divert-scd.c (divert_pksign): Made SIGVAL unsigned char*.
821 (encode_md_for_card): Initialize R_VAL and R_LEN.
822 * genkey.c (store_key): Made BUF unsigned.
823 * protect.c (do_encryption): Ditto.
824 (do_encryption): Made arg PROTBEGIN unsigned. Initialize RESULT
825 and RESULTLEN even on error.
826 (merge_lists): Need to cast unsigned char * for strcpy. Initialize
827 RESULTand RESULTLEN even on error.
828 (agent_unprotect): Likewise for strtoul.
829 (make_shadow_info): Made P and INFO plain char.
830 (agent_shadow_key): Made P plain char.
832 2005-06-15 Werner Koch <wk@g10code.com>
834 * query.c (agent_get_passphrase): Made HEXSTRING a char*.
835 * command-ssh.c (ssh_key_grip): Made arg BUFFER unsigned.
836 (ssh_key_grip): Simplified.
837 (data_sign): Initialize variables with the definition.
838 (ssh_convert_key_to_blob): Make sure that BLOB and BLOB_SIZE
839 are set to NULL on error. Cool, gcc-4 detects uninitialized stuff
840 beyond function boundaries; well it can't know that we do error
841 proper error handling so that this was not a real error.
842 (file_to_buffer): Likewise for BUFFER and BUFFER_N.
843 (data_sign): Likewise for SIG and SIG_N.
844 (stream_read_byte): Set B to a value even on error.
845 * command.c (cmd_genkey): Changed VALUE to char.
846 (cmd_readkey): Cast arg for gcry_sexp_sprint.
847 * agent.h (struct server_control_s): Made KEYGRIP unsigned.
849 2005-06-13 Werner Koch <wk@g10code.com>
851 * command-ssh.c (start_command_handler_ssh): Reset the SCD.
853 2005-06-09 Werner Koch <wk@g10code.com>
855 * gpg-agent.c (create_socket_name): New option --max-cache-ttl-ssh.
856 * cache.c (housekeeping): Use it.
857 (agent_put_cache): Use a switch to get the default ttl so that it
858 is easier to add more cases.
860 2005-06-06 Werner Koch <wk@g10code.com>
862 * gpg-agent.c: New option --default-cache-ttl-ssh.
863 * agent.h (cache_mode_t): New.
864 * pksign.c (agent_pksign_do): New arg CACHE_MODE to replace the
865 ARG IGNORE_CACHE. Changed all callers.
866 (agent_pksign): Ditto.
867 * findkey.c (agent_key_from_file): Ditto. Canged all callers.
869 * command-ssh.c (data_sign): Use CACHE_MODE_SSH.
870 * cache.c (agent_get_cache): New arg CACHE_MODE.
871 (agent_put_cache): Ditto. Store it in the cache.
873 * query.c (agent_query_dump_state, dump_mutex_state): New.
874 (unlock_pinentry): Reset the global context before releasing the
876 * gpg-agent.c (handle_signal): Dump query.c info on SIGUSR1.
878 * call-scd.c (agent_scd_check_aliveness): Always do a waitpid and
879 add a timeout to the locking.
881 2005-06-03 Werner Koch <wk@g10code.com>
883 * command.c (cmd_updatestartuptty): New.
885 * gpg-agent.c: New option --write-env-file.
887 * gpg-agent.c (handle_connections): Make sure that the signals we
888 are handling are not blocked.Block signals while creating new
891 2005-06-02 Werner Koch <wk@g10code.com>
893 * call-scd.c (agent_scd_dump_state, dump_mutex_state): New.
894 * gpg-agent.c (handle_signal): Print it on SIGUSR1.
895 (handle_connections): Include the file descriptor into the
898 2005-06-01 Werner Koch <wk@g10code.com>
900 * gpg-agent.c: Include setenv.h.
902 2005-05-31 Werner Koch <wk@g10code.com>
904 * agent.h (out_of_core): s/__inline__/inine. Noted by Ray Link.
906 2005-05-25 Werner Koch <wk@g10code.com>
908 * gpg-agent.c (main): Do not unset the DISPLAY when we are
911 2005-05-24 Werner Koch <wk@g10code.com>
913 * call-scd.c (inq_needpin): Skip leading spaces in of PIN
915 * divert-scd.c (getpin_cb): Enhanced to cope with description
917 * query.c (agent_askpin): Add arg PROMPT_TEXT. Changed all
920 2005-05-21 Werner Koch <wk@g10code.com>
922 * call-scd.c (start_scd): Don't test for an alive scdaemon here.
923 (agent_scd_check_aliveness): New.
924 * gpg-agent.c (handle_tick): Test for an alive scdaemon.
925 (handle_signal): Print thread info on SIGUSR1.
927 2005-05-20 Werner Koch <wk@g10code.com>
929 * protect-tool.c: New option --canonical.
930 (show_file): Implement it.
932 * keyformat.txt: Define the created-at attribute for keys.
934 2005-05-18 Werner Koch <wk@g10code.com>
936 * divert-scd.c (ask_for_card): Removed the card reset kludge.
938 2005-05-17 Werner Koch <wk@g10code.com>
940 * call-scd.c (unlock_scd): Add new arg CTRL. Changed all callers.
941 (start_scd): Reoworked to allow for additional connections.
942 * agent.h (ctrl_t): Add local data for the SCdaemon.
943 * command.c (start_command_handler): Release SERVER_LOCAL.
945 * gpg-agent.c (create_server_socket): Use xmalloc.
946 (main): Removed option --disable-pth a dummy. Removed non-pth
948 (cleanup_sh): Removed. Not needed anymore.
950 2005-05-05 Moritz Schulte <moritz@g10code.com>
952 * command-ssh.c (ssh_key_to_buffer): Rename to ...
953 (ssh_key_to_protected_buffer): ... this; change callers.
954 Improved documentation.
955 Use ssh_key_grip(), where gcry_pk_get_keygrip() has been used
957 (ssh_handler_sign_request): Removed unusued variable P.
959 2005-04-20 Moritz Schulte <moritz@g10code.com>
961 * command-ssh.c (ssh_handler_request_identities): Removed
962 debugging code (sleep call), which was commited unintenionally.
964 2005-04-20 Werner Koch <wk@g10code.com>
966 * minip12.c (parse_bag_encrypted_data): Fix the unpadding hack.
968 * gpg-agent.c: New option --disable-scdaemon.
969 (handle_connections): Add time event to drive ...
970 (handle_tick): New function.
971 (main): Record the parent PID. Fixed segv when using ssh and a
974 * call-scd.c (start_scd): Take care of this option.
976 2005-04-03 Moritz Schulte <moritz@g10code.com>
978 * command-ssh.c (ssh_request_spec): New member: secret_input.
979 (REQUEST_SPEC_DEFINE): New argument: secret_input.
980 (request_specs): Add secret_input flag.
981 (request_spec_lookup): New function ...
982 (ssh_request_process): ... use it here; depending on secret_input
983 flag allocate secure or non-secure memory.
985 2005-03-02 Moritz Schulte <moritz@g10code.com>
987 * command-ssh.c (sexp_key_extract): Removed FIXME, since
988 xtrymallos does set errno correctly by now.
989 (sexp_extract_identifier): Remove const attribute from identifier.
990 (ssh_handler_request_identities): Remove const attribute from
991 key_type; removes ugly casts and FIXME.
992 (sexp_key_extract): Remove const attribute from comment.
993 (ssh_send_key_public): Remove const attribute from
994 key_type/comment; removes ugly cast.
995 (data_sign): Remove const attribute from identifier; removes ugly
997 (key_secret_to_public): Remove const attribute from comment;
999 (ssh_handler_sign_request): Remove const attribute from p.
1000 (sexp_key_extract): Use make_cstring().
1001 (ssh_key_extract_comment): Likewise.
1002 (ssh_key_to_buffer): Use secure memory for memory area to hold the
1004 Added more comments.
1006 2005-02-25 Werner Koch <wk@g10code.com>
1008 * findkey.c (modify_description): Keep invalid % escapes, so that
1009 %0A may pass through.
1011 * agent.h (server_control_s): New field USE_AUTH_CALL.
1012 * call-scd.c (agent_card_pksign): Make use of it.
1013 * command-ssh.c (data_sign): Set the flag.
1014 (ssh_send_key_public): New arg OVERRIDE_COMMENT.
1015 (card_key_available): Add new arg CARDSN.
1016 (ssh_handler_request_identities): Use the card s/n as comment.
1017 (sexp_key_extract): Use GCRYMPI_FMT_STD.
1020 * learncard.c (make_shadow_info): Moved to ..
1021 * protect.c (make_shadow_info): .. here. Return NULL on malloc
1022 failure. Made global.
1023 * agent.h: Add prototype.
1025 2005-02-24 Werner Koch <wk@g10code.com>
1027 * call-scd.c (unescape_status_string): New. Actual a copy of
1029 (card_getattr_cb, agent_card_getattr): New.
1031 * command-ssh.c (card_key_available): New.
1032 (ssh_handler_request_identities): First see whether a card key is
1035 * gpg-agent.c (handle_connections): Need to check for events if
1036 select returns with -1.
1038 2005-02-23 Werner Koch <wk@g10code.com>
1040 * command-ssh.c (get_passphrase): Removed.
1041 (ssh_identity_register): Partly rewritten.
1042 (open_control_file, search_control_file, add_control_entry): New.
1043 (ssh_handler_request_identities): Return only files listed in our
1046 * findkey.c (unprotect): Check for allocation error.
1048 * agent.h (opt): Add fields to record the startup terminal
1050 * gpg-agent.c (main): Record them and do not force keep display
1051 with --enable-ssh-support.
1052 * command-ssh.c (start_command_handler_ssh): Use them here.
1054 * gpg-agent.c: Renamed option --ssh-support to
1055 --enable-ssh-support.
1057 * command.c (cmd_readkey): New.
1058 (register_commands): Register new command "READKEY".
1060 * command-ssh.c (ssh_request_process): Improved logging.
1062 * findkey.c (agent_write_private_key): Always use plain open.
1063 Don't depend on an umask for permissions.
1064 (agent_key_from_file): Factored file reading code out to ..
1065 (read_key_file): .. new function.
1066 (agent_public_key_from_file): New.
1068 2005-02-22 Werner Koch <wk@g10code.com>
1070 * command-ssh.c (stream_read_string): Removed call to abort on
1071 memory error because the CVS version of libgcrypt makes sure
1072 that ERRNO gets always set on error even with a faulty user
1075 2005-02-19 Moritz Schulte <moritz@g10code.com>
1077 * command-ssh.c (ssh_receive_mpint_list): Slightly rewritten, do
1078 not use elems_secret member of key_spec.
1079 (ssh_key_type_spec): Removed member: elems_secret.
1080 (ssh_key_types): Removed elems_secret data.
1081 (ssh_sexp_construct): Renamed to ...
1082 (sexp_key_construct): ... this; changed callers.
1083 (ssh_sexp_extract): Renamed to ...
1084 (sexp_key_extract): ... this; changed callers.
1085 (ssh_sexp_extract_key_type): Renamed to ...
1086 (sexp_extract_identifier): ... this; changed callers; use
1088 Added more comments.
1090 2005-02-18 Moritz Schulte <moritz@g10code.com>
1092 * command-ssh.c (ssh_sexp_construct): Rewritten generation of sexp
1093 template, clarified.
1094 (ssh_sexp_extract): Support shadowed-private-key-sexp; treat
1095 protected-private key and shadowed-private-key as public keys.
1096 (key_secret_to_public): Rewritten: simply use ssh_sexp_extract()
1097 and ssh_sexp_construct().
1099 2005-02-15 Werner Koch <wk@g10code.com>
1101 * findkey.c (modify_description): Don't increment OUT_LEN during
1104 2005-02-14 Moritz Schulte <moritz@g10code.com>
1106 * command-ssh.c (es_read_byte): Renamed to ...
1107 (stream_es_read_byte): ... this; changed callers.
1108 (es_write_byte): Renamed to ...
1109 (stream_write_byte): ... this; changed callers.
1110 (es_read_uint32): Renamed to ...
1111 (stream_read_uint32): ... this; changed callers.
1112 (es_write_uint32): Renamed to ...
1113 (stream_write_uint32): ... this; changed callers.
1114 (es_read_data): Renamed to ...
1115 (stream_read_data): ... this; changed callers.
1116 (es_write_data): Renamed to ...
1117 (stream_write_data): ... this; changed callers.
1118 (es_read_string): Renamed to ...
1119 (stream_read_string): ... this; changed callers.
1120 (es_read_cstring): Renamed to ...
1121 (stream_read_cstring): ... this; changed callers.
1122 (es_write_string): Renamed to ...
1123 (stream_write_string): ... this; changed callers.
1124 (es_write_cstring): Renamed to ...
1125 (stream_write_cstring): ... this; changed callers.
1126 (es_read_mpi): Renamed to ...
1127 (stream_read_mpi): ... this; changed callers.
1128 (es_write_mpi): Renamed to ...
1129 (stream_write_mpi): ... this; changed callers.
1130 (es_copy): Renamed to ...
1131 (stream_copy): ... this; changed callers.
1132 (es_read_file): Renamed to ...
1133 (file_to_buffer): ... this; changed callers.
1134 (ssh_identity_register): Removed variable description_length;
1135 changed code to use asprintf for description.
1136 (stream_write_uint32): Do not filter out the last byte of shift
1138 (uint32_construct): New macro ...
1139 (stream_read_uint32): ... use it; removed unnecessary cast.
1141 2005-02-03 Werner Koch <wk@g10code.com>
1143 * agent.h (agent_exit): Add JNLIB_GCC_A_NR to indicate that this
1144 function won't return.
1146 * gpg-agent.c (check_for_running_agent): Initialize pid to a
1147 default value if not needed.
1149 * command-ssh.c: Removed stdint.h. s/byte_t/unsigned char/,
1150 s/uint32/u32/ becuase that is what we have always used in GnuPG.
1151 (ssh_request_specs): Moved to top of file.
1152 (ssh_key_types): Ditto.
1153 (make_cstring): Ditto.
1154 (data_sign): Don't use a variable for the passphrase prompt, make
1156 (ssh_request_process):
1159 * findkey.c (modify_description): Renamed arguments for clarity,
1160 polished documentation. Make comment a C-string. Fixed case of
1161 DESCRIPTION being just "%".
1162 (agent_key_from_file): Make sure comment string to a C-string.
1164 * gpg-agent.c (create_socket_name): Cleanup the implemntation, use
1165 DIMof, agent_exit, removed superflous args and return the
1166 allocated string as value. Documented. Changed callers.
1167 (create_server_socket): Cleanups similar to above. Changed callers.
1168 (cleanup_do): Renamed to ..
1169 (remove_socket): .. this. Changed caller.
1170 (handle_connections): The signals are to be handled in the select
1171 and not in the accept. Test all FDs after returning from a
1172 select. Remove the event tests from the accept calls. The select
1173 already assured that the accept won't block.
1175 2005-01-29 Moritz Schulte <moritz@g10code.com>
1177 * command-ssh.c (ssh_handler_request_identities)
1178 (ssh_handler_sign_request, ssh_handler_add_identity)
1179 (ssh_handler_remove_identity, ssh_handler_remove_all_identities)
1180 (ssh_handler_lock, ssh_handler_unlock): Changed to return an error
1181 code instead of a boolean.
1182 (ssh_request_process): Changed to return a boolean instead of an
1183 error; adjust caller.
1184 (ssh_request_handle_t): Adjusted type.
1185 (ssh_request_spec): New member: identifier.
1186 (REQUEST_SPEC_DEFINE): New macro; use it for initialization of
1188 (ssh_request_process): In debugging mode, log identifier of
1190 (start_command_handler_ssh): Moved most of the stream handling
1192 (ssh_request_process): ... here.
1194 2005-01-28 Moritz Schulte <moritz@g10code.com>
1196 * command-ssh.c (ssh_handler_add_identity): Pass ctrl to
1197 ssh_identity_register().
1198 (ssh_identity_register): New argument: ctrl; pass ctrl to
1200 (get_passphrase): Pass ctrl instead of NULL to agent_askpin().
1201 (start_command_handler_ssh): Use agent_init_default_ctrl();
1202 deallocate structure members, which might be dynamically
1204 (lifetime_default): Removed variable.
1205 (ssh_handler_add_identity): Fix ttl handling; renamed variable
1207 (ssh_identity_register): Fix key grip handling.
1209 2005-01-26 Moritz Schulte <moritz@g10code.com>
1211 * command-ssh.c (ssh_handler_sign_request): Confirm to agent
1212 protocol in case of failure.
1214 * command-ssh.c: New file.
1216 * Makefile.am (gpg_agent_SOURCES): New source file: command-ssh.c.
1218 * findkey.c (modify_description): New function.
1219 (agent_key_from_file): Support comment field in key s-expressions.
1221 * gpg-agent.c (enum cmd_and_opt_values): New item: oSSHSupport.
1222 (opts) New entry for oSSHSupport.
1223 New variable: socket_name_ssh.
1224 (cleanup_do): New function based on cleanup().
1225 (cleanup): Use cleanup_do() for socket_name and socket_name_ssh.
1226 (main): New switch case for oSSHSupport.
1227 (main): Move socket name creation code to ...
1228 (create_socket_name): ... this new function.
1229 (main): Use create_socket_name() for creating socket names for
1230 socket_name and for socket_name_ssh in case ssh support is
1232 Move socket creation code to ...
1233 (create_server_socket): ... this new function.
1234 (main): Use create_server_socket() for creating sockets.
1235 In case standard_socket is set, do not only store a socket name in
1236 socket_name, but also in socket_name_ssh.
1237 Generate additional environment info strings for ssh support.
1238 Pass additional ssh socket argument to handle_connections.
1239 (start_connection_thread_ssh): New function.
1240 (handle_connections): Use select to multiplex between gpg-agent
1241 and ssh-agent protocol.
1243 * agent.h (struct opt): New member: ssh_support.
1244 (start_command_handler_ssh): Add prototype.
1246 2005-01-04 Werner Koch <wk@g10code.com>
1248 * trustlist.c (agent_marktrusted): Use "Cancel" for the first
1249 confirmation and made the strings translatable.
1251 * cache.c (agent_put_cache): Fix the test for using the default
1254 2004-12-21 Werner Koch <wk@g10code.com>
1256 * preset-passphrase.c (preset_passphrase): Handle --passphrase.
1258 * Makefile.am (gpg_preset_passphrase_LDADD): Reorder libs so that
1259 pwquery may use stuff from jnlib. Conditionally add -lwsock2
1260 (gpg_protect_tool_LDADD): Ditto.
1262 * preset-passphrase.c (main): Use default_homedir().
1263 (main) [W32]: Initialize sockets.
1265 2004-12-21 Marcus Brinkmann <marcus@g10code.de>
1267 * Makefile.am (libexec_PROGRAMS): Add gpg-preset-passphrase.
1268 (gpg_preset_passphrase_SOURCES, gpg_preset_passphrase_LDADD): New
1270 * agent.h (opt): New member allow_cache_passphrase.
1271 * cache.c (housekeeping): Check if R->ttl is not negative.
1272 (agent_put_cache): Allow ttl to be negative.
1273 * command.c (parse_hexstring): Allow something to follow the
1275 (cmd_cache_passphrase): New function.
1276 (register_commands): Add it.
1277 * gpg-agent.c: Handle --allow-preset-passphrase.
1278 * preset-passphrase.c: New file.
1280 2004-12-21 Werner Koch <wk@g10code.com>
1282 * gpg-agent.c (main): Use default_homedir().
1283 * protect-tool.c (main): Ditto.
1285 2004-12-20 Werner Koch <wk@g10code.com>
1287 * gpg-agent.c (main) [W32]: Now that Mutexes work we can remove
1288 the pth_init kludge.
1289 (main): Add new options --[no-]use-standard-socket.
1290 (check_for_running_agent): Check whether it is running on the
1293 * call-scd.c (init_membuf, put_membuf, get_membuf): Removed. We
1294 now use the identical implementation from ../common/membuf.c.
1296 * pksign.c (agent_pksign): Changed arg OUTFP to OUTBUF and use
1297 membuf functions to return the value.
1298 * pkdecrypt.c (agent_pkdecrypt): Ditto.
1299 * genkey.c (agent_genkey): Ditto.
1300 * command.c (cmd_pksign, cmd_pkdecrypt, cmd_genkey): Replaced
1301 assuan_get_data_fp() by a the membuf scheme.
1302 (clear_outbuf, write_and_clear_outbuf): New.
1304 2004-12-19 Werner Koch <wk@g10code.com>
1306 * query.c (initialize_module_query): New.
1307 * call-scd.c (initialize_module_call_scd): New.
1308 * gpg-agent.c (main): Call them.
1310 2004-12-18 Werner Koch <wk@g10code.com>
1312 * gpg-agent.c (main): Remove special Pth initialize.
1314 * agent.h (map_assuan_err): Define in terms of
1315 map_assuan_err_with_source.
1317 2004-12-17 Moritz Schulte <moritz@g10code.com>
1319 * query.c: Undo change from 2004-12-05.
1321 2004-12-15 Werner Koch <wk@g10code.com>
1323 * gpg-agent.c [W32]: Various hacks to make it work.
1325 * findkey.c (agent_write_private_key) [W32]: Adjust open call.
1327 * call-scd.c (start_scd) [W32]: Don't check whether the daemon
1328 didn't died. To hard to do under Windows.
1329 (start_scd) [W32]: Disable sending of the event signal option.
1331 * protect-tool.c (read_file, export_p12_file) [W32]: Use setmode
1332 to get stdout and stin into binary mode.
1334 2004-12-05 Moritz Schulte <moritz@g10code.com>
1336 * query.c (start_pinentry): Allow CTRL be NULL.
1338 2004-10-22 Werner Koch <wk@g10code.com>
1340 * gpg-agent.c (parse_rereadable_options): Return "not handled"
1341 when the log file has not beend hadled. This is will let the main
1342 option processing continue. Fixed a bug introduced on 2004-09-4
1343 resulting in logging to stderr until a HUP has been given.
1344 (main): Don't close the listen FD.
1346 2004-09-30 Werner Koch <wk@g10code.com>
1348 * Makefile.am: Adjusted from gettext 1.14.
1350 2004-09-29 Werner Koch <wk@g10code.com>
1352 * minip12.c (parse_bag_encrypted_data): Print error if a bad
1353 passphrase has been given.
1355 2004-09-28 Werner Koch <wk@g10code.com>
1357 * protect.c (agent_unprotect): Fixed wiping of CLEARTEXT. Thanks
1358 to Moritz for pointing this out.
1360 2004-09-25 Moritz Schulte <moritz@g10code.com>
1362 * agent.h: Declare: agent_pksign_do.
1363 (struct server_control_s): New member: raw_value.
1365 * pksign.c (do_encode_md): New argument: raw_value; support
1366 generation of raw (non-pkcs1) data objects; adjust callers.
1367 (agent_pksign_do): New function, based on code ripped
1368 out from agent_pksign.
1369 (agent_pksign): Use agent_pksign_do.
1371 * command.c (start_command_handler): Set ctrl.digest.raw_value.
1373 2004-09-09 Werner Koch <wk@g10code.de>
1375 * gpg-agent.c (check_for_running_agent): New.
1376 (main): The default action is now to check for an already running
1378 (parse_rereadable_options): Set logfile only on reread.
1379 (main): Do not print the "is development version" note.
1381 2004-08-20 Werner Koch <wk@g10code.de>
1383 * gpg-agent.c: New option --max-cache-ttl. Suggested by Alexander
1385 * cache.c (housekeeping): Use it here instead of the hardwired
1388 * query.c (start_pinentry): Use a timeout for the pinentry lock.
1390 2004-08-18 Werner Koch <wk@g10code.de>
1392 * protect-tool.c (get_passphrase): Make sure that the default
1393 prompts passed to gpg-agent are utf-8 encoded. Add new prompt values.
1394 (import_p12_file, import_p12_file, export_p12_file): Changed calls
1395 to get_passphrase so that better prompts are displayed.
1396 (get_new_passphrase): New.
1398 2004-07-22 Werner Koch <wk@g10code.de>
1400 * trustlist.c (read_list): Allow colons in the fingerprint.
1401 (headerblurb): Rephrased.
1403 * gpg-agent.c (handle_connections): Increase the stack size ot 256k.
1405 2004-06-20 Moritz Schulte <moritz@g10code.com>
1407 * gpg-agent.c: Include <sys/stat.h> (build fix for BSD).
1409 2004-05-11 Werner Koch <wk@gnupg.org>
1411 * gpg-agent.c (handle_signal): Reload the trustlist on SIGHUP.
1412 (start_connection_thread): Hack to simulate a ticker.
1413 * trustlist.c (agent_trustlist_housekeeping)
1414 (agent_reload_trustlist): New. Protected all global functions
1415 here with a simple counter which is sufficient for Pth.
1417 2004-05-03 Werner Koch <wk@gnupg.org>
1419 * gpg-agent.c: Remove help texts for options lile --lc-ctype.
1420 (main): New option --allow-mark-trusted.
1421 * trustlist.c (agent_marktrusted): Use it here.
1423 2004-04-30 Werner Koch <wk@gnupg.org>
1425 * protect-tool.c: New option --enable-status-msg.
1426 (store_private_key): Print status messages for imported keys.
1427 (read_and_unprotect): Ditto for bad passphrase.
1429 * gpg-agent.c (parse_rereadable_options): New arg REREAD. Allow
1431 (current_logfile): New.
1433 2004-04-26 Werner Koch <wk@gnupg.org>
1435 * call-scd.c (start_scd): Do not register an event signal if we
1436 are running as a pipe server.
1438 2004-04-21 Werner Koch <wk@gnupg.org>
1440 * call-scd.c (start_scd): Send event-signal option. Always check
1441 that the scdaemon is still running.
1443 * gpg-agent.c (handle_signal): Do not use SIGUSR{1,2} anymore for
1444 changing the verbosity.
1446 2004-04-16 Werner Koch <wk@gnupg.org>
1448 * gpg-agent.c (main): Tell the logging code that we are running
1451 2004-04-06 Werner Koch <wk@gnupg.org>
1453 * gpg-agent.c (main): Use new libgcrypt thread library register
1456 2004-03-23 Marcus Brinkmann <marcus@g10code.de>
1458 * gpg-agent.c (main): For now, always print the default config
1459 file name for --gpgconf-list.
1461 2004-03-17 Werner Koch <wk@gnupg.org>
1463 * gpg-agent.c (main) <gpgconf>: Fixed default value quoting.
1465 2004-03-16 Werner Koch <wk@gnupg.org>
1467 * gpg-agent.c (parse_rereadable_options): Use the new
1468 DEFAULT_CACHE_TTL macro.
1469 (main): Updated --gpgconf-list output.
1471 2004-02-21 Werner Koch <wk@gnupg.org>
1473 * command.c (cmd_passwd): Take acount of a key description.
1475 * genkey.c (reenter_compare_cb): Do not set the error text.
1476 (agent_protect_and_store, agent_genkey): Force a re-enter after a
1477 non-matching passphrase.
1478 * query.c (agent_askpin): Add new arg INITIAL_ERRTEXT; changed
1481 2004-02-19 Werner Koch <wk@gnupg.org>
1483 * protect-tool.c: New options --have-cert and --prompt.
1484 (export_p12_file): Read a certificate from STDIN and pass it to
1485 p12_build. Detect a keygrip and construct the filename in that
1486 case. Unprotcet a key if needed. Print error messages for key
1487 formats we can't handle.
1488 (release_passphrase): New.
1489 (get_passphrase): New arg PROMPTNO. Return the allocated
1490 string. Changed all callers.
1492 * minip12.c: Revamped the build part.
1493 (p12_build): New args CERT and CERTLEN.
1495 2004-02-18 Werner Koch <wk@gnupg.org>
1497 * protect-tool.c (main): Setup the used character set.
1498 * gpg-agent.c (main): Ditto.
1500 * gpg-agent.c (set_debug): New. New option --debug-level.
1501 (main): New option --gpgconf-list.
1503 2004-02-17 Werner Koch <wk@gnupg.org>
1505 * pksign.c (do_encode_md): Cleaned up by using gcry_sexp_build.
1507 * Makefile.am (gpg_protect_tool_SOURCES): Removed
1508 simple-pwquery.[ch], as we once moved it to ../common.
1510 2004-02-13 Werner Koch <wk@gnupg.org>
1512 * command.c (cmd_setkeydesc): New.
1513 (register_commands): Add command SETKEYDESC.
1514 (cmd_pksign, cmd_pkdecrypt): Use the key description.
1515 (reset_notify): Reset the description.
1516 * findkey.c (unprotect): Add arg DESC_TEXT.
1517 (agent_key_from_file): Ditto.
1518 * pksign.c (agent_pksign): Ditto.
1519 * pkdecrypt.c (agent_pkdecrypt): Ditto. Made CIPHERTEXT an
1522 * protect-tool.c (main): New options --no-fail-on-exist, --homedir.
1523 (store_private_key): Use them here.
1525 2004-02-12 Werner Koch <wk@gnupg.org>
1527 * protect-tool.c (read_file, main): Allow reading from stdin.
1529 * Makefile.am: Include cmacros.am for common flags.
1530 (libexec_PROGRAMS): Put gpg-protect-tool there.
1532 2004-02-10 Werner Koch <wk@gnupg.org>
1534 * minip12.c (parse_bag_encrypted_data): Finished implementation.
1535 (p12_parse): Add callback args.
1536 * protect-tool.c (import_p12_cert_cb): New.
1537 (import_p12_file): Use it.
1539 2004-02-06 Werner Koch <wk@gnupg.org>
1541 * minip12.c (crypt_block): Add arg CIPHER_ALGO; changed all callers.
1542 (set_key_iv): Add arg KEYBYTES; changed caller.
1544 2004-02-03 Werner Koch <wk@gnupg.org>
1546 * findkey.c (agent_key_from_file): Extra paranoid wipe.
1547 * protect.c (agent_unprotect): Ditto.
1548 (merge_lists): Ditto. Add arg RESULTLEN.
1549 * pkdecrypt.c (agent_pkdecrypt): Don't show the secret key even in
1552 * protect.c: Add DSA and Elgamal description.
1554 2004-01-29 Werner Koch <wk@gnupg.org>
1556 * agent.h (server_control_s): Add connection_fd field.
1557 * command.c (start_command_handler): Init it here.
1558 * gpg-agent.c (agent_init_default_ctrl): and here.
1559 * call-scd.c: Add the CTRL arg to all functions calling start_scd
1560 and pass it to start_scd. Changed all callers
1561 (start_scd): Keep track of the current active connection.
1562 (agent_reset_scd): New.
1563 * command.c (start_command_handler): Call it here.
1564 * learncard.c (agent_handle_learn): Add arg CTRL; changed caller.
1565 (send_cert_back): Ditto.
1567 2004-01-28 Werner Koch <wk@gnupg.org>
1569 * trustlist.c (agent_marktrusted): Check whether the trustlist is
1572 2004-01-27 Werner Koch <wk@gnupg.org>
1574 * sexp-parse.h: Moved to ../common.
1576 2004-01-24 Werner Koch <wk@gnupg.org>
1578 * call-scd.c (atfork_cb): New.
1579 (start_scd): Make sure secmem gets cleared.
1580 * query.c (atfork_cb): New.
1581 (start_pinentry): Make sure secmem gets cleared.
1583 2004-01-16 Werner Koch <wk@gnupg.org>
1585 * findkey.c (agent_key_from_file): Now return an error code so
1586 that we have more detailed error messages in the upper layers.
1587 This fixes the handling of pinentry's cancel button.
1588 * pksign.c (agent_pksign): Changed accordingly.
1589 * pkdecrypt.c (agent_pkdecrypt): Ditto.
1590 * command.c (cmd_passwd): Ditto.
1592 2003-12-16 Werner Koch <wk@gnupg.org>
1594 * gpg-agent.c (main): Set the prefixes for assuan logging.
1596 2003-12-15 Werner Koch <wk@gnupg.org>
1598 * protect.c (do_encryption): Use gcry_create_nonce instad of the
1599 obsolete WEAK_RANDOM.
1601 2003-11-20 Werner Koch <wk@gnupg.org>
1603 * sexp-parse.h (snext): Don't use atoi_1 and digitp macros, so
1604 that this file is useful by other applications too.
1606 2003-10-27 Werner Koch <wk@gnupg.org>
1608 * command.c (cmd_get_confirmation): New command.
1610 2003-08-20 Timo Schulz <twoaday@freakmail.de>
1612 * pksign.c (do_encode_md): Allocate enough space. Cast md
1613 byte to unsigned char to prevent sign extension.
1615 2003-08-14 Timo Schulz <twoaday@freakmail.de>
1617 * pksign.c (do_encode_md): Due to the fact pkcs#1 padding
1618 is now in Libgcrypt, use the new interface.
1620 2003-07-31 Werner Koch <wk@gnupg.org>
1622 * Makefile.am (gpg_agent_LDADD): Added INTLLIBS.
1623 (gpg_protect_tool_SOURCES): Added simple-pwquery.[ch]
1625 2003-07-27 Werner Koch <wk@gnupg.org>
1627 Adjusted for gcry_mpi_print and gcry_mpi_scan API change.
1629 2003-07-15 Werner Koch <wk@gnupg.org>
1631 * simple-pwquery.c, simple-pwquery.h: Moved to ../common.
1632 * Makefile.am (gpg_protect_tool_LDADD): Add simple-pwquery.o.
1633 Removed it from xx_SOURCES.
1635 2003-07-04 Werner Koch <wk@gnupg.org>
1637 * gpg-agent.c (handle_connections): Kludge to allow use of Pth 1
1640 2003-06-30 Werner Koch <wk@gnupg.org>
1642 * call-scd.c (learn_status_cb): Store the serialno in PARM.
1644 2003-06-26 Werner Koch <wk@gnupg.org>
1646 * call-scd.c (agent_card_serialno): Don't do a RESET anymore.
1648 2003-06-25 Werner Koch <wk@gnupg.org>
1650 * command.c (cmd_scd): New.
1651 * call-scd.c (agent_card_scd): New.
1652 * divert-scd.c (divert_generic_cmd): New
1654 * call-scd.c (agent_card_learn): New callback args SINFO.
1655 (learn_status_cb): Pass all other status lines to the sinfo
1657 * learncard.c (release_sinfo, sinfo_cb): New.
1658 (agent_handle_learn): Pass the new cb to the learn function and
1659 pass the collected information back to the client's assuan
1662 * gpg-agent.c (main): Moved pth_init before gcry_check_version.
1664 2003-06-24 Werner Koch <wk@gnupg.org>
1666 * gpg-agent.c (handle_connections): Adjusted for Pth 2.0
1668 Adjusted for changes in the libgcrypt API. Some more fixes for the
1671 2003-06-04 Werner Koch <wk@gnupg.org>
1673 Renamed error codes from INVALID to INV and removed _ERROR suffixes.
1675 2003-06-03 Werner Koch <wk@gnupg.org>
1677 Changed all error codes in all files to the new libgpg-error scheme.
1679 * agent.h: Include gpg-error.h and errno.h
1680 * Makefile.am: Link with libgpg-error
1682 * query.c: assuan.h is now a system header.
1683 * genkey.c (agent_genkey): Fixed silly use of xmalloc by
1686 2003-04-29 Werner Koch <wk@gnupg.org>
1688 * command.c (register_commands): Adjusted for new Assuan semantics.
1690 * Makefile.am: Don't override LDFLAGS.
1692 2002-12-04 Werner Koch <wk@gnupg.org>
1694 * gpg-agent.c: New variable config_filename.
1695 (parse_rereadable_options): New.
1696 (main): Use it here. Add setting of default values, set
1698 (reread_configuration): Filled with actual code.
1700 2002-12-03 Werner Koch <wk@gnupg.org>
1702 * protect-tool.c (read_key): Don't run make_canonical on a NULL
1705 * command.c (parse_hexstring): New.
1706 (cmd_sethash): Use it.
1707 (parse_keygrip): New.
1708 (cmd_havekey, cmd_sigkey): Use it.
1710 * genkey.c (agent_protect_and_store): New.
1711 (store_key): Add arg FORCE.
1712 (agent_genkey): Pass false to this force of store_key.
1714 2002-11-13 Werner Koch <wk@gnupg.org>
1716 * gpg-agent.c (main): Switch all messages to utf-8.
1718 * simple-pwquery.c (agent_send_all_options): Use $GPG_TTY and
1721 * cache.c (new_data): Uiih - /sizeof d/sizeof *d/.
1723 2002-11-10 Werner Koch <wk@gnupg.org>
1725 * command.c (option_handler): Fix keep_tty check.
1727 2002-11-06 Werner Koch <wk@gnupg.org>
1729 * gpg-agent.c (main): Make sure we have a default ttyname.
1730 * command.c (option_handler): Check opt.keep_tty here
1731 * query.c (start_pinentry): but not anymore here.
1733 2002-11-05 Werner Koch <wk@gnupg.org>
1735 * agent.h (opt,server_control_s): Move display and lc_ variables
1736 to the control struct so that they are per connection.
1737 * gpg-agent.c (agent_init_default_ctrl): New.
1738 (main): Assign those command line options to new default_* variables.
1739 Reset DISPLAY in server mode so that tehre is no implicit default.
1740 * command.c (start_command_handler): Initialize and deinitialize
1742 (option_handler): Work on the ctrl values and not on the opt.
1743 * query.c (start_pinentry): New argument CTRL to set the display
1744 connection specific. Changed all callers to pass this value.
1745 (agent_askpin,agent_get_passphrase,agent_get_confirmation): Add
1746 CTRL arg and pass it ot start_pinentry.
1747 * command.c (cmd_get_passphrase): Pass CTRL argument.
1748 * trustlist.c (agent_marktrusted): Add CTRL argument
1749 * command.c (cmd_marktrusted): Pass CTRL argument
1750 * divert-scd.c (ask_for_card): Add CTRL arg.
1751 (divert_pksign,divert_pkdecrypt): Ditto. Changed caller.
1752 (getpin_cb): Use OPAQUE to pass the CTRL variable. Changed both
1754 * findkey.c (unprotect): Add CTRL arg.
1755 (agent_key_from_file): Ditto.
1757 * query.c (unlock_pinentry): Disconnect the pinentry so that we
1758 start a new one for each request. This is required to support
1759 clients with different environments (e.g. X magic cookies).
1761 2002-09-05 Neal H. Walfield <neal@cs.uml.edu>
1763 * gpg-agent.c (main) [USE_GNU_PTH]: No need to call
1764 assuan_set_io_func as assuan is smart.
1766 2002-09-25 Werner Koch <wk@gnupg.org>
1768 * gpg-agent.c (handle_signal): Flush cache on SIGHUP.
1769 * cache.c (agent_flush_cache): New.
1771 * gpg-agent.c, agent.h: Add --keep-display and --keep-tty.
1772 * query.c (start_pinentry): Implement them. The option passing
1773 needs more thoughts.
1775 2002-09-09 Werner Koch <wk@gnupg.org>
1777 * gpg-agent.c (create_private_keys_directory)
1778 (create_directories): New.
1779 (main): Try to create a home directory.
1781 2002-09-04 Neal H. Walfield <neal@g10code.de>
1783 * gpg-agent.c (main): Use sigaction, not signal.
1785 2002-09-03 Neal H. Walfield <neal@g10code.de>
1787 * findkey.c: Include <fcntl.h>.
1788 (agent_write_private_key): Prefer POSIX compatibity, open and
1789 fdopen, over the simplicity of GNU extensions, fopen(file, "x").
1791 2002-08-22 Werner Koch <wk@gnupg.org>
1793 * query.c (agent_askpin): Provide the default desc text depending
1794 on the pininfo. Do the basic PIN verification only when
1797 2002-08-21 Werner Koch <wk@gnupg.org>
1799 * query.c (agent_askpin): Hack to show the right default prompt.
1800 (agent_get_passphrase): Ditto.
1802 * trans.c: Removed and replaced all usages with standard _()
1804 * divert-scd.c (getpin_cb): Pass a more descritive text to the
1807 * Makefile.am: Renamed the binary protect-tool to gpg-protect-tool.
1808 * protect-tool.c: Removed the note about internal use only.
1810 * gpg-agent.c (main): New option --daemon so that the program is
1811 not accidently started in the background.
1813 2002-08-16 Werner Koch <wk@gnupg.org>
1815 * call-scd.c (learn_status_cb): Handle CERTINFO status.
1816 (agent_card_learn): Add args for certinfo cb.
1817 * learncard.c (release_certinfo,certinfo_cb): New.
1818 (send_cert_back): New. With factored out code from ..
1819 (agent_handle_learn): here. Return certinfo stuff.
1821 2002-07-26 Werner Koch <wk@gnupg.org>
1823 * gpg-agent.c (main): New option --ignore-cache-for-signing.
1824 * command.c (option_handler): New server option
1825 use-cache-for-signing defaulting to true.
1826 (cmd_pksign): handle global and per session option.
1827 * findkey.c (agent_key_from_file, unprotect): New arg
1828 ignore_cache. Changed all callers.
1829 * pksign.c (agent_pksign): Likewise.
1831 2002-06-29 Werner Koch <wk@gnupg.org>
1833 * query.c (start_pinentry): Use GNUPG_DERAULT_PINENTRY.
1834 * call-scd.c (start_scd): Use GNUPG_DEFAULT_SCDAEMON.
1836 2002-06-28 Werner Koch <wk@gnupg.org>
1838 * protect-tool.c (export_p12_file): New.
1839 (main): New command --p12-export.
1840 * minip12.c (create_final,p12_build,compute_tag_length): New.
1841 (store_tag_length): New.
1843 2002-06-27 Werner Koch <wk@gnupg.org>
1845 * minip12.c (crypt_block): Renamed from decrypt_block, add arg to
1848 * Makefile.am (pkglib_PROGRAMS): Put protect-tool there.
1850 * findkey.c (agent_write_private_key,agent_key_from_file)
1851 (agent_key_available): Use GNUPG_PRIVATE_KEYS_DIR constant.
1852 * gpg-agent.c (main): Use GNUPG_DEFAULT_HOMEDIR constant.
1854 * protect-tool.c (store_private_key): New.
1855 (import_p12_file): Store the new file if requested.
1856 (main): New options --force and --store.
1858 * gpg-agent.c (main): Set a global flag when running detached.
1859 * query.c (start_pinentry): Pass the list of FD to keep in the
1860 child when not running detached.
1861 * call-scd.c (start_scd): Ditto.
1863 2002-06-26 Werner Koch <wk@gnupg.org>
1865 * command.c (cmd_istrusted, cmd_listtrusted, cmd_marktrusted)
1866 (cmd_pksign, cmd_pkdecrypt, cmd_genkey, cmd_get_passphrase)
1867 (cmd_learn): Print an error message for a failed operation.
1869 * simple-pwquery.c, simple-pwquery.h: New.
1870 * protect-tool. (get_passphrase): New, used to get a passphrase
1871 from the agent if none was given on the command line.
1873 2002-06-25 Werner Koch <wk@gnupg.org>
1875 * protect-tool.c (rsa_key_check): New.
1876 (import_p12_file): New.
1877 (main): New command --p12-import.
1878 * minip12.c, minip12.h: New.
1880 2002-06-24 Werner Koch <wk@gnupg.org>
1882 * protect-tool.c (read_file): New.
1883 (read_key): Factored most code out to read_file.
1885 2002-06-17 Werner Koch <wk@gnupg.org>
1887 * agent.h: Add a callback function to the pin_entry_info structure.
1888 * query.c (agent_askpin): Use the callback to check for a correct
1889 PIN. Removed the start_err_text argument because it is not
1890 anymore needed; changed callers.
1891 * findkey.c (unprotect): Replace our own check loop by a callback.
1892 (try_unprotect_cb): New.
1893 * genkey.c (reenter_compare_cb): New.
1894 (agent_genkey): Use this callback here. Fixed setting of the pi2
1895 variable and a segv in case of an empty PIN.
1897 * divert-scd.c (getpin_cb): Removed some unused stuff and
1898 explained what we still have to change.
1900 2002-06-12 Werner Koch <wk@gnupg.org>
1902 * gpg-agent.c (main): New option --disable-pth.
1904 2002-06-11 Werner Koch <wk@gnupg.org>
1906 * protect-tool.c: Add command --show-keygrip
1907 (show_keygrip): New.
1909 2002-05-23 Werner Koch <wk@gnupg.org>
1911 * call-scd.c: Seirialized all scdaeom access when using Pth.
1913 * cache.c: Made the cache Pth-thread-safe.
1914 (agent_unlock_cache_entry): New.
1915 * findkey.c (unprotect): Unlock the returned cache value.
1916 * command.c (cmd_get_passphrase): Ditto.
1918 * gpg-agent.c (main): Register pth_read/write with Assuan.
1920 2002-05-22 Werner Koch <wk@gnupg.org>
1922 * query.c: Serialized all pinentry access when using Pth.
1924 * gpg-agent.c (handle_signal,start_connection_thread)
1925 (handle_connections): New
1926 (main): Use the new Pth stuff to allow concurrent connections.
1927 * command.c (start_command_handler): Add new arg FD so that the
1928 fucntion can also be used for an already connected socket.
1929 * Makefile.am: Link with Pth.
1931 2002-05-14 Werner Koch <wk@gnupg.org>
1933 * cache.c (housekeeping, agent_put_cache): Use our time() wrapper.
1935 2002-04-26 Werner Koch <wk@gnupg.org>
1937 * cache.c (agent_put_cache): Reinitialize the creation time and
1938 the ttl when reusing a slot.
1940 * call-scd.c (start_scd): Print debug messages only with debug
1942 * query.c (start_pinentry): Ditto.
1944 2002-04-25 Marcus Brinkmann <marcus@g10code.de>
1946 * agent.h (agent_get_confirmation): Replace paramter prompt with
1947 two parameters ok and cancel.
1948 * query.c (agent_get_confirmation): Likewise. Implement this.
1949 * trustlist.c (agent_marktrusted): Fix invocation of
1950 agent_get_confirmation.
1951 * divert-scd.c (ask_for_card): Likewise.
1953 2002-04-24 Marcus Brinkmann <marcus@g10code.de>
1955 * agent.h (struct opt): Add members display, ttyname, ttytype,
1956 lc_ctype, and lc_messages.
1957 * gpg-agent.c (enum cmd_and_opt_values): Add oDisplay, oTTYname,
1958 oTTYtype, oLCctype, and LCmessages.
1959 (main): Handle these options.
1960 * command.c (option_handler): New function.
1961 (register_commands): Register option handler.
1962 * query.c (start_pinentry): Pass the various display and tty
1963 options to the pinentry.
1965 2002-04-05 Werner Koch <wk@gnupg.org>
1967 * protect-tool.c (show_file): New. Used as default action.
1969 2002-03-28 Werner Koch <wk@gnupg.org>
1971 * divert-scd.c (encode_md_for_card): Don't do the pkcs-1 padding,
1972 the scdaemon should take care of it.
1973 (ask_for_card): Hack to not display the trailing zero.
1975 2002-03-11 Werner Koch <wk@gnupg.org>
1977 * learncard.c (kpinfo_cb): Remove the content restrictions from
1980 2002-03-06 Werner Koch <wk@gnupg.org>
1983 * divert-scd.c (ask_for_card): The serial number is binary so
1984 convert it to hex here.
1985 * findkey.c (agent_write_private_key): New.
1986 * genkey.c (store_key): And use it here.
1988 * pkdecrypt.c (agent_pkdecrypt): Changed the way the diversion is done.
1989 * divert-scd.c (divert_pkdecrypt): Changed interface and
1992 2002-03-05 Werner Koch <wk@gnupg.org>
1994 * call-scd.c (inq_needpin): New.
1995 (agent_card_pksign): Add getpin_cb args.
1996 (agent_card_pkdecrypt): New.
1998 2002-03-04 Werner Koch <wk@gnupg.org>
2000 * pksign.c (agent_pksign): Changed how the diversion is done.
2001 * divert-scd.c (divert_pksign): Changed interface and implemented it.
2002 (encode_md_for_card): New.
2003 * call-scd.c (agent_card_pksign): New.
2005 2002-02-28 Werner Koch <wk@gnupg.org>
2007 * pksign.c (agent_pksign): Detect whether a Smartcard is to be
2008 used and divert the operation in this case.
2009 * pkdecrypt.c (agent_pkdecrypt): Likewise
2010 * findkey.c (agent_key_from_file): Add optional arg shadow_info
2011 and have it return information about a shadowed key.
2012 * protect.c (agent_get_shadow_info): New.
2014 * protect.c (snext,sskip,smatch): Moved to
2015 * sexp-parse.h: New file.
2016 * divert-scd.c: New.
2018 2002-02-27 Werner Koch <wk@gnupg.org>
2020 * protect.c (agent_shadow_key): New.
2022 * command.c (cmd_learn): New command LEARN.
2023 * gpg-agent.c: New option --scdaemon-program.
2024 * call-scd.c (start_scd): New. Based on query.c
2025 * query.c: Add 2 more arguments to all uses of assuan_transact.
2027 2002-02-18 Werner Koch <wk@gnupg.org>
2029 * findkey.c (unprotect): Show an error message for a bad passphrase.
2031 * command.c (cmd_marktrusted): Implemented.
2032 * trustlist.c (agent_marktrusted): New.
2033 (open_list): Add APPEND arg.
2035 * query.c (agent_get_confirmation): New.
2037 2002-02-06 Werner Koch <wk@gnupg.org>
2039 * cache.c (housekeeping): Fixed linking in the remove case.
2041 2002-02-01 Werner Koch <wk@gnupg.org>
2043 * gpg-agent.c: New option --default-cache-ttl.
2044 * cache.c (agent_put_cache): Use it.
2046 * cache.c: Add a few debug outputs.
2048 * protect.c (agent_private_key_type): New.
2049 * agent.h: Add PRIVATE_KEY_ enums.
2050 * findkey.c (agent_key_from_file): Use it to decide whether we
2051 have to unprotect a key.
2052 (unprotect): Cache the passphrase.
2054 * findkey.c (agent_key_from_file,agent_key_available): The key
2055 files do now require a ".key" suffix to make a script's life
2057 * genkey.c (store_key): Ditto.
2059 2002-01-31 Werner Koch <wk@gnupg.org>
2061 * genkey.c (store_key): Protect the key.
2062 (agent_genkey): Ask for the passphrase.
2063 * findkey.c (unprotect): Actually unprotect the key.
2064 * query.c (agent_askpin): Add an optional start_err_text.
2066 2002-01-30 Werner Koch <wk@gnupg.org>
2069 (hash_passphrase): Based on the GnuPG 1.0.6 version.
2070 * protect-tool.c: New
2072 2002-01-29 Werner Koch <wk@gnupg.org>
2074 * findkey.c (agent_key_available): New.
2075 * command.c (cmd_havekey): New.
2076 (register_commands): And register new command.
2078 2002-01-20 Werner Koch <wk@gnupg.org>
2080 * command.c (cmd_get_passphrase): Remove the plus signs.
2082 * query.c (start_pinentry): Send no-grab option to pinentry
2083 * gpg-agent.c (main): Move variable grab as no_grab to agent.h.
2085 2002-01-19 Werner Koch <wk@gnupg.org>
2087 * gpg-agent.c (main): Disable core dumps.
2090 * command.c (cmd_get_passphrase): Use the cache.
2091 (cmd_clear_passphrase): Ditto.
2093 * gpg-agent.c: Removed unused cruft and implement the socket
2095 (my_strusage): Take bug report address from configure.ac.
2096 * command.c (start_command_handler): Add an argument to start as
2098 (start_command_handler): Enable Assuan logging.
2100 2002-01-15 Werner Koch <wk@gnupg.org>
2103 * command.c (cmd_istrusted, cmd_listtrusted, cmd_marktrusted): New.
2105 2002-01-07 Werner Koch <wk@gnupg.org>
2107 * genkey.c: Store the secret part and return the public part.
2109 2002-01-03 Werner Koch <wk@gnupg.org>
2111 * command.c (cmd_get_passphrase): New.
2112 (cmd_clear_passphrase): New.
2113 * query.c (agent_get_passphrase): New.
2115 2002-01-02 Werner Koch <wk@gnupg.org>
2118 * command.c (cmd_genkey): New.
2120 * command.c (rc_to_assuan_status): Removed and changed all callers
2121 to use map_to_assuan_status.
2123 2001-12-19 Werner Koch <wk@gnupg.org>
2125 * keyformat.txt: New.
2127 2001-12-19 Marcus Brinkmann <marcus@g10code.de>
2129 * query.c (start_pinentry): Add new argument to assuan_pipe_connect.
2131 2001-12-18 Werner Koch <wk@gnupg.org>
2133 * Makefile.am: Use LIBGCRYPT macros
2135 2001-12-14 Werner Koch <wk@gnupg.org>
2137 * gpg-agent.c (main): New option --batch. New option --debug-wait
2138 n, so that it is possible to attach gdb when used in server mode.
2139 * query.c (agent_askpin): Don't ask in batch mode.
2141 * command.c: Removed the conversion macros as they are now in
2144 2001-12-14 Marcus Brinkmann <marcus@g10code.de>
2146 * query.c (LINELENGTH): Removed.
2147 (agent_askpin): Use ASSUAN_LINELENGTH, not LINELENGTH.
2149 2001-11-19 Werner Koch <wk@gnupg.org>
2151 * gpg-agent.c: Removed all GUI code, removed code for old
2152 protocol. New code to use the Assuan protocol as a server and
2153 also to communicate with a new ask-passphrase utility.
2155 2000-11-22 Werner Koch <wk@gnupg.org>
2157 * gpg-agent.c (main): csh support by Dan Winship, new options --sh
2158 and --csh and set default by consulting $SHELL.
2160 Mon Aug 21 17:59:17 CEST 2000 Werner Koch <wk@openit.de>
2162 * gpg-agent.c (passphrase_dialog): Cleanup the window and added the
2163 user supplied text to the window.
2164 (main): Fixed segv in gtk_init when used without a command to start.
2166 * gpg-agent.c: --flush option.
2168 (req_clear_passphrase): Implemented.
2170 Fri Aug 18 14:27:14 CEST 2000 Werner Koch <wk@openit.de>
2176 Copyright 2001, 2002, 2003, 2004, 2005,
2177 2007 Free Software Foundation, Inc.
2179 This file is free software; as a special exception the author gives
2180 unlimited permission to copy and/or distribute it, with or without
2181 modifications, as long as this notice is preserved.
2183 This file is distributed in the hope that it will be useful, but
2184 WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
2185 implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.