1 2006-12-07 David Shaw <dshaw@jabberwocky.com>
3 * Makefile.am: Link to iconv for jnlib dependency.
5 2006-11-20 Werner Koch <wk@g10code.com>
7 * call-pinentry.c (agent_popup_message_stop): Use SIGKILL.
8 * call-scd.c (inq_needpin): Implement POPUPKEYPADPROMPT and
11 2006-11-15 Werner Koch <wk@g10code.com>
13 * protect.c (make_shadow_info): Cast printf arg to unsigned int.
14 * minip12.c (parse_bag_encrypted_data): Ditto.
15 (parse_bag_data, p12_parse): Ditto.
16 * command-ssh.c (ssh_identity_register): Changed buffer_n to
19 * agent.h (struct server_control_s): New field thread_startup.
20 * command.c (start_command_handler): Moved CTRL init code to ..
21 * gpg-agent.c (start_connection_thread): .. here.
22 (agent_deinit_default_ctrl): New.
23 (agent_init_default_ctrl): Made static.
24 (handle_connections): Allocate CTRL and pass it pth_spawn.
25 * command-ssh.c (start_command_handler_ssh): Moved CTRL init code
27 * gpg-agent.c (start_connection_thread_ssh): .. here.
29 2006-11-14 Werner Koch <wk@g10code.com>
31 * command.c (bump_key_eventcounter): New.
32 (bump_card_eventcounter): New.
33 (cmd_geteventcounter): New command.
34 * gpg-agent.c (handle_signal): Call bump_card_eventcounter.
35 * findkey.c (agent_write_private_key): Call bump_key_eventcounter.
36 * trustlist.c (agent_reload_trustlist): Ditto.
38 * command.c (post_cmd_notify, io_monitor): New.
39 (register_commands, start_command_handler): Register them.
41 2006-11-09 Werner Koch <wk@g10code.com>
43 * gpg-agent.c (main): In detached mode connect standard
44 descriptors to /dev/null.
46 * trustlist.c (read_trustfiles): Make sure not to pass a zero size
47 to realloc as the C standards says that this behaves like free.
49 2006-11-06 Werner Koch <wk@g10code.com>
51 * protect-tool.c (my_strusage): Fixed typo.
53 2006-10-23 Werner Koch <wk@g10code.com>
55 * gpg-agent.c (main): New command --gpgconf-test.
57 * minip12.c (parse_bag_encrypted_data, parse_bag_data): Allow for
60 2006-10-20 Werner Koch <wk@g10code.com>
62 * Makefile.am (t_common_ldadd): Use GPG_ERROR_LIBS instead -o just -l
64 2006-10-19 Werner Koch <wk@g10code.com>
66 * findkey.c (unprotect): Use it to avoid unnecessary calls to
68 * call-pinentry.c (pinentry_active_p): New.
70 2006-10-17 Werner Koch <wk@g10code.com>
72 * Makefile.am (gpg_agent_LDADD): Link to libcommonpth.
73 (gpg_agent_CFLAGS): New. This allows to only link this with Pth.
75 2006-10-16 Werner Koch <wk@g10code.com>
77 * call-pinentry.c (agent_get_confirmation): Map Cancel code here too.
78 * trustlist.c (agent_marktrusted): Return Cancel instead of
79 Not_Confirmed for the first question.
81 2006-10-12 Werner Koch <wk@g10code.com>
83 * protect-tool.c (get_passphrase): Fix if !HAVE_LANGINFO_CODESET.
85 2006-10-06 Werner Koch <wk@g10code.com>
87 * Makefile.am (AM_CFLAGS): Use PTH version of libassuan.
88 (gpg_agent_LDADD): Ditto.
90 * divert-scd.c (divert_pksign): Use PKAUTH for the TLS algo.
92 2006-10-05 Werner Koch <wk@g10code.com>
94 * command.c (has_option_name): New.
95 (cmd_sethash): New --hash option.
96 * pksign.c (do_encode_raw_pkcs1): New.
97 (agent_pksign_do): Use it here for the TLS algo.
98 * agent.h (GCRY_MD_USER_TLS_MD5SHA1): New.
99 * divert-scd.c (pksign): Add case for tls-md5sha1.
101 * divert-scd.c (encode_md_for_card): Check that the algo is valid.
103 2006-10-04 Werner Koch <wk@g10code.com>
105 * call-pinentry.c (agent_get_passphrase): Changed to return the
106 unencoded passphrase.
107 (agent_askpin, agent_get_passphrase, agent_get_confirmation): Need
108 to map the cancel error.
109 * command.c (send_back_passphrase): New.
110 (cmd_get_passphrase): Use it here. Also implement --data option.
113 2006-09-26 Werner Koch <wk@g10code.com>
115 * learncard.c (agent_handle_learn): Send back the keypair
118 2006-09-25 Werner Koch <wk@g10code.com>
120 * trustlist.c (read_one_trustfile): Allow extra flags.
121 (struct trustitem_s): Replaced KEYFLAGS by a FLAGS struct.
122 Changed all code to use this.
123 (agent_istrusted): New arg CTRL. Changed all callers. Send back
125 * command.c (agent_write_status): New.
127 2006-09-20 Werner Koch <wk@g10code.com>
129 * Makefile.am: Changes to allow parallel make runs.
131 2006-09-15 Werner Koch <wk@g10code.com>
133 * trustlist.c: Entirely rewritten.
134 (agent_trustlist_housekeeping): Removed and removed all calls.
136 2006-09-14 Werner Koch <wk@g10code.com>
138 Replaced all call gpg_error_from_errno(errno) by
139 gpg_error_from_syserror().
141 * call-pinentry.c (start_pinentry): Replaced pipe_connect2 by
143 * call-scd.c (start_scd): Ditto.
144 * command.c (start_command_handler): Replaced
145 init_connected_socket_server by init_socket_server_ext.
147 2006-09-13 Werner Koch <wk@g10code.com>
149 * preset-passphrase.c (main) [W32]: Check for WSAStartup error.
151 2006-09-08 Werner Koch <wk@g10code.com>
153 * call-scd.c: Add signal.h as we are referencing SIGUSR2.
155 2006-09-06 Marcus Brinkmann <marcus@g10code.de>
157 * Makefile.am (AM_CFLAGS): Add $(GPG_ERR_CFLAGS).
158 (gpg_agent_LDADD): Replace -lgpg-error with $(GPG_ERROR_LIBS).
160 2006-09-06 Werner Koch <wk@g10code.com>
162 * query.c: Renamed to ..
163 * call-pinentry.c: .. this.
165 * agent.h (out_of_core): Removed.
166 (CTRL): Removed and changed everywhere to ctrl_t.
168 Replaced all Assuan error codes by libgpg-error codes. Removed
169 all map_to_assuan_status and map_assuan_err.
171 * gpg-agent.c (main): Call assuan_set_assuan_err_source to have Assuan
172 switch to gpg-error codes.
173 * command.c (set_error): Adjusted.
175 2006-09-04 Werner Koch <wk@g10code.com>
177 * command.c (percent_plus_unescape): New.
178 (cmd_get_val, cmd_putval): New.
180 2006-08-29 Werner Koch <wk@g10code.com>
182 * command-ssh.c (stream_read_mpi): Sanity check for early
183 detecting of too large keys.
184 * gpg-agent.c (my_gcry_outofcore_handler): New.
186 (main): No allocate 32k secure memory (was 16k).
188 2006-07-31 Werner Koch <wk@g10code.com>
190 * preset-passphrase.c (make_hexstring): For consistency use
191 xtrymalloc and changed caller to use xfree. Fixed function
194 2006-07-29 Marcus Brinkmann <marcus@g10code.de>
196 * preset-passphrase.c (preset_passphrase): Do not strip off last
197 character of passphrase.
198 (make_hexstring): New function.
199 * command.c (cmd_preset_passphrase): Use parse_hexstring to syntax
200 check passphrase argument. Truncate passphrase at delimiter.
202 2006-07-24 Werner Koch <wk@g10code.com>
204 * minip12.c (build_key_bag): New args SHA1HASH and
205 KEYIDSTR. Append bag Attributes if these args are given.
206 (build_cert_sequence): ditto.
207 (p12_build): Calculate certificate hash and pass to build
210 2006-07-21 Werner Koch <wk@g10code.com>
212 * minip12.c (oid_pkcs_12_keyBag): New.
213 (parse_bag_encrypted_data): New arg R_RESULT. Support keybags and
214 return the key object.
215 (p12_parse): Take new arg into account. Free RESULT on error.
217 2006-06-26 Werner Koch <wk@g10code.com>
219 * gpg-agent.c (handle_signal): Print info for SIGUSR2 only in
222 2006-06-22 Werner Koch <wk@g10code.com>
224 * command-ssh.c (make_cstring): Use memcpy instead of strncpy.
225 (ssh_receive_mpint_list, sexp_key_extract, data_sign): Use
226 xtrycalloc instead of xtrymalloc followed by memset.
228 2006-06-20 Werner Koch <wk@g10code.com>
230 * minip12.c (create_final): New arg PW. Add code to calculate the
233 2006-06-09 Marcus Brinkmann <marcus@g10code.de>
235 * Makefile.am (gpg_agent_LDADD): Add $(NETLIBS).
236 (gpg_protect_tool_LDADD): Likewise.
237 (gpg_preset_passphrase_LDADD): Likewise.
239 2006-04-09 Moritz Schulte <moritz@g10code.com>
241 * command-ssh.c (ssh_request_process): Removed FIXME mentioning a
244 2006-04-01 Moritz Schulte <moritz@g10code.com>
246 * command-ssh.c (ssh_identity_register): Make KEY_GRIP_RAW be 20
247 instead of 21 bytes long; do not fill KEY_GRIP_RAW[20] with NUL
248 byte - KEY_GRIP_RAW is a raw binary string anyway.
250 2006-02-09 Werner Koch <wk@g10code.com>
252 * call-scd.c (struct scd_local_s): New field next_local.
253 (scd_local_list): New.
254 (start_scd): Put new local into list.
255 (agent_reset_scd): Remove it from the list.
256 (agent_scd_check_aliveness): Here is the actual reason why we need
258 (agent_reset_scd): Send the new command RESTART instead of RESET.
260 2005-12-16 Werner Koch <wk@g10code.com>
262 * minip12.c (cram_octet_string): New
263 (p12_parse): Use it for NDEFed bags.
264 (parse_bag_data): Ditto.
265 (string_to_key, set_key_iv, crypt_block): New arg SALTLEN.
266 (p12_build): Use old value 8 for new arg.
267 (parse_bag_encrypted_data, parse_bag_data): Allow for salts of 8
268 to 16 bytes. Add new arg R_CONSUMED.
270 2005-11-24 Werner Koch <wk@g10code.com>
272 * minip12.c (p12_parse): Fixed for case that the key object comes
273 prior to the certificate.
275 2005-10-19 Werner Koch <wk@g10code.com>
277 * divert-scd.c (getpin_cb): Hack to use it for a keypad message.
279 * call-scd.c (inq_needpin): Reworked to support the new KEYPADINFO.
281 * query.c (start_pinentry): Keep track of the owner.
282 (popup_message_thread, agent_popup_message_start)
283 (agent_popup_message_stop, agent_reset_query): New.
284 * command.c (start_command_handler): Make sure a popup window gets
287 2005-10-08 Marcus Brinkmann <marcus@g10code.de>
289 * Makefile.am (gpg_protect_tool_LDADD): Add ../gl/libgnu.a.
290 (gpg_preset_passphrase_LDADD, t_common_ldadd): Likewise.
291 (gpg_agent_LDADD): Add ../gl/libgnu.a after ../common/libcommon.a.
293 2005-09-16 Werner Koch <wk@g10code.com>
295 * minip12.c (build_key_sequence, build_cert_sequence): Fixed
298 2005-09-15 Moritz Schulte <moritz@g10code.com>
300 * t-protect.c (test_agent_protect): Implemented.
301 (main): Disable use of secure memory.
303 2005-09-09 Werner Koch <wk@g10code.com>
305 * minip12.c (p12_build): Oops, array needs to be larger for the
307 (build_cert_bag): Fixed yesterdays change.
309 * command-ssh.c (card_key_available): Let the card handler decide
310 whether the card is supported here. Also get a short serial
311 number to return from the card handler.
313 2005-09-08 Werner Koch <wk@g10code.com>
315 * minip12.c (build_cert_bag): Use a non constructed object.
316 i.e. 0x80 and not 0xa0.
318 2005-08-16 Werner Koch <wk@g10code.com>
320 * gpg-agent.c (main): Use a default file name for --write-env-file.
322 2005-07-25 Werner Koch <wk@g10code.com>
324 * findkey.c (agent_public_key_from_file): Fixed array assignment.
325 This was the cause for random segvs.
327 2005-06-29 Werner Koch <wk@g10code.com>
329 * command-ssh.c (data_sign): Removed empty statement.
331 2005-06-21 Werner Koch <wk@g10code.com>
333 * minip12.c (create_final): Cast size_t to ulong for printf.
334 (build_key_bag, build_cert_bag, build_cert_sequence): Ditto.
336 2005-06-16 Werner Koch <wk@g10code.com>
338 * protect-tool.c (make_advanced): Makde RESULT a plain char.
339 * call-scd.c (unescape_status_string): Need to cast unsigned char*
341 (agent_card_pksign): Made arg R_BUF an unsigned char**.
342 * divert-scd.c (divert_pksign): Made SIGVAL unsigned char*.
343 (encode_md_for_card): Initialize R_VAL and R_LEN.
344 * genkey.c (store_key): Made BUF unsigned.
345 * protect.c (do_encryption): Ditto.
346 (do_encryption): Made arg PROTBEGIN unsigned. Initialize RESULT
347 and RESULTLEN even on error.
348 (merge_lists): Need to cast unsigned char * for strcpy. Initialize
349 RESULTand RESULTLEN even on error.
350 (agent_unprotect): Likewise for strtoul.
351 (make_shadow_info): Made P and INFO plain char.
352 (agent_shadow_key): Made P plain char.
354 2005-06-15 Werner Koch <wk@g10code.com>
356 * query.c (agent_get_passphrase): Made HEXSTRING a char*.
357 * command-ssh.c (ssh_key_grip): Made arg BUFFER unsigned.
358 (ssh_key_grip): Simplified.
359 (data_sign): Initialize variables with the definition.
360 (ssh_convert_key_to_blob): Make sure that BLOB and BLOB_SIZE
361 are set to NULL on error. Cool, gcc-4 detects uninitialized stuff
362 beyond function boundaries; well it can't know that we do error
363 proper error handling so that this was not a real error.
364 (file_to_buffer): Likewise for BUFFER and BUFFER_N.
365 (data_sign): Likewise for SIG and SIG_N.
366 (stream_read_byte): Set B to a value even on error.
367 * command.c (cmd_genkey): Changed VALUE to char.
368 (cmd_readkey): Cast arg for gcry_sexp_sprint.
369 * agent.h (struct server_control_s): Made KEYGRIP unsigned.
371 2005-06-13 Werner Koch <wk@g10code.com>
373 * command-ssh.c (start_command_handler_ssh): Reset the SCD.
375 2005-06-09 Werner Koch <wk@g10code.com>
377 * gpg-agent.c (create_socket_name): New option --max-cache-ttl-ssh.
378 * cache.c (housekeeping): Use it.
379 (agent_put_cache): Use a switch to get the default ttl so that it
380 is easier to add more cases.
382 2005-06-06 Werner Koch <wk@g10code.com>
384 * gpg-agent.c: New option --default-cache-ttl-ssh.
385 * agent.h (cache_mode_t): New.
386 * pksign.c (agent_pksign_do): New arg CACHE_MODE to replace the
387 ARG IGNORE_CACHE. Changed all callers.
388 (agent_pksign): Ditto.
389 * findkey.c (agent_key_from_file): Ditto. Canged all callers.
391 * command-ssh.c (data_sign): Use CACHE_MODE_SSH.
392 * cache.c (agent_get_cache): New arg CACHE_MODE.
393 (agent_put_cache): Ditto. Store it in the cache.
395 * query.c (agent_query_dump_state, dump_mutex_state): New.
396 (unlock_pinentry): Reset the global context before releasing the
398 * gpg-agent.c (handle_signal): Dump query.c info on SIGUSR1.
400 * call-scd.c (agent_scd_check_aliveness): Always do a waitpid and
401 add a timeout to the locking.
403 2005-06-03 Werner Koch <wk@g10code.com>
405 * command.c (cmd_updatestartuptty): New.
407 * gpg-agent.c: New option --write-env-file.
409 * gpg-agent.c (handle_connections): Make sure that the signals we
410 are handling are not blocked.Block signals while creating new
413 2005-06-02 Werner Koch <wk@g10code.com>
415 * call-scd.c (agent_scd_dump_state, dump_mutex_state): New.
416 * gpg-agent.c (handle_signal): Print it on SIGUSR1.
417 (handle_connections): Include the file descriptor into the
420 2005-06-01 Werner Koch <wk@g10code.com>
422 * gpg-agent.c: Include setenv.h.
424 2005-05-31 Werner Koch <wk@g10code.com>
426 * agent.h (out_of_core): s/__inline__/inine. Noted by Ray Link.
428 2005-05-25 Werner Koch <wk@g10code.com>
430 * gpg-agent.c (main): Do not unset the DISPLAY when we are
433 2005-05-24 Werner Koch <wk@g10code.com>
435 * call-scd.c (inq_needpin): Skip leading spaces in of PIN
437 * divert-scd.c (getpin_cb): Enhanced to cope with description
439 * query.c (agent_askpin): Add arg PROMPT_TEXT. Changed all
442 2005-05-21 Werner Koch <wk@g10code.com>
444 * call-scd.c (start_scd): Don't test for an alive scdaemon here.
445 (agent_scd_check_aliveness): New.
446 * gpg-agent.c (handle_tick): Test for an alive scdaemon.
447 (handle_signal): Print thread info on SIGUSR1.
449 2005-05-20 Werner Koch <wk@g10code.com>
451 * protect-tool.c: New option --canonical.
452 (show_file): Implement it.
454 * keyformat.txt: Define the created-at attribute for keys.
456 2005-05-18 Werner Koch <wk@g10code.com>
458 * divert-scd.c (ask_for_card): Removed the card reset kludge.
460 2005-05-17 Werner Koch <wk@g10code.com>
462 * call-scd.c (unlock_scd): Add new arg CTRL. Changed all callers.
463 (start_scd): Reoworked to allow for additional connections.
464 * agent.h (ctrl_t): Add local data for the SCdaemon.
465 * command.c (start_command_handler): Release SERVER_LOCAL.
467 * gpg-agent.c (create_server_socket): Use xmalloc.
468 (main): Removed option --disable-pth a dummy. Removed non-pth
470 (cleanup_sh): Removed. Not needed anymore.
472 2005-05-05 Moritz Schulte <moritz@g10code.com>
474 * command-ssh.c (ssh_key_to_buffer): Rename to ...
475 (ssh_key_to_protected_buffer): ... this; change callers.
476 Improved documentation.
477 Use ssh_key_grip(), where gcry_pk_get_keygrip() has been used
479 (ssh_handler_sign_request): Removed unusued variable P.
481 2005-04-20 Moritz Schulte <moritz@g10code.com>
483 * command-ssh.c (ssh_handler_request_identities): Removed
484 debugging code (sleep call), which was commited unintenionally.
486 2005-04-20 Werner Koch <wk@g10code.com>
488 * minip12.c (parse_bag_encrypted_data): Fix the unpadding hack.
490 * gpg-agent.c: New option --disable-scdaemon.
491 (handle_connections): Add time event to drive ...
492 (handle_tick): New function.
493 (main): Record the parent PID. Fixed segv when using ssh and a
496 * call-scd.c (start_scd): Take care of this option.
498 2005-04-03 Moritz Schulte <moritz@g10code.com>
500 * command-ssh.c (ssh_request_spec): New member: secret_input.
501 (REQUEST_SPEC_DEFINE): New argument: secret_input.
502 (request_specs): Add secret_input flag.
503 (request_spec_lookup): New function ...
504 (ssh_request_process): ... use it here; depending on secret_input
505 flag allocate secure or non-secure memory.
507 2005-03-02 Moritz Schulte <moritz@g10code.com>
509 * command-ssh.c (sexp_key_extract): Removed FIXME, since
510 xtrymallos does set errno correctly by now.
511 (sexp_extract_identifier): Remove const attribute from identifier.
512 (ssh_handler_request_identities): Remove const attribute from
513 key_type; removes ugly casts and FIXME.
514 (sexp_key_extract): Remove const attribute from comment.
515 (ssh_send_key_public): Remove const attribute from
516 key_type/comment; removes ugly cast.
517 (data_sign): Remove const attribute from identifier; removes ugly
519 (key_secret_to_public): Remove const attribute from comment;
521 (ssh_handler_sign_request): Remove const attribute from p.
522 (sexp_key_extract): Use make_cstring().
523 (ssh_key_extract_comment): Likewise.
524 (ssh_key_to_buffer): Use secure memory for memory area to hold the
528 2005-02-25 Werner Koch <wk@g10code.com>
530 * findkey.c (modify_description): Keep invalid % escapes, so that
531 %0A may pass through.
533 * agent.h (server_control_s): New field USE_AUTH_CALL.
534 * call-scd.c (agent_card_pksign): Make use of it.
535 * command-ssh.c (data_sign): Set the flag.
536 (ssh_send_key_public): New arg OVERRIDE_COMMENT.
537 (card_key_available): Add new arg CARDSN.
538 (ssh_handler_request_identities): Use the card s/n as comment.
539 (sexp_key_extract): Use GCRYMPI_FMT_STD.
542 * learncard.c (make_shadow_info): Moved to ..
543 * protect.c (make_shadow_info): .. here. Return NULL on malloc
544 failure. Made global.
545 * agent.h: Add prototype.
547 2005-02-24 Werner Koch <wk@g10code.com>
549 * call-scd.c (unescape_status_string): New. Actual a copy of
551 (card_getattr_cb, agent_card_getattr): New.
553 * command-ssh.c (card_key_available): New.
554 (ssh_handler_request_identities): First see whether a card key is
557 * gpg-agent.c (handle_connections): Need to check for events if
558 select returns with -1.
560 2005-02-23 Werner Koch <wk@g10code.com>
562 * command-ssh.c (get_passphrase): Removed.
563 (ssh_identity_register): Partly rewritten.
564 (open_control_file, search_control_file, add_control_entry): New.
565 (ssh_handler_request_identities): Return only files listed in our
568 * findkey.c (unprotect): Check for allocation error.
570 * agent.h (opt): Add fields to record the startup terminal
572 * gpg-agent.c (main): Record them and do not force keep display
573 with --enable-ssh-support.
574 * command-ssh.c (start_command_handler_ssh): Use them here.
576 * gpg-agent.c: Renamed option --ssh-support to
577 --enable-ssh-support.
579 * command.c (cmd_readkey): New.
580 (register_commands): Register new command "READKEY".
582 * command-ssh.c (ssh_request_process): Improved logging.
584 * findkey.c (agent_write_private_key): Always use plain open.
585 Don't depend on an umask for permissions.
586 (agent_key_from_file): Factored file reading code out to ..
587 (read_key_file): .. new function.
588 (agent_public_key_from_file): New.
590 2005-02-22 Werner Koch <wk@g10code.com>
592 * command-ssh.c (stream_read_string): Removed call to abort on
593 memory error because the CVS version of libgcrypt makes sure
594 that ERRNO gets always set on error even with a faulty user
597 2005-02-19 Moritz Schulte <moritz@g10code.com>
599 * command-ssh.c (ssh_receive_mpint_list): Slightly rewritten, do
600 not use elems_secret member of key_spec.
601 (ssh_key_type_spec): Removed member: elems_secret.
602 (ssh_key_types): Removed elems_secret data.
603 (ssh_sexp_construct): Renamed to ...
604 (sexp_key_construct): ... this; changed callers.
605 (ssh_sexp_extract): Renamed to ...
606 (sexp_key_extract): ... this; changed callers.
607 (ssh_sexp_extract_key_type): Renamed to ...
608 (sexp_extract_identifier): ... this; changed callers; use
612 2005-02-18 Moritz Schulte <moritz@g10code.com>
614 * command-ssh.c (ssh_sexp_construct): Rewritten generation of sexp
616 (ssh_sexp_extract): Support shadowed-private-key-sexp; treat
617 protected-private key and shadowed-private-key as public keys.
618 (key_secret_to_public): Rewritten: simply use ssh_sexp_extract()
619 and ssh_sexp_construct().
621 2005-02-15 Werner Koch <wk@g10code.com>
623 * findkey.c (modify_description): Don't increment OUT_LEN during
626 2005-02-14 Moritz Schulte <moritz@g10code.com>
628 * command-ssh.c (es_read_byte): Renamed to ...
629 (stream_es_read_byte): ... this; changed callers.
630 (es_write_byte): Renamed to ...
631 (stream_write_byte): ... this; changed callers.
632 (es_read_uint32): Renamed to ...
633 (stream_read_uint32): ... this; changed callers.
634 (es_write_uint32): Renamed to ...
635 (stream_write_uint32): ... this; changed callers.
636 (es_read_data): Renamed to ...
637 (stream_read_data): ... this; changed callers.
638 (es_write_data): Renamed to ...
639 (stream_write_data): ... this; changed callers.
640 (es_read_string): Renamed to ...
641 (stream_read_string): ... this; changed callers.
642 (es_read_cstring): Renamed to ...
643 (stream_read_cstring): ... this; changed callers.
644 (es_write_string): Renamed to ...
645 (stream_write_string): ... this; changed callers.
646 (es_write_cstring): Renamed to ...
647 (stream_write_cstring): ... this; changed callers.
648 (es_read_mpi): Renamed to ...
649 (stream_read_mpi): ... this; changed callers.
650 (es_write_mpi): Renamed to ...
651 (stream_write_mpi): ... this; changed callers.
652 (es_copy): Renamed to ...
653 (stream_copy): ... this; changed callers.
654 (es_read_file): Renamed to ...
655 (file_to_buffer): ... this; changed callers.
656 (ssh_identity_register): Removed variable description_length;
657 changed code to use asprintf for description.
658 (stream_write_uint32): Do not filter out the last byte of shift
660 (uint32_construct): New macro ...
661 (stream_read_uint32): ... use it; removed unnecessary cast.
663 2005-02-03 Werner Koch <wk@g10code.com>
665 * agent.h (agent_exit): Add JNLIB_GCC_A_NR to indicate that this
666 function won't return.
668 * gpg-agent.c (check_for_running_agent): Initialize pid to a
669 default value if not needed.
671 * command-ssh.c: Removed stdint.h. s/byte_t/unsigned char/,
672 s/uint32/u32/ becuase that is what we have always used in GnuPG.
673 (ssh_request_specs): Moved to top of file.
674 (ssh_key_types): Ditto.
675 (make_cstring): Ditto.
676 (data_sign): Don't use a variable for the passphrase prompt, make
678 (ssh_request_process):
681 * findkey.c (modify_description): Renamed arguments for clarity,
682 polished documentation. Make comment a C-string. Fixed case of
683 DESCRIPTION being just "%".
684 (agent_key_from_file): Make sure comment string to a C-string.
686 * gpg-agent.c (create_socket_name): Cleanup the implemntation, use
687 DIMof, agent_exit, removed superflous args and return the
688 allocated string as value. Documented. Changed callers.
689 (create_server_socket): Cleanups similar to above. Changed callers.
690 (cleanup_do): Renamed to ..
691 (remove_socket): .. this. Changed caller.
692 (handle_connections): The signals are to be handled in the select
693 and not in the accept. Test all FDs after returning from a
694 select. Remove the event tests from the accept calls. The select
695 already assured that the accept won't block.
697 2005-01-29 Moritz Schulte <moritz@g10code.com>
699 * command-ssh.c (ssh_handler_request_identities)
700 (ssh_handler_sign_request, ssh_handler_add_identity)
701 (ssh_handler_remove_identity, ssh_handler_remove_all_identities)
702 (ssh_handler_lock, ssh_handler_unlock): Changed to return an error
703 code instead of a boolean.
704 (ssh_request_process): Changed to return a boolean instead of an
705 error; adjust caller.
706 (ssh_request_handle_t): Adjusted type.
707 (ssh_request_spec): New member: identifier.
708 (REQUEST_SPEC_DEFINE): New macro; use it for initialization of
710 (ssh_request_process): In debugging mode, log identifier of
712 (start_command_handler_ssh): Moved most of the stream handling
714 (ssh_request_process): ... here.
716 2005-01-28 Moritz Schulte <moritz@g10code.com>
718 * command-ssh.c (ssh_handler_add_identity): Pass ctrl to
719 ssh_identity_register().
720 (ssh_identity_register): New argument: ctrl; pass ctrl to
722 (get_passphrase): Pass ctrl instead of NULL to agent_askpin().
723 (start_command_handler_ssh): Use agent_init_default_ctrl();
724 deallocate structure members, which might be dynamically
726 (lifetime_default): Removed variable.
727 (ssh_handler_add_identity): Fix ttl handling; renamed variable
729 (ssh_identity_register): Fix key grip handling.
731 2005-01-26 Moritz Schulte <moritz@g10code.com>
733 * command-ssh.c (ssh_handler_sign_request): Confirm to agent
734 protocol in case of failure.
736 * command-ssh.c: New file.
738 * Makefile.am (gpg_agent_SOURCES): New source file: command-ssh.c.
740 * findkey.c (modify_description): New function.
741 (agent_key_from_file): Support comment field in key s-expressions.
743 * gpg-agent.c (enum cmd_and_opt_values): New item: oSSHSupport.
744 (opts) New entry for oSSHSupport.
745 New variable: socket_name_ssh.
746 (cleanup_do): New function based on cleanup().
747 (cleanup): Use cleanup_do() for socket_name and socket_name_ssh.
748 (main): New switch case for oSSHSupport.
749 (main): Move socket name creation code to ...
750 (create_socket_name): ... this new function.
751 (main): Use create_socket_name() for creating socket names for
752 socket_name and for socket_name_ssh in case ssh support is
754 Move socket creation code to ...
755 (create_server_socket): ... this new function.
756 (main): Use create_server_socket() for creating sockets.
757 In case standard_socket is set, do not only store a socket name in
758 socket_name, but also in socket_name_ssh.
759 Generate additional environment info strings for ssh support.
760 Pass additional ssh socket argument to handle_connections.
761 (start_connection_thread_ssh): New function.
762 (handle_connections): Use select to multiplex between gpg-agent
763 and ssh-agent protocol.
765 * agent.h (struct opt): New member: ssh_support.
766 (start_command_handler_ssh): Add prototype.
768 2005-01-04 Werner Koch <wk@g10code.com>
770 * trustlist.c (agent_marktrusted): Use "Cancel" for the first
771 confirmation and made the strings translatable.
773 * cache.c (agent_put_cache): Fix the test for using the default
776 2004-12-21 Werner Koch <wk@g10code.com>
778 * preset-passphrase.c (preset_passphrase): Handle --passphrase.
780 * Makefile.am (gpg_preset_passphrase_LDADD): Reorder libs so that
781 pwquery may use stuff from jnlib. Conditionally add -lwsock2
782 (gpg_protect_tool_LDADD): Ditto.
784 * preset-passphrase.c (main): Use default_homedir().
785 (main) [W32]: Initialize sockets.
787 2004-12-21 Marcus Brinkmann <marcus@g10code.de>
789 * Makefile.am (libexec_PROGRAMS): Add gpg-preset-passphrase.
790 (gpg_preset_passphrase_SOURCES, gpg_preset_passphrase_LDADD): New
792 * agent.h (opt): New member allow_cache_passphrase.
793 * cache.c (housekeeping): Check if R->ttl is not negative.
794 (agent_put_cache): Allow ttl to be negative.
795 * command.c (parse_hexstring): Allow something to follow the
797 (cmd_cache_passphrase): New function.
798 (register_commands): Add it.
799 * gpg-agent.c: Handle --allow-preset-passphrase.
800 * preset-passphrase.c: New file.
802 2004-12-21 Werner Koch <wk@g10code.com>
804 * gpg-agent.c (main): Use default_homedir().
805 * protect-tool.c (main): Ditto.
807 2004-12-20 Werner Koch <wk@g10code.com>
809 * gpg-agent.c (main) [W32]: Now that Mutexes work we can remove
811 (main): Add new options --[no-]use-standard-socket.
812 (check_for_running_agent): Check whether it is running on the
815 * call-scd.c (init_membuf, put_membuf, get_membuf): Removed. We
816 now use the identical implementation from ../common/membuf.c.
818 * pksign.c (agent_pksign): Changed arg OUTFP to OUTBUF and use
819 membuf functions to return the value.
820 * pkdecrypt.c (agent_pkdecrypt): Ditto.
821 * genkey.c (agent_genkey): Ditto.
822 * command.c (cmd_pksign, cmd_pkdecrypt, cmd_genkey): Replaced
823 assuan_get_data_fp() by a the membuf scheme.
824 (clear_outbuf, write_and_clear_outbuf): New.
826 2004-12-19 Werner Koch <wk@g10code.com>
828 * query.c (initialize_module_query): New.
829 * call-scd.c (initialize_module_call_scd): New.
830 * gpg-agent.c (main): Call them.
832 2004-12-18 Werner Koch <wk@g10code.com>
834 * gpg-agent.c (main): Remove special Pth initialize.
836 * agent.h (map_assuan_err): Define in terms of
837 map_assuan_err_with_source.
839 2004-12-17 Moritz Schulte <moritz@g10code.com>
841 * query.c: Undo change from 2004-12-05.
843 2004-12-15 Werner Koch <wk@g10code.com>
845 * gpg-agent.c [W32]: Various hacks to make it work.
847 * findkey.c (agent_write_private_key) [W32]: Adjust open call.
849 * call-scd.c (start_scd) [W32]: Don't check whether the daemon
850 didn't died. To hard to do under Windows.
851 (start_scd) [W32]: Disable sending of the event signal option.
853 * protect-tool.c (read_file, export_p12_file) [W32]: Use setmode
854 to get stdout and stin into binary mode.
856 2004-12-05 Moritz Schulte <moritz@g10code.com>
858 * query.c (start_pinentry): Allow CTRL be NULL.
860 2004-10-22 Werner Koch <wk@g10code.com>
862 * gpg-agent.c (parse_rereadable_options): Return "not handled"
863 when the log file has not beend hadled. This is will let the main
864 option processing continue. Fixed a bug introduced on 2004-09-4
865 resulting in logging to stderr until a HUP has been given.
866 (main): Don't close the listen FD.
868 2004-09-30 Werner Koch <wk@g10code.com>
870 * Makefile.am: Adjusted from gettext 1.14.
872 2004-09-29 Werner Koch <wk@g10code.com>
874 * minip12.c (parse_bag_encrypted_data): Print error if a bad
875 passphrase has been given.
877 2004-09-28 Werner Koch <wk@g10code.com>
879 * protect.c (agent_unprotect): Fixed wiping of CLEARTEXT. Thanks
880 to Moritz for pointing this out.
882 2004-09-25 Moritz Schulte <moritz@g10code.com>
884 * agent.h: Declare: agent_pksign_do.
885 (struct server_control_s): New member: raw_value.
887 * pksign.c (do_encode_md): New argument: raw_value; support
888 generation of raw (non-pkcs1) data objects; adjust callers.
889 (agent_pksign_do): New function, based on code ripped
890 out from agent_pksign.
891 (agent_pksign): Use agent_pksign_do.
893 * command.c (start_command_handler): Set ctrl.digest.raw_value.
895 2004-09-09 Werner Koch <wk@g10code.de>
897 * gpg-agent.c (check_for_running_agent): New.
898 (main): The default action is now to check for an already running
900 (parse_rereadable_options): Set logfile only on reread.
901 (main): Do not print the "is development version" note.
903 2004-08-20 Werner Koch <wk@g10code.de>
905 * gpg-agent.c: New option --max-cache-ttl. Suggested by Alexander
907 * cache.c (housekeeping): Use it here instead of the hardwired
910 * query.c (start_pinentry): Use a timeout for the pinentry lock.
912 2004-08-18 Werner Koch <wk@g10code.de>
914 * protect-tool.c (get_passphrase): Make sure that the default
915 prompts passed to gpg-agent are utf-8 encoded. Add new prompt values.
916 (import_p12_file, import_p12_file, export_p12_file): Changed calls
917 to get_passphrase so that better prompts are displayed.
918 (get_new_passphrase): New.
920 2004-07-22 Werner Koch <wk@g10code.de>
922 * trustlist.c (read_list): Allow colons in the fingerprint.
923 (headerblurb): Rephrased.
925 * gpg-agent.c (handle_connections): Increase the stack size ot 256k.
927 2004-06-20 Moritz Schulte <moritz@g10code.com>
929 * gpg-agent.c: Include <sys/stat.h> (build fix for BSD).
931 2004-05-11 Werner Koch <wk@gnupg.org>
933 * gpg-agent.c (handle_signal): Reload the trustlist on SIGHUP.
934 (start_connection_thread): Hack to simulate a ticker.
935 * trustlist.c (agent_trustlist_housekeeping)
936 (agent_reload_trustlist): New. Protected all global functions
937 here with a simple counter which is sufficient for Pth.
939 2004-05-03 Werner Koch <wk@gnupg.org>
941 * gpg-agent.c: Remove help texts for options lile --lc-ctype.
942 (main): New option --allow-mark-trusted.
943 * trustlist.c (agent_marktrusted): Use it here.
945 2004-04-30 Werner Koch <wk@gnupg.org>
947 * protect-tool.c: New option --enable-status-msg.
948 (store_private_key): Print status messages for imported keys.
949 (read_and_unprotect): Ditto for bad passphrase.
951 * gpg-agent.c (parse_rereadable_options): New arg REREAD. Allow
953 (current_logfile): New.
955 2004-04-26 Werner Koch <wk@gnupg.org>
957 * call-scd.c (start_scd): Do not register an event signal if we
958 are running as a pipe server.
960 2004-04-21 Werner Koch <wk@gnupg.org>
962 * call-scd.c (start_scd): Send event-signal option. Always check
963 that the scdaemon is still running.
965 * gpg-agent.c (handle_signal): Do not use SIGUSR{1,2} anymore for
966 changing the verbosity.
968 2004-04-16 Werner Koch <wk@gnupg.org>
970 * gpg-agent.c (main): Tell the logging code that we are running
973 2004-04-06 Werner Koch <wk@gnupg.org>
975 * gpg-agent.c (main): Use new libgcrypt thread library register
978 2004-03-23 Marcus Brinkmann <marcus@g10code.de>
980 * gpg-agent.c (main): For now, always print the default config
981 file name for --gpgconf-list.
983 2004-03-17 Werner Koch <wk@gnupg.org>
985 * gpg-agent.c (main) <gpgconf>: Fixed default value quoting.
987 2004-03-16 Werner Koch <wk@gnupg.org>
989 * gpg-agent.c (parse_rereadable_options): Use the new
990 DEFAULT_CACHE_TTL macro.
991 (main): Updated --gpgconf-list output.
993 2004-02-21 Werner Koch <wk@gnupg.org>
995 * command.c (cmd_passwd): Take acount of a key description.
997 * genkey.c (reenter_compare_cb): Do not set the error text.
998 (agent_protect_and_store, agent_genkey): Force a re-enter after a
999 non-matching passphrase.
1000 * query.c (agent_askpin): Add new arg INITIAL_ERRTEXT; changed
1003 2004-02-19 Werner Koch <wk@gnupg.org>
1005 * protect-tool.c: New options --have-cert and --prompt.
1006 (export_p12_file): Read a certificate from STDIN and pass it to
1007 p12_build. Detect a keygrip and construct the filename in that
1008 case. Unprotcet a key if needed. Print error messages for key
1009 formats we can't handle.
1010 (release_passphrase): New.
1011 (get_passphrase): New arg PROMPTNO. Return the allocated
1012 string. Changed all callers.
1014 * minip12.c: Revamped the build part.
1015 (p12_build): New args CERT and CERTLEN.
1017 2004-02-18 Werner Koch <wk@gnupg.org>
1019 * protect-tool.c (main): Setup the used character set.
1020 * gpg-agent.c (main): Ditto.
1022 * gpg-agent.c (set_debug): New. New option --debug-level.
1023 (main): New option --gpgconf-list.
1025 2004-02-17 Werner Koch <wk@gnupg.org>
1027 * pksign.c (do_encode_md): Cleaned up by using gcry_sexp_build.
1029 * Makefile.am (gpg_protect_tool_SOURCES): Removed
1030 simple-pwquery.[ch], as we once moved it to ../common.
1032 2004-02-13 Werner Koch <wk@gnupg.org>
1034 * command.c (cmd_setkeydesc): New.
1035 (register_commands): Add command SETKEYDESC.
1036 (cmd_pksign, cmd_pkdecrypt): Use the key description.
1037 (reset_notify): Reset the description.
1038 * findkey.c (unprotect): Add arg DESC_TEXT.
1039 (agent_key_from_file): Ditto.
1040 * pksign.c (agent_pksign): Ditto.
1041 * pkdecrypt.c (agent_pkdecrypt): Ditto. Made CIPHERTEXT an
1044 * protect-tool.c (main): New options --no-fail-on-exist, --homedir.
1045 (store_private_key): Use them here.
1047 2004-02-12 Werner Koch <wk@gnupg.org>
1049 * protect-tool.c (read_file, main): Allow reading from stdin.
1051 * Makefile.am: Include cmacros.am for common flags.
1052 (libexec_PROGRAMS): Put gpg-protect-tool there.
1054 2004-02-10 Werner Koch <wk@gnupg.org>
1056 * minip12.c (parse_bag_encrypted_data): Finished implementation.
1057 (p12_parse): Add callback args.
1058 * protect-tool.c (import_p12_cert_cb): New.
1059 (import_p12_file): Use it.
1061 2004-02-06 Werner Koch <wk@gnupg.org>
1063 * minip12.c (crypt_block): Add arg CIPHER_ALGO; changed all callers.
1064 (set_key_iv): Add arg KEYBYTES; changed caller.
1066 2004-02-03 Werner Koch <wk@gnupg.org>
1068 * findkey.c (agent_key_from_file): Extra paranoid wipe.
1069 * protect.c (agent_unprotect): Ditto.
1070 (merge_lists): Ditto. Add arg RESULTLEN.
1071 * pkdecrypt.c (agent_pkdecrypt): Don't show the secret key even in
1074 * protect.c: Add DSA and Elgamal description.
1076 2004-01-29 Werner Koch <wk@gnupg.org>
1078 * agent.h (server_control_s): Add connection_fd field.
1079 * command.c (start_command_handler): Init it here.
1080 * gpg-agent.c (agent_init_default_ctrl): and here.
1081 * call-scd.c: Add the CTRL arg to all functions calling start_scd
1082 and pass it to start_scd. Changed all callers
1083 (start_scd): Keep track of the current active connection.
1084 (agent_reset_scd): New.
1085 * command.c (start_command_handler): Call it here.
1086 * learncard.c (agent_handle_learn): Add arg CTRL; changed caller.
1087 (send_cert_back): Ditto.
1089 2004-01-28 Werner Koch <wk@gnupg.org>
1091 * trustlist.c (agent_marktrusted): Check whether the trustlist is
1094 2004-01-27 Werner Koch <wk@gnupg.org>
1096 * sexp-parse.h: Moved to ../common.
1098 2004-01-24 Werner Koch <wk@gnupg.org>
1100 * call-scd.c (atfork_cb): New.
1101 (start_scd): Make sure secmem gets cleared.
1102 * query.c (atfork_cb): New.
1103 (start_pinentry): Make sure secmem gets cleared.
1105 2004-01-16 Werner Koch <wk@gnupg.org>
1107 * findkey.c (agent_key_from_file): Now return an error code so
1108 that we have more detailed error messages in the upper layers.
1109 This fixes the handling of pinentry's cancel button.
1110 * pksign.c (agent_pksign): Changed accordingly.
1111 * pkdecrypt.c (agent_pkdecrypt): Ditto.
1112 * command.c (cmd_passwd): Ditto.
1114 2003-12-16 Werner Koch <wk@gnupg.org>
1116 * gpg-agent.c (main): Set the prefixes for assuan logging.
1118 2003-12-15 Werner Koch <wk@gnupg.org>
1120 * protect.c (do_encryption): Use gcry_create_nonce instad of the
1121 obsolete WEAK_RANDOM.
1123 2003-11-20 Werner Koch <wk@gnupg.org>
1125 * sexp-parse.h (snext): Don't use atoi_1 and digitp macros, so
1126 that this file is useful by other applications too.
1128 2003-10-27 Werner Koch <wk@gnupg.org>
1130 * command.c (cmd_get_confirmation): New command.
1132 2003-08-20 Timo Schulz <twoaday@freakmail.de>
1134 * pksign.c (do_encode_md): Allocate enough space. Cast md
1135 byte to unsigned char to prevent sign extension.
1137 2003-08-14 Timo Schulz <twoaday@freakmail.de>
1139 * pksign.c (do_encode_md): Due to the fact pkcs#1 padding
1140 is now in Libgcrypt, use the new interface.
1142 2003-07-31 Werner Koch <wk@gnupg.org>
1144 * Makefile.am (gpg_agent_LDADD): Added INTLLIBS.
1145 (gpg_protect_tool_SOURCES): Added simple-pwquery.[ch]
1147 2003-07-27 Werner Koch <wk@gnupg.org>
1149 Adjusted for gcry_mpi_print and gcry_mpi_scan API change.
1151 2003-07-15 Werner Koch <wk@gnupg.org>
1153 * simple-pwquery.c, simple-pwquery.h: Moved to ../common.
1154 * Makefile.am (gpg_protect_tool_LDADD): Add simple-pwquery.o.
1155 Removed it from xx_SOURCES.
1157 2003-07-04 Werner Koch <wk@gnupg.org>
1159 * gpg-agent.c (handle_connections): Kludge to allow use of Pth 1
1162 2003-06-30 Werner Koch <wk@gnupg.org>
1164 * call-scd.c (learn_status_cb): Store the serialno in PARM.
1166 2003-06-26 Werner Koch <wk@gnupg.org>
1168 * call-scd.c (agent_card_serialno): Don't do a RESET anymore.
1170 2003-06-25 Werner Koch <wk@gnupg.org>
1172 * command.c (cmd_scd): New.
1173 * call-scd.c (agent_card_scd): New.
1174 * divert-scd.c (divert_generic_cmd): New
1176 * call-scd.c (agent_card_learn): New callback args SINFO.
1177 (learn_status_cb): Pass all other status lines to the sinfo
1179 * learncard.c (release_sinfo, sinfo_cb): New.
1180 (agent_handle_learn): Pass the new cb to the learn function and
1181 pass the collected information back to the client's assuan
1184 * gpg-agent.c (main): Moved pth_init before gcry_check_version.
1186 2003-06-24 Werner Koch <wk@gnupg.org>
1188 * gpg-agent.c (handle_connections): Adjusted for Pth 2.0
1190 Adjusted for changes in the libgcrypt API. Some more fixes for the
1193 2003-06-04 Werner Koch <wk@gnupg.org>
1195 Renamed error codes from INVALID to INV and removed _ERROR suffixes.
1197 2003-06-03 Werner Koch <wk@gnupg.org>
1199 Changed all error codes in all files to the new libgpg-error scheme.
1201 * agent.h: Include gpg-error.h and errno.h
1202 * Makefile.am: Link with libgpg-error
1204 * query.c: assuan.h is now a system header.
1205 * genkey.c (agent_genkey): Fixed silly use of xmalloc by
1208 2003-04-29 Werner Koch <wk@gnupg.org>
1210 * command.c (register_commands): Adjusted for new Assuan semantics.
1212 * Makefile.am: Don't override LDFLAGS.
1214 2002-12-04 Werner Koch <wk@gnupg.org>
1216 * gpg-agent.c: New variable config_filename.
1217 (parse_rereadable_options): New.
1218 (main): Use it here. Add setting of default values, set
1220 (reread_configuration): Filled with actual code.
1222 2002-12-03 Werner Koch <wk@gnupg.org>
1224 * protect-tool.c (read_key): Don't run make_canonical on a NULL
1227 * command.c (parse_hexstring): New.
1228 (cmd_sethash): Use it.
1229 (parse_keygrip): New.
1230 (cmd_havekey, cmd_sigkey): Use it.
1232 * genkey.c (agent_protect_and_store): New.
1233 (store_key): Add arg FORCE.
1234 (agent_genkey): Pass false to this force of store_key.
1236 2002-11-13 Werner Koch <wk@gnupg.org>
1238 * gpg-agent.c (main): Switch all messages to utf-8.
1240 * simple-pwquery.c (agent_send_all_options): Use $GPG_TTY and
1243 * cache.c (new_data): Uiih - /sizeof d/sizeof *d/.
1245 2002-11-10 Werner Koch <wk@gnupg.org>
1247 * command.c (option_handler): Fix keep_tty check.
1249 2002-11-06 Werner Koch <wk@gnupg.org>
1251 * gpg-agent.c (main): Make sure we have a default ttyname.
1252 * command.c (option_handler): Check opt.keep_tty here
1253 * query.c (start_pinentry): but not anymore here.
1255 2002-11-05 Werner Koch <wk@gnupg.org>
1257 * agent.h (opt,server_control_s): Move display and lc_ variables
1258 to the control struct so that they are per connection.
1259 * gpg-agent.c (agent_init_default_ctrl): New.
1260 (main): Assign those command line options to new default_* variables.
1261 Reset DISPLAY in server mode so that tehre is no implicit default.
1262 * command.c (start_command_handler): Initialize and deinitialize
1264 (option_handler): Work on the ctrl values and not on the opt.
1265 * query.c (start_pinentry): New argument CTRL to set the display
1266 connection specific. Changed all callers to pass this value.
1267 (agent_askpin,agent_get_passphrase,agent_get_confirmation): Add
1268 CTRL arg and pass it ot start_pinentry.
1269 * command.c (cmd_get_passphrase): Pass CTRL argument.
1270 * trustlist.c (agent_marktrusted): Add CTRL argument
1271 * command.c (cmd_marktrusted): Pass CTRL argument
1272 * divert-scd.c (ask_for_card): Add CTRL arg.
1273 (divert_pksign,divert_pkdecrypt): Ditto. Changed caller.
1274 (getpin_cb): Use OPAQUE to pass the CTRL variable. Changed both
1276 * findkey.c (unprotect): Add CTRL arg.
1277 (agent_key_from_file): Ditto.
1279 * query.c (unlock_pinentry): Disconnect the pinentry so that we
1280 start a new one for each request. This is required to support
1281 clients with different environments (e.g. X magic cookies).
1283 2002-09-05 Neal H. Walfield <neal@cs.uml.edu>
1285 * gpg-agent.c (main) [USE_GNU_PTH]: No need to call
1286 assuan_set_io_func as assuan is smart.
1288 2002-09-25 Werner Koch <wk@gnupg.org>
1290 * gpg-agent.c (handle_signal): Flush cache on SIGHUP.
1291 * cache.c (agent_flush_cache): New.
1293 * gpg-agent.c, agent.h: Add --keep-display and --keep-tty.
1294 * query.c (start_pinentry): Implement them. The option passing
1295 needs more thoughts.
1297 2002-09-09 Werner Koch <wk@gnupg.org>
1299 * gpg-agent.c (create_private_keys_directory)
1300 (create_directories): New.
1301 (main): Try to create a home directory.
1303 2002-09-04 Neal H. Walfield <neal@g10code.de>
1305 * gpg-agent.c (main): Use sigaction, not signal.
1307 2002-09-03 Neal H. Walfield <neal@g10code.de>
1309 * findkey.c: Include <fcntl.h>.
1310 (agent_write_private_key): Prefer POSIX compatibity, open and
1311 fdopen, over the simplicity of GNU extensions, fopen(file, "x").
1313 2002-08-22 Werner Koch <wk@gnupg.org>
1315 * query.c (agent_askpin): Provide the default desc text depending
1316 on the pininfo. Do the basic PIN verification only when
1319 2002-08-21 Werner Koch <wk@gnupg.org>
1321 * query.c (agent_askpin): Hack to show the right default prompt.
1322 (agent_get_passphrase): Ditto.
1324 * trans.c: Removed and replaced all usages with standard _()
1326 * divert-scd.c (getpin_cb): Pass a more descritive text to the
1329 * Makefile.am: Renamed the binary protect-tool to gpg-protect-tool.
1330 * protect-tool.c: Removed the note about internal use only.
1332 * gpg-agent.c (main): New option --daemon so that the program is
1333 not accidently started in the background.
1335 2002-08-16 Werner Koch <wk@gnupg.org>
1337 * call-scd.c (learn_status_cb): Handle CERTINFO status.
1338 (agent_card_learn): Add args for certinfo cb.
1339 * learncard.c (release_certinfo,certinfo_cb): New.
1340 (send_cert_back): New. With factored out code from ..
1341 (agent_handle_learn): here. Return certinfo stuff.
1343 2002-07-26 Werner Koch <wk@gnupg.org>
1345 * gpg-agent.c (main): New option --ignore-cache-for-signing.
1346 * command.c (option_handler): New server option
1347 use-cache-for-signing defaulting to true.
1348 (cmd_pksign): handle global and per session option.
1349 * findkey.c (agent_key_from_file, unprotect): New arg
1350 ignore_cache. Changed all callers.
1351 * pksign.c (agent_pksign): Likewise.
1353 2002-06-29 Werner Koch <wk@gnupg.org>
1355 * query.c (start_pinentry): Use GNUPG_DERAULT_PINENTRY.
1356 * call-scd.c (start_scd): Use GNUPG_DEFAULT_SCDAEMON.
1358 2002-06-28 Werner Koch <wk@gnupg.org>
1360 * protect-tool.c (export_p12_file): New.
1361 (main): New command --p12-export.
1362 * minip12.c (create_final,p12_build,compute_tag_length): New.
1363 (store_tag_length): New.
1365 2002-06-27 Werner Koch <wk@gnupg.org>
1367 * minip12.c (crypt_block): Renamed from decrypt_block, add arg to
1370 * Makefile.am (pkglib_PROGRAMS): Put protect-tool there.
1372 * findkey.c (agent_write_private_key,agent_key_from_file)
1373 (agent_key_available): Use GNUPG_PRIVATE_KEYS_DIR constant.
1374 * gpg-agent.c (main): Use GNUPG_DEFAULT_HOMEDIR constant.
1376 * protect-tool.c (store_private_key): New.
1377 (import_p12_file): Store the new file if requested.
1378 (main): New options --force and --store.
1380 * gpg-agent.c (main): Set a global flag when running detached.
1381 * query.c (start_pinentry): Pass the list of FD to keep in the
1382 child when not running detached.
1383 * call-scd.c (start_scd): Ditto.
1385 2002-06-26 Werner Koch <wk@gnupg.org>
1387 * command.c (cmd_istrusted, cmd_listtrusted, cmd_marktrusted)
1388 (cmd_pksign, cmd_pkdecrypt, cmd_genkey, cmd_get_passphrase)
1389 (cmd_learn): Print an error message for a failed operation.
1391 * simple-pwquery.c, simple-pwquery.h: New.
1392 * protect-tool. (get_passphrase): New, used to get a passphrase
1393 from the agent if none was given on the command line.
1395 2002-06-25 Werner Koch <wk@gnupg.org>
1397 * protect-tool.c (rsa_key_check): New.
1398 (import_p12_file): New.
1399 (main): New command --p12-import.
1400 * minip12.c, minip12.h: New.
1402 2002-06-24 Werner Koch <wk@gnupg.org>
1404 * protect-tool.c (read_file): New.
1405 (read_key): Factored most code out to read_file.
1407 2002-06-17 Werner Koch <wk@gnupg.org>
1409 * agent.h: Add a callback function to the pin_entry_info structure.
1410 * query.c (agent_askpin): Use the callback to check for a correct
1411 PIN. Removed the start_err_text argument because it is not
1412 anymore needed; changed callers.
1413 * findkey.c (unprotect): Replace our own check loop by a callback.
1414 (try_unprotect_cb): New.
1415 * genkey.c (reenter_compare_cb): New.
1416 (agent_genkey): Use this callback here. Fixed setting of the pi2
1417 variable and a segv in case of an empty PIN.
1419 * divert-scd.c (getpin_cb): Removed some unused stuff and
1420 explained what we still have to change.
1422 2002-06-12 Werner Koch <wk@gnupg.org>
1424 * gpg-agent.c (main): New option --disable-pth.
1426 2002-06-11 Werner Koch <wk@gnupg.org>
1428 * protect-tool.c: Add command --show-keygrip
1429 (show_keygrip): New.
1431 2002-05-23 Werner Koch <wk@gnupg.org>
1433 * call-scd.c: Seirialized all scdaeom access when using Pth.
1435 * cache.c: Made the cache Pth-thread-safe.
1436 (agent_unlock_cache_entry): New.
1437 * findkey.c (unprotect): Unlock the returned cache value.
1438 * command.c (cmd_get_passphrase): Ditto.
1440 * gpg-agent.c (main): Register pth_read/write with Assuan.
1442 2002-05-22 Werner Koch <wk@gnupg.org>
1444 * query.c: Serialized all pinentry access when using Pth.
1446 * gpg-agent.c (handle_signal,start_connection_thread)
1447 (handle_connections): New
1448 (main): Use the new Pth stuff to allow concurrent connections.
1449 * command.c (start_command_handler): Add new arg FD so that the
1450 fucntion can also be used for an already connected socket.
1451 * Makefile.am: Link with Pth.
1453 2002-05-14 Werner Koch <wk@gnupg.org>
1455 * cache.c (housekeeping, agent_put_cache): Use our time() wrapper.
1457 2002-04-26 Werner Koch <wk@gnupg.org>
1459 * cache.c (agent_put_cache): Reinitialize the creation time and
1460 the ttl when reusing a slot.
1462 * call-scd.c (start_scd): Print debug messages only with debug
1464 * query.c (start_pinentry): Ditto.
1466 2002-04-25 Marcus Brinkmann <marcus@g10code.de>
1468 * agent.h (agent_get_confirmation): Replace paramter prompt with
1469 two parameters ok and cancel.
1470 * query.c (agent_get_confirmation): Likewise. Implement this.
1471 * trustlist.c (agent_marktrusted): Fix invocation of
1472 agent_get_confirmation.
1473 * divert-scd.c (ask_for_card): Likewise.
1475 2002-04-24 Marcus Brinkmann <marcus@g10code.de>
1477 * agent.h (struct opt): Add members display, ttyname, ttytype,
1478 lc_ctype, and lc_messages.
1479 * gpg-agent.c (enum cmd_and_opt_values): Add oDisplay, oTTYname,
1480 oTTYtype, oLCctype, and LCmessages.
1481 (main): Handle these options.
1482 * command.c (option_handler): New function.
1483 (register_commands): Register option handler.
1484 * query.c (start_pinentry): Pass the various display and tty
1485 options to the pinentry.
1487 2002-04-05 Werner Koch <wk@gnupg.org>
1489 * protect-tool.c (show_file): New. Used as default action.
1491 2002-03-28 Werner Koch <wk@gnupg.org>
1493 * divert-scd.c (encode_md_for_card): Don't do the pkcs-1 padding,
1494 the scdaemon should take care of it.
1495 (ask_for_card): Hack to not display the trailing zero.
1497 2002-03-11 Werner Koch <wk@gnupg.org>
1499 * learncard.c (kpinfo_cb): Remove the content restrictions from
1502 2002-03-06 Werner Koch <wk@gnupg.org>
1505 * divert-scd.c (ask_for_card): The serial number is binary so
1506 convert it to hex here.
1507 * findkey.c (agent_write_private_key): New.
1508 * genkey.c (store_key): And use it here.
1510 * pkdecrypt.c (agent_pkdecrypt): Changed the way the diversion is done.
1511 * divert-scd.c (divert_pkdecrypt): Changed interface and
1514 2002-03-05 Werner Koch <wk@gnupg.org>
1516 * call-scd.c (inq_needpin): New.
1517 (agent_card_pksign): Add getpin_cb args.
1518 (agent_card_pkdecrypt): New.
1520 2002-03-04 Werner Koch <wk@gnupg.org>
1522 * pksign.c (agent_pksign): Changed how the diversion is done.
1523 * divert-scd.c (divert_pksign): Changed interface and implemented it.
1524 (encode_md_for_card): New.
1525 * call-scd.c (agent_card_pksign): New.
1527 2002-02-28 Werner Koch <wk@gnupg.org>
1529 * pksign.c (agent_pksign): Detect whether a Smartcard is to be
1530 used and divert the operation in this case.
1531 * pkdecrypt.c (agent_pkdecrypt): Likewise
1532 * findkey.c (agent_key_from_file): Add optional arg shadow_info
1533 and have it return information about a shadowed key.
1534 * protect.c (agent_get_shadow_info): New.
1536 * protect.c (snext,sskip,smatch): Moved to
1537 * sexp-parse.h: New file.
1538 * divert-scd.c: New.
1540 2002-02-27 Werner Koch <wk@gnupg.org>
1542 * protect.c (agent_shadow_key): New.
1544 * command.c (cmd_learn): New command LEARN.
1545 * gpg-agent.c: New option --scdaemon-program.
1546 * call-scd.c (start_scd): New. Based on query.c
1547 * query.c: Add 2 more arguments to all uses of assuan_transact.
1549 2002-02-18 Werner Koch <wk@gnupg.org>
1551 * findkey.c (unprotect): Show an error message for a bad passphrase.
1553 * command.c (cmd_marktrusted): Implemented.
1554 * trustlist.c (agent_marktrusted): New.
1555 (open_list): Add APPEND arg.
1557 * query.c (agent_get_confirmation): New.
1559 2002-02-06 Werner Koch <wk@gnupg.org>
1561 * cache.c (housekeeping): Fixed linking in the remove case.
1563 2002-02-01 Werner Koch <wk@gnupg.org>
1565 * gpg-agent.c: New option --default-cache-ttl.
1566 * cache.c (agent_put_cache): Use it.
1568 * cache.c: Add a few debug outputs.
1570 * protect.c (agent_private_key_type): New.
1571 * agent.h: Add PRIVATE_KEY_ enums.
1572 * findkey.c (agent_key_from_file): Use it to decide whether we
1573 have to unprotect a key.
1574 (unprotect): Cache the passphrase.
1576 * findkey.c (agent_key_from_file,agent_key_available): The key
1577 files do now require a ".key" suffix to make a script's life
1579 * genkey.c (store_key): Ditto.
1581 2002-01-31 Werner Koch <wk@gnupg.org>
1583 * genkey.c (store_key): Protect the key.
1584 (agent_genkey): Ask for the passphrase.
1585 * findkey.c (unprotect): Actually unprotect the key.
1586 * query.c (agent_askpin): Add an optional start_err_text.
1588 2002-01-30 Werner Koch <wk@gnupg.org>
1591 (hash_passphrase): Based on the GnuPG 1.0.6 version.
1592 * protect-tool.c: New
1594 2002-01-29 Werner Koch <wk@gnupg.org>
1596 * findkey.c (agent_key_available): New.
1597 * command.c (cmd_havekey): New.
1598 (register_commands): And register new command.
1600 2002-01-20 Werner Koch <wk@gnupg.org>
1602 * command.c (cmd_get_passphrase): Remove the plus signs.
1604 * query.c (start_pinentry): Send no-grab option to pinentry
1605 * gpg-agent.c (main): Move variable grab as no_grab to agent.h.
1607 2002-01-19 Werner Koch <wk@gnupg.org>
1609 * gpg-agent.c (main): Disable core dumps.
1612 * command.c (cmd_get_passphrase): Use the cache.
1613 (cmd_clear_passphrase): Ditto.
1615 * gpg-agent.c: Removed unused cruft and implement the socket
1617 (my_strusage): Take bug report address from configure.ac.
1618 * command.c (start_command_handler): Add an argument to start as
1620 (start_command_handler): Enable Assuan logging.
1622 2002-01-15 Werner Koch <wk@gnupg.org>
1625 * command.c (cmd_istrusted, cmd_listtrusted, cmd_marktrusted): New.
1627 2002-01-07 Werner Koch <wk@gnupg.org>
1629 * genkey.c: Store the secret part and return the public part.
1631 2002-01-03 Werner Koch <wk@gnupg.org>
1633 * command.c (cmd_get_passphrase): New.
1634 (cmd_clear_passphrase): New.
1635 * query.c (agent_get_passphrase): New.
1637 2002-01-02 Werner Koch <wk@gnupg.org>
1640 * command.c (cmd_genkey): New.
1642 * command.c (rc_to_assuan_status): Removed and changed all callers
1643 to use map_to_assuan_status.
1645 2001-12-19 Werner Koch <wk@gnupg.org>
1647 * keyformat.txt: New.
1649 2001-12-19 Marcus Brinkmann <marcus@g10code.de>
1651 * query.c (start_pinentry): Add new argument to assuan_pipe_connect.
1653 2001-12-18 Werner Koch <wk@gnupg.org>
1655 * Makefile.am: Use LIBGCRYPT macros
1657 2001-12-14 Werner Koch <wk@gnupg.org>
1659 * gpg-agent.c (main): New option --batch. New option --debug-wait
1660 n, so that it is possible to attach gdb when used in server mode.
1661 * query.c (agent_askpin): Don't ask in batch mode.
1663 * command.c: Removed the conversion macros as they are now in
1666 2001-12-14 Marcus Brinkmann <marcus@g10code.de>
1668 * query.c (LINELENGTH): Removed.
1669 (agent_askpin): Use ASSUAN_LINELENGTH, not LINELENGTH.
1671 2001-11-19 Werner Koch <wk@gnupg.org>
1673 * gpg-agent.c: Removed all GUI code, removed code for old
1674 protocol. New code to use the Assuan protocol as a server and
1675 also to communicate with a new ask-passphrase utility.
1677 2000-11-22 Werner Koch <wk@gnupg.org>
1679 * gpg-agent.c (main): csh support by Dan Winship, new options --sh
1680 and --csh and set default by consulting $SHELL.
1682 Mon Aug 21 17:59:17 CEST 2000 Werner Koch <wk@openit.de>
1684 * gpg-agent.c (passphrase_dialog): Cleanup the window and added the
1685 user supplied text to the window.
1686 (main): Fixed segv in gtk_init when used without a command to start.
1688 * gpg-agent.c: --flush option.
1690 (req_clear_passphrase): Implemented.
1692 Fri Aug 18 14:27:14 CEST 2000 Werner Koch <wk@openit.de>
1698 Copyright 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
1700 This file is free software; as a special exception the author gives
1701 unlimited permission to copy and/or distribute it, with or without
1702 modifications, as long as this notice is preserved.
1704 This file is distributed in the hope that it will be useful, but
1705 WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
1706 implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.