1 2009-06-09 Werner Koch <wk@g10code.com>
3 * app-openpgp.c (do_readcert): Return NOT_FOUND if the retrieved
4 data has a length of zero.
5 (do_getattr): Add EXTCAP subkey "sm".
7 2009-05-20 Werner Koch <wk@g10code.com>
9 * app-openpgp.c (verify_chv2): Add case for v2 cards.
10 (verify_chv3): Factor some code out to ..
11 (build_enter_admin_pin_prompt): .. new.
12 (do_change_pin): Properly handle v2 cards.
14 2009-05-19 Werner Koch <wk@g10code.com>
16 * scdaemon.c (create_server_socket): Use SUN_LEN.
17 (JNLIB_NEED_AFLOCAL): Define.
19 2009-05-13 Werner Koch <wk@g10code.com>
21 * ccid-driver.c (abort_cmd): Add arg SEQNO and change callers.
22 (bulk_in): Retry on seqno mismatch.
24 * apdu.c (send_le): Release result_buffer.
25 (apdu_send_direct): Implemend extended length.
26 * command.c (cmd_apdu): Add option "--exlen".
28 2009-05-11 Werner Koch <wk@g10code.com>
30 * apdu.c (send_le): Replace log_error by log_info.
32 2009-05-08 Werner Koch <wk@g10code.com>
34 * app-openpgp.c (do_genkey): Allow larger key sizes.
36 * iso7816.c (do_generate_keypair): Add arg EXTENDED_MODE an LE.
37 (iso7816_generate_keypair, iso7816_read_public_key): Ditto.
39 * apdu.c (send_le): Implement extended length return values.
41 * ccid-driver.c (bulk_in): Retry on EAGAIN.
42 (abort_cmd): Change seqno handling.
44 2009-04-28 Werner Koch <wk@g10code.com>
46 * app-help.c (app_help_count_bits): New.
48 * app-nks.c (switch_application): Detect mass signature cards.
49 Take care of new NEED_APP_SELECT flag.
50 (do_sign): Don't allow mass signature cards.
53 (app_select_nks): Register do_readkey.
55 2009-04-01 Werner Koch <wk@g10code.com>
57 * app-openpgp.c (do_setattr, do_writekey): Prepare for extended
60 2009-03-31 Werner Koch <wk@g10code.com>
62 * command.c (percent_plus_unescape): Remove.
63 (cmd_setattr): Use percent_plus_unescape_inplace.
65 2009-03-30 Werner Koch <wk@g10code.com>
67 * app-nks.c (do_decipher): Make it work for TCOS 3.
68 * iso7816.c (iso7816_decipher): Add arg EXTENDED_MODE.
69 * apdu.c (apdu_send): Add arg EXTENDED_MODE and change all callers.
70 (apdu_send_le): Ditto.
71 (apdu_send_direct): Ditto, but not yet functional.
72 (send_le): Fix command chaining. Implement extended length option.
73 * ccid-driver.c (ccid_transceive): Remove restriction on apdu length.
74 (struct ccid_driver_s): Add field IFSC.
75 (ccid_get_atr): Set IFSC.
76 (ccid_transceive): Use negotiated IFSC and support S(IFS) command.
78 2009-03-26 Werner Koch <wk@g10code.com>
80 * command.c (cmd_pksign): Allow more hash algorithms.
82 * scdaemon.h (MAX_DIGEST_LEN): Change to 64.
84 * apdu.c (open_ccid_reader): Clear the is_to flag.
86 * app-nks.c (filelist): Add field KID.
87 (do_getattr): Change standard authentication key.
88 (do_sign): Setup a security environment for TCOS 3 cards and support
91 2009-03-24 Werner Koch <wk@g10code.com>
93 * command.c (struct server_local_s): Add flag
94 APP_CTX_MARKED_FOR_RELEASE.
95 (do_reset): Set the flag.
96 (open_card): Act on this flag.
97 * app-common.h (struct app_ctx_s): Add flag NO_REUSE.
98 (application_notify_card_reset): Set the flag.
99 * app.c (select_application, release_application): Take care of
102 2009-03-20 Werner Koch <wk@g10code.com>
104 * app-nks.c (keygripstr_from_pk_file): Fix for TCOS 3 cards.
106 2009-03-18 Werner Koch <wk@g10code.com>
108 * apdu.c (open_pcsc_reader_wrapped): Use close_all_fds.
110 * command.c (cmd_learn): Add option --keypairinfo.
111 * app.c (app_write_learn_status): Add arg FLAGS.
112 * app-common.h (struct app_ctx_s): Add arg FLAGS to LEARN_STATUS.
113 Change all implementors.
114 * app-p15.c (do_learn_status): Take care of flag bit 0.
115 * app-nks.c (do_learn_status, do_learn_status_core): Ditto.
117 2009-03-10 Werner Koch <wk@g10code.com>
119 * app-openpgp.c (send_key_attr): New.
120 (do_getattr): New attribute KEY_ATTR.
121 * command.c (send_status_direct): New.
123 2009-03-06 Werner Koch <wk@g10code.com>
125 * app-nks.c (do_learn_status): Factor code out to..
126 (do_learn_status_core): .. new.
127 (do_readcert, do_sign, do_decipher): Switch to SigG if needed.
128 (verify_pin): Use DESC also for keypad based verify.
130 2009-03-05 Werner Koch <wk@g10code.com>
132 * app-openpgp.c (verify_a_chv): Remove special case for keypads.
133 (verify_chv3): Ditto.
135 * app-nks.c (get_chv_status): New.
136 (parse_pwidstr): New.
137 (verify_pin): Add args PWID and DESC and use them. Remove the
139 (do_change_pin): Allow PIN selection and add reset mode.
140 (do_learn_status): Use NKS-NKS3 tag for TCOS 3 cards.
141 (do_readcert, do_sign): Allow NKS-NKS3 tag.
143 2009-03-04 Werner Koch <wk@g10code.com>
145 * app-nks.c (do_getattr): New.
146 (app_select_nks): Register it.
147 (verify_pin): Factor some code out to...
148 (basic_pin_checks): New.
149 (do_change_pin): Call the basic check.
150 (app_select_nks): Move AID to ..
153 (switch_application): New.
154 (do_getattr, do_learn_status, do_readcert, do_sign, do_decipher)
155 (do_change_pin, do_check_pin): Make sure we are in NKS mode.
157 2009-03-03 Werner Koch <wk@g10code.com>
159 * command.c (scd_command_handler): Remove dereference of STOPME
162 2009-02-27 Werner Koch <wk@g10code.com>
164 * app.c (get_supported_applications): New.
165 * command.c (cmd_getinfo): New subcommand "app_list"
167 (register_commands): Register command KILLSCD.
168 (struct server_local_s): Add field STOPME.
169 (scd_command_handler): Act upon this.
171 2009-02-25 Werner Koch <wk@g10code.com>
173 * apdu.c (apdu_get_status): Factor all code out to ...
174 (apdu_private_get_status): .. new. Add arg NO_ATR_RESET.
175 (apdu_connect): Call new function.
177 * scdaemon.c: New option --debug-log-tid.
178 (tid_log_callback): New.
179 (main): Move debug-wait code after debug stream init.
181 2009-02-24 Werner Koch <wk@g10code.com>
183 * ccid-driver.c (ccid_get_atr): Move debug output to ..
184 (print_r2p_parameters): .. new.
185 (print_r2p_header, print_pr_data, print_r2p_unknown)
186 (print_r2p_datablock, print_r2p_slotstatus, print_r2p_escape)
187 (print_r2p_datarate): New.
188 (bulk_in): Call parameter printing.
189 (ccid_set_debug_level): Add debug level 3.
190 (convert_le_u16): New.
191 (print_p2r_header, print_p2r_iccpoweron, print_p2r_iccpoweroff)
192 (print_p2r_getslotstatus, print_p2r_xfrblock)
193 (print_p2r_getparameters, print_p2r_resetparameters)
194 (print_p2r_setparameters, print_p2r_escape, print_p2r_iccclock)
195 (print_p2r_to0apdu, print_p2r_secure, print_p2r_mechanical)
196 (print_p2r_abort, print_p2r_setdatarate, print_r2p_unknown): New.
197 (bulk_out): Add arg NO_DEBUG and change all callers to pass 0.
198 Call parameter printing.
199 (ccid_slot_status): Call with NO_DEBUG set.
200 (abort_cmd, send_escape_cmd, ccid_get_atr, ccid_get_atr)
201 (ccid_transceive_apdu_level, ccid_transceive)
202 (ccid_transceive_secure): Remove old debug print code.
204 2009-02-12 Werner Koch <wk@g10code.com>
206 * command.c (cmd_getinfo): Add new subcommand "deny_admin".
208 2009-01-28 Werner Koch <wk@g10code.com>
210 * scdaemon.c (main): Make --allow-admin the default and make the
213 2009-01-27 Werner Koch <wk@g10code.com>
215 * app-geldkarte.c: Changed to use an AID.
217 * app.c (app_munge_serialno): Add case for no serialno.
218 (app_get_serial_and_stamp): Ditto.
220 2009-01-26 Werner Koch <wk@g10code.com>
222 * app-geldkarte.c: New.
223 * Makefile.am (card_apps): Add new file.
224 * app.c (select_application): Test for geldkarte.
226 2009-01-12 Werner Koch <wk@g10code.com>
228 * command.c (send_client_notifications) [HAVE_W32_SYSTEM]: Fix
231 2009-01-08 Werner Koch <wk@g10code.com>
233 * iso7816.c (iso7816_read_record, iso7816_read_binary): Pass 0 for
234 L_e because the problem with the CCID driver has gone.
235 (iso7816_apdu_direct): New.
237 * app-nks.c (filelist): Add NKS_VER field. Add NKS 3 specific
239 (app_local_s, do_deinit): New.
240 (get_nks_version): New.
241 (app_select_nks): Setup local data.
242 (keygripstr_from_pk_file): Replace SLOT by APP and take care of
244 (do_learn_status): Take care of NKS version.
246 2009-01-05 Werner Koch <wk@g10code.com>
248 * apdu.c (apdu_get_status): Save the last status.
250 2008-12-18 Werner Koch <wk@g10code.com>
252 * ccid-driver.c (abort_cmd): New.
253 (bulk_in): Call abort_cmd after severe errors.
255 * apdu.c (reader_table_s): Add field ANY_STATUS.
256 (new_reader_slot): Clear it.
257 (apdu_get_status): Use ANY_STATUS to update the change counter.
258 Remove the use of the flag bit from LAST_STATUS everywhere.
259 * command.c (update_reader_status_file): Factor code out to ...
260 (send_client_notifications): New. Track signals already sent.
261 (update_reader_status_file): Shutdown the reader after a failed
264 2008-12-09 Werner Koch <wk@g10code.com>
266 * scdaemon.c (main): Call i18n_init before init_common_subsystems.
268 2008-12-08 Werner Koch <wk@g10code.com>
270 * scdaemon.c (handle_connections): Sync ticker to the next full
272 (TIMERTICK_INTERVAL_USEC): Change to 500ms.
274 2008-12-05 Werner Koch <wk@g10code.com>
276 * app-openpgp.c (app_local_s): Add field ALGO_ATTR_CHANGE.
277 (app_select_openpgp): Parse new capability.
278 (show_caps): Show new capability.
280 2008-12-03 Werner Koch <wk@g10code.com>
282 * scdaemon.c (opts): Use ARGPARSE_ macros. Add option
284 * command.c (update_reader_status_file): Implement it.
286 2008-11-18 Werner Koch <wk@g10code.com>
288 * scdaemon.c (make_libversion): New.
289 (my_strusage): Print libgcrypt and libksba version.
291 2008-11-03 Werner Koch <wk@g10code.com>
293 * command.c (server_local_s): Add field DISCONNECT_ALLOWED.
294 (cmd_disconnect): Implement command.
295 (open_card): Reset disconnect flag.
296 (update_reader_status_file): Disconnect if allowed.
298 * app-common.h (app_ctx_s): Remove INITIALIZED. Make REF_COUNT
300 * app.c (select_application): Remove INITIALIZED.
301 (app_write_learn_status, app_readcert, app_readkey, app_getattr)
302 (app_setattr, app_sign, app_decipher, app_writecert)
303 (app_writekey, app_get_challenge, app_change_pin, app_check_pin):
304 Replace INITIALIZED by REF_COUNT check.
305 (application_notify_card_removed): Rename to ..
306 (application_notify_card_reset): .. this. Change all callers.
307 * command.c (do_reset): Call application_notify_card_reset after
309 (update_reader_status_file): Add arg SET_CARD_REMOVED.
310 (scd_update_reader_status_file): Pass true for new flag.
311 (do_reset): Pass false for new flag.
313 * app.c (app_get_serial_and_stamp): Use bin2hex.
314 * app-help.c (app_help_get_keygrip_string): Ditto.
315 * app-p15.c (send_certinfo, send_keypairinfo, do_getattr): Ditto.
316 * app-openpgp.c (send_fpr_if_not_null, send_key_data)
317 (retrieve_fpr_from_card, send_keypair_info): Ditto.
318 * app-nks.c (keygripstr_from_pk_file): Ditto.
319 * command.c (cmd_apdu): Ditto.
321 2008-10-21 Marcus Brinkmann <marcus@g10code.com>
323 * command.c (open_card): If connect error is SW_HOST_NO_CARD,
324 return a more descriptive error.
326 2008-10-20 Werner Koch <wk@g10code.com>
328 * pcsc-wrapper.c (read_32): Use provided arg and not stdin. Is
329 called with stdin, though.
330 (handle_close): Mark unused arg.
331 (handle_status, handle_reset): Ditto.
333 * ccid-driver.c (ccid_check_card_presence): Mark not yet used arg.
335 * scdaemon.c (scd_deinit_default_ctrl): Mark unused arg.
336 * command.c (cmd_unlock, cmd_restart, cmd_disconnect): Ditto.
337 * apdu.c (ct_get_status): Ditto.
338 (ct_send_apdu, pcsc_send_apdu_wrapped)
339 (apdu_open_remote_reader): Ditto.
340 * app.c (select_application): Ditto.
341 * app-openpgp.c (do_writecert, do_change_pin, do_writekey): Ditto.
342 * app-nks.c (do_change_pin, do_check_pin): Ditto.
344 2008-10-16 Werner Koch <wk@g10code.com>
346 * command.c (cmd_disconnect): New dummy command.
347 (register_commands): Register command.
349 2008-10-15 Werner Koch <wk@g10code.com>
351 * command.c (scd_command_handler): Return true if there is no more
353 * scdaemon.c (start_connection_thread): Set shutdown flag if
354 requested by command handler.
355 (main): Make PIPE_SERVER module global.
356 (handle_connections): Disable listen_fd if a shutdown is pending.
358 2008-10-14 Werner Koch <wk@g10code.com>
360 * apdu.c (reader_table_s): Add fields connect_card and
362 (new_reader_slot): Set them to NULL.
363 (apdu_connect, apdu_disconnect): New.
364 (apdu_close_reader, apdu_shutdown_reader): Call apdu_disconnect.
365 (connect_pcsc_card, disconnect_pcsc_card): new.
366 (reset_pcsc_reader_direct): Implement in terms of
367 disconnect_pcsc_card and connect_pcsc_card.
368 (apdu_get_atr): Return NULL if there is no ATR.
369 * sc-copykeys.c (main): Add call to apdu_connect.
370 * command.c (open_card): Ditto.
372 * apdu.h (SW_HOST_ALREADY_CONNECTED): New.
373 (APDU_CARD_USABLE, APDU_CARD_PRESENT, APDU_CARD_ACTIVE): New.
374 * apdu.c: Replace constants by the new macros.
375 (open_pcsc_reader): Factor code out to ...
376 (open_pcsc_reader_direct, open_pcsc_reader_wrapped): New.
377 (reset_pcsc_reader): Factor code out to ...
378 (reset_pcsc_reader_direct, reset_pcsc_reader_wrapped): New.
379 (pcsc_get_status): Factor code out to ...
380 (pcsc_get_status_direct, pcsc_get_status_wrapped): New.
381 (pcsc_send_apdu): Factor code out to ...
382 (pcsc_send_apdu_direct, pcsc_send_apdu_wrapped): New.
383 (close_pcsc_reader): Factor code out to ...
384 (close_pcsc_reader_direct, close_pcsc_reader_wrapped): New.
386 * command.c (update_reader_status_file): Open the reader if not
389 * scdaemon.c (TIMERTICK_INTERVAL_SEC, TIMERTICK_INTERVAL_USEC):
390 New to replace TIMERTICK_INTERVAL. Chnage from 2s (4 under W32)
393 2008-10-13 Werner Koch <wk@g10code.com>
395 * command.c (option_handler) [W32]: Use strtoul with base 16.
396 (update_reader_status_file) [W32]: Set Event.
397 (scd_command_handler): Use INT2FD to silent warning.
399 2008-09-29 Werner Koch <wk@g10code.com>
401 * scdaemon.h (GCRY_MD_USER): Rename to GCRY_MODULE_ID_USER.
402 (GCRY_MD_USER_TLS_MD5SHA1): Rename to MD_USER_TLS_MD5SHA1 and
405 2008-09-28 Marcus Brinkmann <marcus@g10code.com>
407 * apdu.c (pcsc_get_status): Fix last change.
409 2008-09-25 Werner Koch <wk@g10code.com>
411 * app-openpgp.c (do_setattr): Do not allow setting of the reset
413 (do_change_pin): Allow setting of the reset code.
415 2008-09-24 Werner Koch <wk@g10code.com>
417 * app-openpgp.c (verify_chv3): Set the did_chv3 flag which was
418 accidently removed on 2008-03-26.
419 (verify_chv2): Revert last change.
420 (do_change_pin): Do not change CHV2. Add reset code logic for v2
422 * iso7816.c (iso7816_reset_retry_counter_with_rc): New.
424 * app-openpgp.c (add_tlv, build_privkey_template): New.
425 (do_writekey): Support v2 keys and other key lengths than 1024.
426 * iso7816.c (iso7816_put_data_odd): New.
428 2008-09-23 Werner Koch <wk@g10code.com>
430 * app-openpgp.c (do_sign): Support SHA-2 digests.
431 (verify_chv2): No CHV auto-sync for v2 cards.
432 (do_auth): Allow 2048 bit keys.
433 (parse_algorithm_attribute): New.
434 (rsa_key_format_t): New.
435 (struct app_local_s): Add struct KEYATTR.
437 2008-09-23 Marcus Brinkmann <marcus@g10code.com>
439 * apdu.c (pcsc_get_status): Be more relaxed with the usable flag
442 2008-09-23 Werner Koch <wk@g10code.com>
444 * app-openpgp.c (do_setattr): Use command chaining for long
446 * iso7816.c (iso7816_put_data): Add arg EXTENDED_MODE. Change all
448 * apdu.c (apdu_send_simple): Add arg EXTENDED_MODE. Change all
450 (send_le): Implement command chaining.
451 * ccid-driver.c (ccid_transceive_apdu_level): Increase allowed
453 (ccid_transceive): Alow for APDUS of up to 259 bytes.
454 * apdu.h: Add new SW_ codes.
456 2008-09-16 Werner Koch <wk@g10code.com>
458 * command.c (cmd_writecert): New.
459 (register_commands): Register it.
460 * app-common.h (app_ctx_s): Add member WRITECERT.
461 * app.c (app_writecert): New.
462 * app-openpgp.c (do_writecert): New.
463 (parse_historical): New.
465 (dump_all_do): Print only the length of longs DOs.
466 * command.c (cmd_writekey, cmd_apdu, cmd_pksign)
467 (cmd_passwd): Replace open coding by skip_options.
469 2008-08-30 Moritz <moritz@gnu.org>
471 * scdaemon.c (main): Use estream_asprintf instead of asprintf.
472 * command.c (update_reader_status_file): Likewise.
473 (cmd_serialno): Use estream_asprintf instead of asprintf
474 and xfree instead of free to release memory allocated
475 through (estream_)asprintf.
476 (cmd_learn): Likewise.
478 * app-openpgp.c (get_public_key): Likewise.
480 2008-08-18 Werner Koch <wk@g10code.com>
482 * app-openpgp.c (do_setattr): Fix test for v2 cards.
484 2008-08-11 Werner Koch <wk@g10code.com>
486 * apdu.c (reset_pcsc_reader, open_pcsc_reader)
487 (reset_rapdu_reader, open_rapdu_reader): Allow ATRs of up to 33
488 bytes. Provide maximum size of ATR buffer using DIM. Such long
489 ATR are never seen in reality but the PC/SC library of MAC OS X is
490 just too buggy. Reported by Ludovic Rousseau. Fixes bug #948.
492 2008-07-30 Werner Koch <wk@g10code.com>
494 * app-openpgp.c (verify_a_chv): Use xtrymalloc and make the prompt
495 for CHV2 more user friendly.
497 2008-07-03 Werner Koch <wk@g10code.com>
499 * app-openpgp.c (do_readcert): New.
500 (app_local_s): Add fields IS_V2 and MAX_CERTLEN_3.
501 (app_select_openpgp): Set them and register do_readcert.
502 (do_setattr): Allow storing of the certificate.
504 2008-06-25 Werner Koch <wk@g10code.com>
506 * app-dinsig.c (do_sign): Allow for SHA256.
508 2008-06-24 Werner Koch <wk@g10code.com>
510 * app-common.h (app_ctx_s): Renamed reset_mode parameter of
511 change_pin to mode_Flags and make it an unsigned int.
512 (APP_CHANGE_FLAG_RESET, APP_CHANGE_FLAG_NULLPIN): New.
513 * app-openpgp.c (do_change_pin): Adjust for that.
515 * command.c (cmd_passwd): Add option --nullpin.
516 * app-nks.c (do_check_pin, do_change_pin): New.
517 (app_select_nks): Register new functions.
519 2008-04-21 Moritz Schulte <mo@g10code.com> (wk)
521 * app-openpgp.c (verify_a_chv): Make use of the default CHV flag.
523 2008-03-26 Werner Koch <wk@g10code.com>
525 * app-openpgp.c (verify_chv3): Support the keypad.
527 2008-02-09 Marcus Brinkmann <marcus@g10code.de>
529 * scdaemon.c (main): Use CONFIG_FILENAME as filename if it is set
530 in gpgconf-list output.
532 2007-12-10 Werner Koch <wk@g10code.com>
534 * app-openpgp.c (do_decipher): Take care of cryptograms shorter
535 that 128 bytes. Fixes bug#851.
537 2007-11-14 Werner Koch <wk@g10code.com>
539 * scdaemon.c (main): Pass STANDARD_SOCKET flag to
540 create_server_socket.
542 2007-11-13 Werner Koch <wk@g10code.com>
544 * scdaemon.c (start_connection_thread): Do not call
545 assuan_sock_check_nonce if we are running in --server mode.
547 2007-11-07 Werner Koch <wk@g10code.com>
549 * scdaemon.h: Remove errors.h.
551 2007-10-02 Werner Koch <wk@g10code.com>
553 * command.c (cmd_getinfo): Add "pid" subcommand.
555 2007-10-01 Werner Koch <wk@g10code.com>
557 * scdaemon.c (create_server_socket): Use Assuan socket wrappers
558 and remove Windows specific code.
560 (start_connection_thread): Check nonce.
562 2007-09-14 Marcus Brinkmann <marcus@g10code.de>
564 * scdaemon.c (main): New variable STANDARD_SOCKET, which is 1 for
565 W32 targets. Use it for create_socket_name.
567 2007-08-07 Werner Koch <wk@g10code.com>
569 * tlv.c, tlv.h: Move to ../common/.
571 2007-08-02 Werner Koch <wk@g10code.com>
573 * scdaemon.c: Include gc-opt-flags.h and remove their definition
576 2007-08-01 Werner Koch <wk@g10code.com>
578 * apdu.c (send_le): Implement exact length hack. Suggested by
581 2007-07-05 Werner Koch <wk@g10code.com>
583 * command.c (has_option_name, skip_options): New.
584 (cmd_genkey): Add option --timestamp.
585 (cmd_writekey): Enter confidential mode while inquiring the key data.
587 * app.c (app_genkey): Add arg CREATETIME.
588 * app-common.h (app_ctx_s): Likewise
589 * app-openpgp.c (do_genkey): Ditto. Use it.
592 2007-07-04 Werner Koch <wk@g10code.com>
594 * command.c (cmd_getinfo): New subcommand "version".
596 * scdaemon.c (TIMERTICK_INTERVAL): New.
597 (handle_connections) [W32]: Enable a dummy sigs event.
598 (handle_connections): Use a proper count for select and not
600 (fixed_gcry_pth_init, main): Kludge to fix pth initialization.
602 2007-06-21 Werner Koch <wk@g10code.com>
604 * scdaemon.h (ctrl_t): Remove. It is now declared in ../common/util.h.
606 2007-06-18 Marcus Brinkmann <marcus@g10code.de>
608 * scdaemon.c (main): Percent escape output of --gpgconf-list.
610 2007-06-12 Werner Koch <wk@g10code.com>
612 * scdaemon.c (main): Replace some calls by init_common_subsystems.
614 2007-06-11 Werner Koch <wk@g10code.com>
616 * Makefile.am (scdaemon_LDADD): Use libcommonpth macro.
618 * command.c (initialize_module_command): New.
619 * scdaemon.c (main) [W32]: Do not use sigpipe code.
620 (main): Call initialize_module_command.
622 2007-06-06 Werner Koch <wk@g10code.com>
624 * app-openpgp.c (do_sign): Fix arithmetic on void*.
626 * app.c (dump_mutex_state) [W32]: Handle the W32Pth case.
628 * apdu.c: Remove dynload.h.
630 * scdaemon.c (i18n_init): Remove.
632 2007-04-20 Werner Koch <wk@g10code.com>
634 * sc-copykeys.c (my_gcry_logger): Removed.
635 (main): Call setup_libgcrypt_logging helper.
636 * scdaemon.c (my_gcry_logger): Removed.
637 (main): Call setup_libgcrypt_logging helper.
639 2007-04-03 Werner Koch <wk@g10code.com>
641 * command.c (cmd_getinfo): New subcommand "reader_list".
642 * ccid-driver.c (scan_or_find_devices): Ignore EBUSY in scan mode
643 for special transports.
645 2007-03-07 Werner Koch <wk@g10code.com>
647 * app-dinsig.c: Include i18n.h.
648 (verify_pin): Support PIN pads.
649 * app-nks.c (verify_pin): Ditto.
651 * ccid-driver.c (bulk_in): Handle time extension before checking
653 (ccid_transceive_secure): Support the Cherry XX44 keyboard.
654 Kudos to the nice folks at Cherry for helping with that.
656 2007-02-18 Werner Koch <wk@g10code.com>
658 * scdaemon.c (DEFAULT_PCSC_DRIVER): Add a default for OS X.
660 2007-01-25 Werner Koch <wk@g10code.com>
662 * Makefile.am (scdaemon_LDADD): Added LIBICONV. Noted by Billy
665 2006-12-21 Werner Koch <wk@g10code.com>
667 * app-openpgp.c (verify_chv2): Factored most code out into...
668 (verify_a_chv): ... new.
669 (do_sign): Factored verification code out to new function and
670 take care of a keypad entered PIN.
671 (compare_fingerprint): Print an additional diagnostic.
673 2006-11-28 Werner Koch <wk@g10code.com>
675 * apdu.c (send_le, apdu_send_direct): Increase RESULTLEN to 258 to
676 allow for full 256 byte and the status word. This might break
677 some old PC/SC drivers or cards, but we will see. Suggested by
680 2006-11-23 Werner Koch <wk@g10code.com>
682 * command.c (scd_command_handler): Fixed use of CTRL.
684 2006-11-21 Werner Koch <wk@g10code.com>
686 * Makefile.am (libexec_PROGRAMS): Put pscs-wrapper into libexec.
687 Renamed to gnupg-pcsc-wrapper.
688 * apdu.c (open_pcsc_reader): Use GNUPG_LIBEXECDIR to accces the
689 wrapper. Suggested by Eric Dorland.
691 2006-11-20 Werner Koch <wk@g10code.com>
693 * app-openpgp.c (verify_chv2): Support for keypads (only CHV2).
695 * ccid-driver.c (ccid_transceive_secure): Made it work for Kaan
698 2006-11-17 Werner Koch <wk@g10code.com>
700 * ccid-driver.c (scan_or_find_devices): Use DEBUGOUT_2 instead of
701 log_debug. Removed few other log_debug.
703 * iso7816.c (iso7816_check_keypad): Allow for a SW of 0.
705 * command.c (pin_cb): New mode to prompt for a keypad entry.
707 * scdaemon.c (main) <gpgconf-list>: Add disable-keypad.
709 2006-11-15 Werner Koch <wk@g10code.com>
711 * app-p15.c (read_ef_odf): Cast one printf arg.
713 * scdaemon.h (struct server_control_s): Add field THREAD_STARTUP.
714 * command.c (scd_command_handler): Add new arg CTRL.
715 * scdaemon.c (scd_init_default_ctrl): Made static.
716 (scd_deinit_default_ctrl): New.
717 (start_connection_thread): Call init/deinit of ctrl.
718 (handle_connections): Allocate CTRL.
720 * apdu.c (PCSC_ERR_MASK): New.
721 (reset_pcsc_reader, pcsc_get_status, pcsc_send_apdu)
722 (close_pcsc_reader, open_pcsc_reader): Use it after shifting error
723 values. Reported by Henrik Nordstrom. Fixes bug #724.
725 2006-10-24 Werner Koch <wk@g10code.com>
727 * scdaemon.h (GCRY_MD_USER_TLS_MD5SHA1): New.
728 (MAX_DIGEST_LEN): Increased to 36.
729 * app-p15.c (do_sign): Support for TLS_MD5SHA1.
730 (do_auth): Detect TLS_MD5SHA1.
731 (do_sign): Tweaks for that digest.
733 2006-10-23 Werner Koch <wk@g10code.com>
735 * scdaemon.c (main): New command --gpgconf-test.
737 2006-10-17 Werner Koch <wk@g10code.com>
739 * Makefile.am (scdaemon_LDADD): Link against libcommonpth.
741 2006-10-12 Werner Koch <wk@g10code.com>
743 * apdu.c: Include pth.h after unistd.h for the sake of newer Pth
746 2006-10-11 Werner Koch <wk@g10code.com>
748 * app-openpgp.c (do_sign): Redirect to do_auth for OpenPGP.3.
750 2006-10-06 Werner Koch <wk@g10code.com>
752 * Makefile.am (AM_CFLAGS): Use PTH version of libassuan.
753 (scdaemon_LDADD): Ditto.
755 * scdaemon.h (send_status_info): Mark with sentinel attribute.
757 2006-10-02 Marcus Brinkmann <marcus@g10code.de>
759 * command.c (update_reader_status_file): Increase buffer of
760 NUMBUF2 (fixing typo).
762 2006-09-24 Marcus Brinkmann <marcus@g10code.de>
764 * app-openpgp.c (do_sign): Advance INDATA by the SHA1 resp. RMD160
767 2006-09-14 Werner Koch <wk@g10code.com>
769 Replaced all call gpg_error_from_errno(errno) by
770 gpg_error_from_syserror().
772 * command.c (scd_command_handler): Replaced
773 init_connected_socket_server by init_socket_server_ext.
775 2006-09-07 Werner Koch <wk@g10code.com>
777 * command.c (update_reader_status_file): Execute an event handler
780 2006-09-06 Werner Koch <wk@g10code.com>
782 * apdu.c (pcsc_end_transaction):
783 * pcsc-wrapper.c (pcsc_end_transaction: Fixed dclaration.
784 Reported by Bob Dunlop.
786 * scdaemon.h (CTRL,APP): Removed and changed everywhere to
789 Replaced all Assuan error codes by libgpg-error codes. Removed
790 all map_to_assuan_status and map_assuan_err.
792 * scdaemon.c (main): Call assuan_set_assuan_err_source to have Assuan
793 switch to gpg-error codes.
794 * command.c (set_error): Adjusted.
796 2006-09-02 Marcus Brinkmann <marcus@g10code.de>
798 * command.c (get_reader_slot): Return the slot_table index, not
799 the APDU slot number.
800 (update_reader_status_file): Use the slot_table index in the
801 update_card_removed invocation.
803 2006-09-01 Marcus Brinkmann <marcus@g10code.de>
805 * command.c (cmd_getinfo): Handle status command.
807 2006-08-30 Marcus Brinkmann <marcus@g10code.de>
809 * command.c (do_reset): Delay resetting CTRL->reader_slot until
810 after update_card_removed invocation.
812 2006-08-28 Marcus Brinkmann <marcus@g10code.de>
814 * app-openpgp.c (do_decipher, do_sign): Allow "OPENPGP.2"
815 resp. "OPENPGP.1" for KEYIDSTR.
817 2006-08-21 Werner Koch <wk@g10code.com>
819 * pcsc-wrapper.c (handle_open, handle_close): Reset card and
820 protocol on error/close.
821 (handle_status): Don't set the state if the state is unknown.
822 (handle_reset): Ignore an error if already disconnected. May
823 happen due to system wake-up after hibernation. Suggested by Bob
826 2006-06-28 Werner Koch <wk@g10code.com>
828 * app-openpgp.c (do_writekey): Fixed computation of memmove
829 length. This led to garbled keys if E was larger than one byte.
830 Thanks to Achim Pietig for hinting at the garbled E.
832 2006-06-09 Marcus Brinkmann <marcus@g10code.de>
834 * Makefile.am (scdaemon_LDADD): Add $(NETLIBS).
836 2006-04-14 Marcus Brinkmann <marcus@g10code.de>
838 * app.c (select_application): Cover up a slot mismatch error in
839 case it happens (it shouldn't happen).
840 (release_application): Use APP->slot. Lock the reader.
841 (application_notify_card_removed): Lock the reader.
843 2006-04-11 Werner Koch <wk@g10code.com>
845 * command.c (hex_to_buffer): New.
848 2006-04-03 Werner Koch <wk@g10code.com>
850 * scdaemon.c [__GLIBC__]: Default to libpcsclite.so.1.
852 2006-03-21 Werner Koch <wk@g10code.com>
854 * command.c (cmd_pksign): Add --hash option.
856 2006-03-01 Werner Koch <wk@g10code.com>
858 * command.c (status_file_update_lock): New.
859 (scd_update_reader_status_file): Use lock and factor existing code
861 (update_reader_status_file): .. this.
862 (do_reset): Use the lock and call update_reader_status_file.
864 2006-02-20 Werner Koch <wk@g10code.com>
866 * apdu.c (open_pcsc_reader): Fixed double free. Thanks to Moritz.
868 2006-02-09 Werner Koch <wk@g10code.com>
870 * command.c (get_reader_slot, do_reset)
871 (scd_update_reader_status_file): Rewrote.
873 * app.c (release_application): Factored code out to ..
874 (deallocate_app): new function.
875 (select_application): Introduce new saved application stuff.
876 (application_notify_card_removed): New.
877 * command.c (update_card_removed): Call it here.
878 (do_reset): And here.
880 * app.c (check_application_conflict): New.
881 * command.c (open_card): Use it here.
882 (cmd_restart): New command.
884 * command.c (cmd_lock): Fixed --wait option to actually terminate.
886 2006-02-08 Werner Koch <wk@g10code.com>
888 * ccid-driver.c (ccid_get_atr): Read Parameter and select T=1
889 using these parameters.
890 (scan_or_find_devices): Check for NULL r_fd.
892 2006-02-02 Werner Koch <wk@g10code.com>
894 * ccid-driver.c (special_transport): New
895 (ccid_open_reader, do_close_reader, ccid_shutdown_reader)
896 (bulk_out, bulk_in): Add support for CardMan 4040 reader.
898 * ccid-driver.c (scan_or_find_devices): Factored most code out to
899 (scan_or_find_usb_device): .. new.
900 (make_reader_id): Fixed vendor mask.
902 2006-01-01 Werner Koch <wk@g10code.com>
904 * app-openpgp.c (do_sign): Give user error if hash algorithm is
905 not supported by the card.
907 2005-12-06 Werner Koch <wk@g10code.com>
909 * apdu.c (open_pcsc_reader): Check that pcsc-wrapper is actually
912 2005-11-23 Werner Koch <wk@g10code.com>
914 * app-nks.c (verify_pin): Give a special error message for a Nullpin.
916 2005-10-29 Werner Koch <wk@g10code.com>
918 * ccid-driver.c (send_escape_cmd): New args RESULT, RESULTLEN and
919 RESULTMAX. Changed all callers.
920 (ccid_transceive_escape): New.
922 2005-10-27 Werner Koch <wk@g10code.com>
924 * apdu.c [__CYGWIN__]: Make cygwin environment similar to _WIN32.
925 Suggested by John P. Clizbe.
926 * scdaemon.c [__CYGWIN__]: Set default PC/SC driver to winscard.dll.
928 2005-10-19 Werner Koch <wk@g10code.com>
930 * ccid-driver.h (CCID_DRIVER_ERR_NO_KEYPAD): New.
931 * apdu.h (SW_HOST_NO_KEYPAD): New.
932 * iso7816.h (struct iso7816_pininfo_s): New.
933 * iso7816.c (map_sw): Support new code.
934 (iso7816_check_keypad): New.
935 (iso7816_verify_kp, iso7816_change_reference_data_kp)
936 (iso7816_reset_retry_counter_kp): New. Extended versions of the
938 * apdu.c (host_sw_string): Support new code.
939 (reader_table_s): New field CHECK_KEYPAD.
940 (new_reader_slot, open_ct_reader, open_pcsc_reader)
941 (open_ccid_reader, open_rapdu_reader): Initialize it.
942 (check_ccid_keypad): New.
943 (apdu_check_keypad): New.
944 (apdu_send_le): Factored all code out to ...
945 (send_le): .. new. Takes an additional arg; changed all callers
946 of the orginal function to use this one with a NULL for the new
948 (apdu_send_simple_kp): New.
949 (ct_send_apdu, pcsc_send_apdu, my_rapdu_send_apdu)
950 (send_apdu_ccid): New arg PININFO.
951 (send_apdu_ccid): Use the new arg.
953 * scdaemon.c: New option --disable-keypad.
955 2005-10-08 Marcus Brinkmann <marcus@g10code.de>
957 * Makefile.am (scdaemon_LDADD): Add ../gl/libgnu.a after
958 ../common/libcommon.a.
960 2005-09-20 Werner Koch <wk@g10code.com>
962 * app-dinsig.c (verify_pin): Try ISO 9564 BCD encoding.
964 * iso7816.c (iso7816_select_application): Add arg FLAGS. Changed
965 all callers to pass 0.
966 * app-openpgp.c (app_select_openpgp): But this one requires a
969 * app-p15.c (app_select_p15): Don't use select application for the
972 2005-09-09 Werner Koch <wk@g10code.com>
974 * pcsc-wrapper.c (main): Removed bogus free.
976 * app-p15.c (do_auth): New.
977 (do_getattr): New attribs $AUTHKEYID and $DISPSERIALNO.
978 * app-openpgp.c (do_getattr): Ditto.
980 2005-09-08 Werner Koch <wk@g10code.com>
982 * app-openpgp.c (do_getattr): New key $AUTHKEYID.
984 2005-09-06 Werner Koch <wk@g10code.com>
986 * app-p15.c (do_sign): Tweaked for BELPIC cards.
987 (read_home_df): New arg R_BELPIC.
988 (app_select_p15): Set card type for BELPIC.
990 2005-09-05 Werner Koch <wk@g10code.com>
992 * iso7816.c (iso7816_select_path): New.
993 * app-p15.c (select_ef_by_path): Allow for direct path selection.
994 (app_select_p15): Try using the Belgian variant of pkcs#15.
996 (read_ef_odf): Generalized.
997 (read_ef_tokeninfo): New.
998 (read_p15_info): Set serialnumber from TokenInfo.
999 (app_select_p15): Don't munge serialNumber - that must be done
1002 * iso7816.c (iso7816_read_binary): Use Le=0 when reading all
1003 data. Handle 6C00 error and take 6B00 as indication for EOF.
1004 * apdu.h (SW_EXACT_LENGTH_P): New.
1005 * apdu.c (new_reader_slot, reset_pcsc_reader, pcsc_get_status)
1006 (open_pcsc_reader): Set new reader state IS_T0.
1007 (apdu_send_le): When doing T=0 make sure not to send Lc and Le.
1008 Problem reported by Carl Meijer.
1009 (apdu_send_direct): Initialize RESULTLEN.
1010 * pcsc-wrapper.c (handle_status): Return the current protocol as
1013 2005-08-05 Werner Koch <wk@g10code.com>
1015 * apdu.c (open_rapdu_reader): Set the reader number.
1017 2005-07-05 Werner Koch <wk@g10code.com>
1019 * app-openpgp.c (do_readkey): Return a mallcoed copy of the key as
1020 required by the description. Thanks to Moritz for tracking this
1023 2005-06-21 Werner Koch <wk@g10code.com>
1025 * scdaemon.c (main): ifdef call to ccid_set_debug_level.
1027 * apdu.c (reset_pcsc_reader, open_pcsc_reader): Cast size_t to
1030 2005-06-06 Werner Koch <wk@g10code.com>
1032 * scdaemon.c (main): New option --debug-allow-core-dump.
1034 2005-06-03 Werner Koch <wk@g10code.com>
1036 * scdaemon.c (handle_connections): Make sure that the signals we
1037 are handling are not blocked.Block signals while creating new
1039 (handle_connections): Include the file descriptor into the name of
1042 2005-06-02 Werner Koch <wk@g10code.com>
1044 * app.c (app_dump_state, dump_mutex_state): New.
1045 * scdaemon.c (handle_signal): Print it on SIGUSR1.
1047 * app-openpgp.c (do_writekey): Typo fix.
1049 * command.c (open_card): Check for locked state even if an
1050 application context is available.
1052 * app-common.h: Add REF_COUNT field.
1053 * app.c (release_application, select_application): Implement
1054 reference counting to share the context beween connections.
1056 * app.c (lock_reader, unlock_reader): Take SLOT instead of APP as
1057 argument. Changed all callers.
1058 (select_application): Unlock the reader on error. This should fix
1059 the hangs I noticed last week.
1061 * scdaemon.h: Removed card_ctx_t cruft.
1063 2005-06-01 Werner Koch <wk@g10code.com>
1065 * scdaemon.c: Include mkdtemp.h.
1067 2005-05-31 Werner Koch <wk@g10code.com>
1069 * tlv.c [GNUPG_MAJOR_VERSION==1]: Define constants instead of
1070 including a gnupg 1.4 header.
1072 2005-05-30 Werner Koch <wk@g10code.com>
1074 * tlv.c: Add hack to compile without gpg-error.h when used with
1077 2005-05-23 Werner Koch <wk@g10code.com>
1079 * Makefile.am: Do not build sc-copykeys anymore.
1081 * app-openpgp.c (app_openpgp_storekey, app_openpgp_readkey)
1082 (app_openpgp_cardinfo): Removed.
1084 * ccid-driver.c (parse_ccid_descriptor): SCR335 FW version 5.14 is
1086 (do_close_reader): Never do a reset. The caller should instead
1087 make sure that the reader has been closed properly. The new retry
1088 code in ccid_slot_status will make sure that the readersatrts up
1089 fine even if the last process didn't closed the USB connection
1091 (ccid_get_atr): For certain readers try switching to ISO mode.
1092 Thanks to Ludovic Rousseau for this hint and the magic numbers.
1093 (print_command_failed): New.
1094 (bulk_in): Use it here. Add new arg NO_DEBUG.
1095 (ccid_slot_status): Disabled debugging.
1097 2005-05-21 Werner Koch <wk@g10code.com>
1099 * scdaemon.c (handle_signal): Print thread info on SIGUSR1.
1101 2005-05-20 Werner Koch <wk@g10code.com>
1103 * ccid-driver.c: Replaced macro DEBUG_T1 by a new debug level.
1104 (parse_ccid_descriptor): Mark SCR335 firmware version 5.18 good.
1105 (ccid_transceive): Arghhh. The seqno is another bit in the
1106 R-block than in the I block, this was wrong at one place.
1108 * scdaemon.c: New options --debug-ccid-driver and
1109 --debug-disable-ticker.
1111 * app-openpgp.c (do_genkey, do_writekey): Factored code to check
1112 for existing key out into ..
1113 (does_key_exist): .. New function.
1115 2005-05-19 Werner Koch <wk@g10code.com>
1117 * tlv.c (parse_sexp): New.
1119 * command.c (cmd_writekey): New.
1120 * app.c (app_writekey): New.
1121 * app-common.c (app_t): Add function ptr WRITEKEY.
1122 * app-openpgp.c (do_writekey): New.
1124 * app-openpgp.c (do_readkey) [GNUPG_MAJOR_VERSION==1]: Return error.
1125 * app-common.h (app_t) [GNUPG_MAJOR_VERSION==1]: Add a field to
1126 store the Assuan context.
1128 2005-05-17 Werner Koch <wk@g10code.com>
1130 * scdaemon.c: Removed non-pth code paths.
1131 (create_socket_name, create_server_socket): New. Taken from
1133 (cleanup): Changed to adjust for SOCKET_NAME now being malloced.
1134 (ticker_thread): Always use pth_event_occurred; it is again
1135 defined for all decent PTH versions.
1136 (handle_connections): New. Based on the gpg-agent code.
1137 (start_connection_thread): Ditto.
1138 (ticker_thread): Removed.
1139 (cleanup_sh): Removed.
1140 (main): Run the handler for the pipe server in a separate
1141 thread. This replaces the old ticker thread.
1142 (scd_get_socket_name): New.
1143 * command.c (cmd_getinfo): New command GETINFO.
1144 (scd_command_handler): Renamed argument and changed code to use an
1145 already connected FD.
1147 2005-05-15 Werner Koch <wk@g10code.com>
1149 * app.c, app-common.h, app-nks.c, app-p15.c, app-dinsig.c
1150 * app-openpgp.c: Change most function return types from int to
1152 * command.c (pin_cb): Ditto.
1153 * sc-copykeys.c (pincb): Ditto.
1155 * app.c (lock_reader, unlock_reader): New. Changed call handler
1156 wrappers to make use of these functions.
1158 2005-05-07 Werner Koch <wk@g10code.com>
1160 * ccid-driver.c (do_close_reader): Don't do a reset before close.
1161 Some folks reported that it makes the SCR335 hang less often.
1162 Look at the source on how to re-enable it.
1164 2005-04-27 Werner Koch <wk@g10code.com>
1166 * app-p15.c (micardo_mse): New.
1168 * iso7816.c (iso7816_manage_security_env): Allow passing DATA as
1169 NULL to indicate an empty Lc.
1170 * tlv.c (find_tlv): Check that a found object fits into the
1172 (find_tlv_unchecked): New as replacement for the old non-checking
1174 * app.c (select_application): Keep on using the non-checking
1176 * app-openpgp.c (get_one_do, dump_all_do): Ditto.
1179 Removal of the old OpenSC based code.
1181 * app-p15.c: New. Basic support for pkcs15 cards without OpenSC.
1182 There are quite a couple of things missing but at least I can use
1183 my old TCOS cards from the Aegypten-1 development for signing.
1184 * app.c (select_application): Detect pkcs15 applications.
1185 * Makefile.am (scdaemon_SOURCES): Removed card.c, card-common.h
1186 and card-p15.c because they are now obsolete. Added app-p15.c.
1187 Removed all OpenSC stuff.
1188 * command.c (do_reset, open_card, cmd_serialno, cmd_learn)
1189 (cmd_readcert, cmd_readkey, cmd_pksign, cmd_pkdecrypt): Removed
1190 all special cases for the old card.c based mechanisms.
1191 * scdaemon.c, apdu.c: Removed all special cases for OpenSC.
1193 2005-04-20 Werner Koch <wk@g10code.com>
1195 * command.c: Use GPG_ERR_LOCKED instead of EBUSY.
1197 2005-04-14 Werner Koch <wk@g10code.com>
1199 * app-openpgp.c (retrieve_key_material): Rewritten. Return a
1201 (retrieve_next_token): Removed.
1202 (retrieve_fpr_from_card): Rewritten to make use of DO caching and
1203 to take the KEYNO as arg.
1204 (get_public_key): Renamed variable for clarity.
1206 2005-04-12 Werner Koch <wk@g10code.com>
1208 Basic support for several sessions.
1210 * command.c (scd_command_handler): Replace the primary_connection
1211 stuff by a real connection list. Release the local context on
1213 (scd_update_reader_status_file): Update accordingly. Send signal
1214 to all connections who registered an event signal.
1215 (cmd_lock, cmd_unlock, register_commands): New commands LOCK and
1217 (cmd_setdata, cmd_pksign, cmd_pkauth, cmd_pkdecrypt, cmd_setattr)
1218 (cmd_genkey, cmd_passwd, cmd_checkpin): Return an error if reader
1220 (do_reset): Handle locking.
1221 (open_card): Ditto. Share the reader slot with other sessions.
1222 (get_reader_slot): New.
1223 (update_card_removed): New. Use it in the TEST_CARD_REMOVAL macro.
1225 2005-04-07 Werner Koch <wk@g10code.com>
1227 * app-openpgp.c (do_check_pin): Add hack to allow verification of
1229 (get_public_key): Don't use gcry functions to create S-expressions.
1230 (do_deinit, do_readkey, do_genkey, send_keypair_info): Adjust for
1233 2005-03-29 Moritz Schulte <moritz@g10code.com>
1235 * app-openpgp.c (retrieve_fpr_from_card): New function.
1236 (retrieve_next_token): New function.
1237 (retrieve_key_material): New function.
1238 (get_public_key): Implement retrival of key through expernal
1239 helper (gpg) in case the openpgp card is not cooperative enough.
1241 2005-03-16 Werner Koch <wk@g10code.com>
1243 * ccid-driver.c (parse_ccid_descriptor): Make SCM workaround
1244 reader type specific.
1245 (scan_or_find_devices): Do not check the interface subclass in the
1246 SPR532 kludge, as this depends on the firmware version.
1247 (ccid_get_atr): Get the Slot status first. This solves the
1248 problem with readers hanging on recent Linux 2.6.x.
1249 (bulk_in): Add argument TIMEOUT and changed all callers to pass an
1250 appropriate one. Change the standard timeout from 10 to 5 seconds.
1251 (ccid_slot_status): Add a retry code with an initial short timeout.
1252 (do_close_reader): Do an usb_reset before closing the reader.
1254 2005-02-25 Werner Koch <wk@g10code.com>
1256 * app-openpgp.c (get_public_key): Make sure not to return negative
1258 (do_sign): Allow passing of indata with algorithm prefix.
1259 (do_auth): Allow OPENPGP.3 as an alternative ID.
1261 * app.c (app_getattr): Return just the S/N but not the timestamp.
1263 2005-02-24 Werner Koch <wk@g10code.com>
1265 * app.c (app_getattr): Return APPTYPE or SERIALNO type even if the
1266 application does dot support the getattr call.
1268 * app-openpgp.c (get_one_do): Never try to get a non cacheable
1269 object from the cache.
1270 (get_one_do): Add new arg to return an error code. Changed all
1272 (do_getattr): Let it return a proper error code.
1274 * app.c (select_application): Return an error code and the
1275 application context in an new arg.
1276 * command.c (open_card): Adjusted for that. Don't use the
1277 fallback if no card is present. Return an error if the card has
1278 been removed without a reset.
1279 (do_reset, cmd_serialno): Clear that error flag.
1280 (TEST_CARD_REMOVAL): New. Use it with all command handlers.
1281 (scd_update_reader_status_file): Set the error flag on all changes.
1283 * scdaemon.c (ticker_thread): Termintate if a shutdown is pending.
1285 * apdu.c: Added some PCSC error codes.
1286 (pcsc_error_to_sw): New.
1287 (reset_pcsc_reader, pcsc_get_status, pcsc_send_apdu)
1288 (open_pcsc_reader): Do proper error code mapping.
1290 2005-03-16 Werner Koch <wk@g10code.com>
1292 * ccid-driver.c (parse_ccid_descriptor): Make SCM workaround
1293 reader type specific.
1294 (scan_or_find_devices): Do not check the interface subclass in the
1295 SPR532 kludge, as this depends on the firmware version.
1296 (ccid_get_atr): Get the Slot status first. This solves the
1297 problem with readers hanging on recent Linux 2.6.x.
1299 2005-02-22 Werner Koch <wk@g10code.com>
1301 * app-openpgp.c (app_local_s): New field PK.
1302 (do_deinit, do_genkey, app_openpgp_storekey): Clear it.
1303 (get_public_key, send_keypair_info): New.
1304 (do_learn_status): Send KEYPAIR info
1306 * app-common.h (app_ctx_t): Add function pointer READKEY.
1307 * app.c (app_readkey): New.
1308 * command.c (cmd_readkey): Use READKEY function if possible.
1310 2005-01-26 Werner Koch <wk@g10code.com>
1312 * ccid-driver.c (parse_ccid_descriptor): Need the CSM workaround
1313 also for newer firmware versions. Need to get a list of fixed
1314 firmware versions and use that.
1316 2005-01-25 Werner Koch <wk@g10code.com>
1318 * apdu.c (apdu_send_le, apdu_send_direct): Fix some compiler
1321 * app-openpgp.c (get_cached_data): New arg GET_IMMEDIATE to bypass
1322 the cache. Changed all callers.
1323 (get_one_do): Bypass the cache if the value would have been read
1324 directly for v1.1 cards.It makes things a bit slower but obnly for
1325 1.0 cards and there are not that many cards out in the wild. This
1326 is required to fix a caching bug when generating new keys; as a
1327 side effect of the retrieval of the the C4 DO from the 6E DO the
1328 cached fingerprint will get updated to the old value and later
1329 when signing the generated key the checking of the fingerprint
1330 fails because it won't match the new one. Thanks to Moritz for
1331 analyzing this problem.
1332 (verify_chv3): Removed the CHV status reread logic because we
1333 won't cache the C4 DO anymore.
1335 2004-12-28 Werner Koch <wk@g10code.com>
1337 * ccid-driver.c (find_endpoint): New.
1338 (scan_or_find_devices): Add new args to return endpoint info and
1340 (ccid_open_reader, ccid_shutdown_reader): Take care of these new
1342 (bulk_in, bulk_out): Use the correct endpoints.
1343 (ccid_transceive_apdu_level): New.
1344 (ccid_transceive): Divert to above.
1345 (parse_ccid_descriptor): Allow APDU level exchange mode.
1346 (do_close_reader): Pass the interface number to usb_release_interface.
1348 2004-12-21 Werner Koch <wk@g10code.com>
1350 * scdaemon.c (main): Use default_homedir().
1352 2004-12-18 Werner Koch <wk@g10code.com>
1354 * scdaemon.c (main) [W32]: Remove special Pth initialize..
1356 * scdaemon.h (map_assuan_err): Define in terms of
1357 map_assuan_err_with_source.
1359 2004-12-15 Werner Koch <wk@g10code.com>
1361 * scdaemon.c [W32]: Various hacks to make it run under W32.
1363 * command.c (scd_update_reader_status_file) [W32]: Don't use kill.
1365 * apdu.c [W32]: Disable use of pcsc_wrapper.
1367 * Makefile.am (scdaemon_LDADD): Reorder libs.
1368 (sc_copykeys_LDADD): Add libassuan because it is needed for W32.
1370 2004-12-06 Werner Koch <wk@g10code.com>
1372 * Makefile.am (pkglib_PROGRAMS): Build only for W32.
1374 2004-10-22 Werner Koch <wk@g10code.com>
1376 * app-openpgp.c (verify_chv3): The minium length for CHV3 is
1377 8. Changed string to match the other ones.
1379 2004-10-21 Werner Koch <wk@g10code.com>
1381 * app-openpgp.c (do_sign): Replace asprintf by direct allocation.
1382 This avoids problems with missing vasprintf implementations in
1385 * app-common.h (app_openpgp_storekey: Add prototype.
1387 2004-10-20 Werner Koch <wk@g10code.com>
1389 * sc-investigate: Removed.
1390 * Makefile.am (sc_investigate): Removed.
1392 * pcsc-wrapper.c (load_pcsc_driver): Load get_status_change func.
1393 (handle_open): Succeed even without a present card.
1394 (handle_status, handle_reset): New.
1396 * apdu.c (apdu_open_reader): Load pcsc_get_status_change fucntion.
1397 (pcsc_get_status): Implemented.
1398 (reset_pcsc_reader): Implemented.
1399 (open_pcsc_reader): Succeed even with no card inserted.
1400 (open_ccid_reader): Set LAST_STATUS.
1402 * iso7816.c (iso7816_select_application): Always use 0 for P1.
1404 2004-10-18 Werner Koch <wk@g10code.com>
1406 * ccid-driver.c (ccid_get_atr): Reset T=1 state info.
1408 2004-10-14 Werner Koch <wk@g10code.com>
1410 * app-openpgp.c (parse_login_data): New.
1411 (app_select_openpgp): Call it.
1412 (do_setattr): Reparse it after change.
1414 2004-10-06 Werner Koch <wk@g10code.de>
1416 * ccid-driver.c (ccid_open_reader): Store the vendor ID.
1417 (ccid_transceive_secure): New.
1418 (parse_ccid_descriptor): Workaround for an SCM reader problem.
1420 2004-10-04 Werner Koch <wk@g10code.de>
1422 * ccid-driver.c (send_escape_cmd): New.
1424 2004-09-30 Werner Koch <wk@g10code.com>
1426 * Makefile.am: Adjusted for gettext 0.14.
1428 * app-openpgp.c (do_sign): Add the error string to the verify
1431 2004-09-27 Werner Koch <wk@g10code.com>
1435 * app-openpgp.c: Made all strings translatable.
1436 (verify_chv3) [GNUPG_MAJOR_VERSION]: Make opt.allow_admin
1437 available for use in gnupg 2.
1438 (verify_chv3): Reimplemented countdown showing to use only
1439 functions from this module. Flush the CVH status cache on a
1441 (get_one_do): Hack to bypass the cache for cards versions > 1.0.
1442 (store_fpr): Store the creation date for card version > 1.0.
1444 * app-openpgp.c (app_openpgp_storekey): Call flush_cache.
1445 (get_cached_data): Move local data initialization to ..
1446 (app_select_openpgp): .. here. Read some flags for later use.
1447 (do_getattr): New read-only attribute EXTCAP.
1449 * apdu.c (open_pcsc_reader): Do not print empty reader string.
1451 * ccid-driver.c (do_close_reader): Factored some code out from ...
1452 (ccid_close_reader): ..here.
1453 (ccid_shutdown_reader): New.
1455 * apdu.c (apdu_shutdown_reader): New.
1456 (shutdown_ccid_reader): New.
1458 * apdu.c (open_ccid_reader): New arg PORTSTR. Pass it to
1460 (apdu_open_reader): Pass portstr to open_ccid_reader.
1461 (apdu_open_reader): No fallback if a full CCID reader id has been
1464 * ccid-driver.c (ccid_get_reader_list): New.
1465 (ccid_open_reader): Changed API to take a string for the reader.
1466 Removed al the cruft for the libusb development vesion which seems
1467 not to be maintained anymore and there are no packages anyway.
1468 The stable library works just fine.
1469 (struct ccid_reader_id_s): Deleted and replaced everywhere by a
1471 (usb_get_string_simple): Removed.
1472 (bulk_in): Do valgrind hack here and not just everywhere.
1474 * ccid-driver.c (read_device_info): Removed.
1475 (make_reader_id, scan_or_find_devices): New.
1476 (ccid_open_reader): Simplified by make use of the new functions.
1477 (ccid_set_debug_level): New. Changed the macros to make use of
1478 it. It has turned out that it is often useful to enable debugging
1479 at runtime so I added this option.
1481 From gnupg 1.3 - David Shaw <dshaw@jabberwocky.com>
1483 * app-openpgp.c (verify_chv3): Show a countdown of how many wrong
1484 admin PINs can be entered before the card is locked.
1486 * app-openpgp.c (get_cached_data): Avoid mallocing zero since it
1487 breaks us when using --enable-m-guard.
1489 * ccid-driver.c (usb_get_string_simple): Replacement function to
1490 work with older libusb.
1492 * ccid-driver.c (read_device_info): Fix segfault when usb device
1494 (ccid_open_reader): Allow working with an even older version of
1495 libusb (usb_busses global instead of usb_get_busses()).
1497 2004-09-11 Werner Koch <wk@g10code.com>
1499 * app-openpgp.c (app_select_openpgp): Its app_munge_serialno and
1500 not app_number_serialno.
1502 2004-08-20 Werner Koch <wk@g10code.de>
1504 * app.c (select_application): Fixed serial number extraction and
1505 added the BMI card workaround.
1506 (app_munge_serialno): New.
1507 * app-openpgp.c (app_select_openpgp): Try munging serialno.
1509 2004-08-05 Werner Koch <wk@g10code.de>
1511 * scdaemon.c (main): New option --disable-application.
1512 * app.c (is_app_allowed): New.
1513 (select_application): Use it to check for disabled applications.
1515 * ccid-driver.h (CCID_DRIVER_ERR_ABORTED): New.
1516 * ccid-driver.c (ccid_open_reader): Support the stable 0.1 version
1518 (ccid_get_atr): Handle short messages.
1520 * apdu.c (my_rapdu_get_status): Implemented.
1522 2004-07-27 Moritz Schulte <moritz@g10code.com>
1524 * apdu.c: Include <signal.h>.
1526 * Makefile.am: Use @DL_LIBS@ instead of -ldl.
1528 2004-07-22 Werner Koch <wk@g10code.de>
1530 * Makefile.am: Make OpenSC lib link after libgcrypt. Do not link
1532 * apdu.c: Don't use Pth if we use OpenSC.
1533 * sc-investigate.c, scdaemon.c: Disable use of pth if OpenSC is used.
1535 * scdaemon.c (main): Bumbed thread stack size up to 512k.
1537 2004-07-16 Werner Koch <wk@gnupg.org>
1539 * apdu.c (reader_table_s): Add function pointers for the backends.
1540 (apdu_close_reader, apdu_get_status, apdu_activate)
1541 (send_apdu): Make use of them.
1542 (new_reader_slot): Intialize them to NULL.
1543 (dump_ccid_reader_status, ct_dump_reader_status): New.
1544 (dump_pcsc_reader_status): New.
1545 (open_ct_reader, open_pcsc_reader, open_ccid_reader)
1546 (open_osc_reader, open_rapdu_reader): Intialize function pointers.
1547 (ct_activate_card, ct_send_apdu, pcsc_send_apdu, osc_send_apdu)
1548 (error_string): Removed. Replaced by apdu_strerror.
1549 (get_ccid_error_string): Removed.
1550 (ct_activate_card): Remove the unused loop.
1551 (reset_ct_reader): Implemented.
1552 (ct_send_apdu): Activate the card if not yet done.
1553 (pcsc_send_apdu): Ditto.
1555 2004-07-15 Werner Koch <wk@gnupg.org>
1557 * ccid-driver.h: Add error codes.
1558 * ccid-driver.c: Implement more or less proper error codes all
1561 * apdu.c (apdu_send_direct): New.
1562 (get_ccid_error_string): Add some error code mappings.
1563 (send_apdu): Pass error codes along for drivers already supporting
1565 (host_sw_string): New.
1566 (get_ccid_error_string): Use above.
1567 (send_apdu_ccid): Reset the reader if it has not yet been done.
1568 (open_ccid_reader): Don't care if the ATR can't be read.
1569 (apdu_activate_card): New.
1570 (apdu_strerror): New.
1571 (dump_reader_status): Only enable it with opt.VERBOSE.
1572 * iso7816.c (map_sw): Add mappings for the new error codes.
1574 2004-07-02 Werner Koch <wk@gnupg.org>
1576 * apdu.c (open_ct_reader, open_pcsc_reader, open_ccid_reader)
1577 (reset_ccid_reader, open_osc_reader): Call dump_reader_status only
1580 2004-07-01 Werner Koch <wk@gnupg.org>
1582 * sc-investigate.c: Initialize Pth which is now required.
1583 (interactive_shell): New command "readpk".
1585 * app-openpgp.c (do_getattr): Fix for sending CA-FPR.
1587 2004-06-30 Werner Koch <wk@gnupg.org>
1589 * app-openpgp.c (app_openpgp_readkey): Fixed check for valid
1592 2004-06-18 Werner Koch <wk@g10code.com>
1594 * sc-investigate.c (my_read_line): Renamed from read_line.
1596 2004-06-16 Werner Koch <wk@gnupg.org>
1598 * apdu.c (osc_get_status): Fixed type in function name. Noted by
1599 Axel Thimm. Yes, I didn't tested it with OpenSC :-(.
1601 2004-04-28 Werner Koch <wk@gnupg.org>
1603 * app-openpgp.c (do_setattr): Sync FORCE_CHV1.
1605 2004-04-27 Werner Koch <wk@gnupg.org>
1607 * app-common.h: Do not include ksba.h for gnupg 1.
1609 2004-04-26 Werner Koch <wk@gnupg.org>
1611 * app-common.h: New members FNC.DEINIT and APP_LOCAL.
1612 * app.c (release_application): Call new deconstructor.
1613 * app-openpgp.c (do_deinit): New.
1614 (get_cached_data, flush_cache_item, flush_cache_after_error)
1616 (get_one_do): Replaced arg SLOT by APP. Make used of cached data.
1617 (verify_chv2, verify_chv3): Flush some cache item after error.
1618 (do_change_pin): Ditto.
1620 (do_setattr): Flush cache item.
1621 (do_genkey): Flush the entire cache.
1622 (compare_fingerprint): Use cached data.
1624 * scdaemon.c (main): Do the last change the usual way. This is so
1625 that we can easily test for versioned config files above.
1627 2004-04-26 Marcus Brinkmann <marcus@g10code.de>
1629 * scdaemon.c (main): For now, always print default filename for
1630 --gpgconf-list, and never /dev/null.
1632 2004-04-21 Werner Koch <wk@gnupg.org>
1634 * command.c (scd_update_reader_status_file): Send a signal back to
1636 (option_handler): Parse the new event-signal option.
1638 * scdaemon.c (handle_signal): Do not use SIGUSR{1,2} anymore for
1639 changing the verbosity.
1641 2004-04-20 Werner Koch <wk@gnupg.org>
1643 * command.c (scd_update_reader_status_file): Write status files.
1645 * app-help.c (app_help_read_length_of_cert): Fixed calculation of
1648 * pcsc-wrapper.c: New.
1649 * Makefile.am (pkglib_PROGRAMS): Install it here.
1650 * apdu.c (writen, readn): New.
1651 (open_pcsc_reader, pcsc_send_apdu, close_pcsc_reader): Use the
1652 pcsc-wrapper if we are using Pth.
1653 (apdu_send_le): Reinitialize RESULTLEN. Handle SW_EOF_REACHED
1656 2004-04-19 Werner Koch <wk@gnupg.org>
1658 * ccid-driver.c (parse_ccid_descriptor): Store some of the reader
1659 features away. New arg HANDLE
1660 (read_device_info): New arg HANDLE. Changed caller.
1661 (bulk_in): Handle time extension requests.
1662 (ccid_get_atr): Setup parameters and the IFSD.
1663 (compute_edc): New. Factored out code.
1664 (ccid_transceive): Use default NADs when required.
1666 2004-04-14 Werner Koch <wk@gnupg.org>
1668 * scdaemon.h (server_control_s): Add member READER_SLOT.
1669 * scdaemon.c (scd_init_default_ctrl): Initialize READER_SLOT to -1.
1670 * command.c (open_card): Reuse an open slot.
1671 (reset_notify): Just reset the slot if supported by the reader.
1672 (do_reset): Factored code from above out.
1673 (scd_command_handler): Use it for cleanup.
1675 * apdu.h: New pseudo stati SW_HOST_NOT_SUPPORTED,
1676 SW_HOST_LOCKING_FAILED and SW_HOST_BUSY.
1677 * iso7816.c (map_sw): Map it.
1679 * ccid-driver.c (ccid_slot_status): Add arg STATUSBITS.
1680 * apdu.c (apdu_get_status): New.
1681 (ct_get_status, pcsc_get_status, ocsc_get_status): New stubs.
1682 (get_status_ccid): New.
1684 (reset_ct_reader, reset_pcsc_reader, reset_osc_reader): New stubs.
1685 (reset_ccid_reader): New.
1686 (apdu_enum_reader): New.
1688 * apdu.c (lock_slot, trylock_slot, unlock_slot): New helpers.
1689 (new_reader_slot) [USE_GNU_PTH]: Init mutex.
1690 (apdu_reset, apdu_get_status, apdu_send_le): Run functions
1693 * command.c (scd_update_reader_status_file): New.
1694 * scdaemon.c (handle_tick): Call it.
1696 2004-04-13 Werner Koch <wk@gnupg.org>
1698 * scdaemon.c: Convert to a Pth application.
1699 (handle_signal, ticker_thread, handle_tick): New.
1700 (main): Fire up the ticker thread in server mode.
1702 2004-03-23 Werner Koch <wk@gnupg.org>
1704 * scdaemon.c (main) <gpgconf_list>: Fixed output for pcsc_driver.
1706 2004-03-17 Werner Koch <wk@gnupg.org>
1708 * tlv.c (parse_ber_header): Do not check for tag overflow - it
1709 does not make sense. Simplified the check for length overflow.
1711 * scdaemon.c (main) <gpgconf>: Fixed default value quoting.
1713 2004-03-16 Werner Koch <wk@gnupg.org>
1715 * app-dinsig.c: Implemented. Based on app-nks.c and card-dinsig.c
1716 * app-nks.c (get_length_of_cert): Removed.
1718 (app_help_read_length_of_cert): New. Code taken from above. New
1719 optional arg R_CERTOFF.
1721 * card-dinsig.c: Removed.
1722 * card.c (card_get_serial_and_stamp): Do not bind to the old and
1723 never finsiged card-dinsig.c.
1725 * iso7816.c (iso7816_read_binary): Allow for an NMAX > 254.
1727 2004-03-11 Werner Koch <wk@gnupg.org>
1729 * scdaemon.h (out_of_core): Removed. Replaced callers by standard
1732 * apdu.c, iso7816.c, ccid-driver.c [GNUPG_SCD_MAIN_HEADER]: Allow
1733 to include a header defined by the compiler. This helps us to
1734 reuse the source in other software.
1736 2004-03-10 Werner Koch <wk@gnupg.org>
1738 * iso7816.c (iso7816_read_record): New arg SHORT_EF. Changed all
1741 2004-02-18 Werner Koch <wk@gnupg.org>
1743 * sc-investigate.c (main): Setup the used character set.
1744 * scdaemon.c (main): Ditto.
1746 * scdaemon.c (set_debug): New. Add option --debug-level.
1747 (main): Add option --gpgconf-list.
1749 2004-02-12 Werner Koch <wk@gnupg.org>
1751 * Makefile.am: Include cmacros.am for common flags.
1753 2004-01-29 Werner Koch <wk@gnupg.org>
1755 * command.c (reset_notify): Release the application context and
1758 2004-01-28 Werner Koch <wk@gnupg.org>
1760 * iso7816.c (iso7816_manage_security_env): New.
1761 (iso7816_decipher): Add PADIND argument.
1763 2004-01-27 Werner Koch <wk@gnupg.org>
1765 * command.c (cmd_readcert, cmd_readkey): Work on a copy of LINE.
1767 * app-common.h (app_ctx_s): Added readcert field.
1768 * app.c (app_readcert): New.
1769 * tlv.c (parse_ber_header): Added; taken from libksba.
1771 2004-01-26 Werner Koch <wk@gnupg.org>
1773 * card.c (map_sc_err): Use SCD as the error source.
1775 * command.c (open_card): ADD arg NAME to allow requesting a
1776 specific application. Changed all callers.
1777 (cmd_serialno): Allow optional argument to select the desired
1782 * scdaemon.h (opt): Add READER_PORT.
1783 * scdaemon.c (main): Set it here.
1784 * app.c (app_set_default_reader_port): Removed.
1785 (select_application): Add NAME arg and figure out a
1786 default serial number from the GDO. Add SLOT arg and remove all
1788 (release_application): New.
1789 (app_write_learn_status): Output an APPTYPE status line.
1790 * command.c (open_card): Adapt for select_application change.
1791 * app-openpgp.c (app_select_openpgp): Removed SN and SNLEN args
1792 and set it directly. Changed all callers.
1794 2004-01-25 Werner Koch <wk@gnupg.org>
1796 * iso7816.c (iso7816_select_application): P1 kludge for OpenPGP
1798 * app-openpgp.c (find_tlv): Factor out this function to ..
1799 * tlv.c, tlv.h: .. new.
1801 * scdaemon.h: Introduced app_t and ctrl_t as the new types for APP
1804 2004-01-21 Werner Koch <wk@gnupg.org>
1806 * apdu.c (apdu_send_le): Treat SW_EOF_REACHED as a warning.
1808 2004-01-20 Werner Koch <wk@gnupg.org>
1810 * iso7816.c (iso7816_read_binary): New.
1811 (iso7816_select_file): New.
1812 (iso7816_list_directory): New.
1814 * sc-investigate.c: Add option -i.
1815 (select_app, read_line, interactive_shell): New.
1817 2004-01-16 Werner Koch <wk@gnupg.org>
1819 * apdu.h: Add SW_FILE_NOT_FOUND.
1820 * iso7816.c (map_sw): Map it to GPG_ERR_ENOENT.
1821 * iso7816.c (iso7816_select_file): New.
1823 * app-dinsig.c: New file w/o any real code yet.
1824 * Makefile.am (scdaemon_SOURCES,sc_investigate_SOURCES): Add file.
1826 * sc-investigate.c: Add option --disable-ccid.
1828 2003-12-19 Werner Koch <wk@gnupg.org>
1830 * apdu.c (apdu_send_le): Send a get_response with the indicated
1831 length and not the 64 bytes we used for testing.
1833 * app-openpgp.c (verify_chv2, verify_chv3, do_sign): Check the
1834 minimum length of the passphrase, so that we don't need to
1835 decrement the retry counter.
1837 2003-12-17 Werner Koch <wk@gnupg.org>
1839 * card-p15.c (p15_enum_keypairs): Replaced KRC by RC.
1840 * card-dinsig.c (dinsig_enum_keypairs): Ditto.
1842 2003-12-16 Werner Koch <wk@gnupg.org>
1844 * scdaemon.c (main): Set the prefixes for assuan logging.
1846 2003-11-17 Werner Koch <wk@gnupg.org>
1848 * scdaemon.c, scdaemon.h: New options --allow-admin and --deny-admin.
1849 * app-openpgp.c (verify_chv3): Check it here.
1851 2003-11-12 Werner Koch <wk@gnupg.org>
1853 Adjusted for API changes in Libksba.
1855 2003-10-30 Werner Koch <wk@gnupg.org>
1857 * apdu.c (close_ct_reader, close_pcsc_reader): Implemented.
1858 (get_ccid_error_string): New. Not very useful messages, though.
1860 2003-10-25 Werner Koch <wk@gnupg.org>
1862 * ccid-driver.c (ccid_open_reader): Return an error if no USB
1865 * command.c (cmd_genkey, cmd_passwd): Fixed faulty use of
1868 * apdu.c (apdu_open_reader): Hacks for PC/SC under Windows.
1870 2003-10-20 Werner Koch <wk@gnupg.org>
1872 * command.c (cmd_checkpin): New.
1873 (register_commands): Add command CHECKPIN.
1874 * app.c (app_check_pin): New.
1875 * app-openpgp.c (check_against_given_fingerprint): New. Factored
1876 out that code elsewhere.
1877 (do_check_pin): New.
1879 2003-10-10 Werner Koch <wk@gnupg.org>
1881 * ccid-driver.c (ccid_close_reader): New.
1883 * apdu.c (close_ccid_reader, close_ct_reader, close_csc_reader)
1884 (close_osc_reader, apdu_close_reader): New. Not all are properly
1887 2003-10-09 Werner Koch <wk@gnupg.org>
1889 * ccid-driver.c (ccid_transceive): Add T=1 chaining for sending.
1891 2003-10-08 Werner Koch <wk@gnupg.org>
1893 * app-openpgp.c (do_getattr): Support SERIALNO and AID.
1895 2003-10-01 Werner Koch <wk@gnupg.org>
1897 * ccid-driver.c: Detect GnuPG 1.3 and include appropriate files.
1899 * app-openpgp.c: Ditto.
1901 (generate_keypair): Renamed to ..
1902 (do_generate_keypair): .. this.
1903 * app-common.h [GNUPG_MAJOR_VERSION]: New.
1904 * iso7816.h [GNUPG_MAJOR_VERSION]: Include cardglue.h
1906 2003-09-30 Werner Koch <wk@gnupg.org>
1908 * command.c (cmd_getattr): New command GETATTR.
1909 * app.c (app_setattr): New.
1911 (do_learn_status): Reimplemented in terms of do_getattr.
1913 * app-openpgp.c (do_change_pin): Make sure CVH1 and CHV2 are
1915 (verify_chv2, verify_chv3): New. Factored out common code.
1916 (do_setattr, do_sign, do_auth, do_decipher): Change the names of
1917 the prompts to match that we have only 2 different PINs.
1918 (app_select_openpgp): Check whether the card enforced CHV1.
1919 (convert_sig_counter_value): New. Factor out code from
1922 2003-09-28 Werner Koch <wk@gnupg.org>
1924 * app-openpgp.c (dump_all_do): Use gpg_err_code and not gpg_error.
1926 2003-09-19 Werner Koch <wk@gnupg.org>
1928 * ccid-driver.c (parse_ccid_descriptor): New.
1929 (read_device_info): New.
1930 (ccid_open_reader): Check that the device has all required features.
1932 2003-09-06 Werner Koch <wk@gnupg.org>
1934 * scdaemon.c (main): --pcsc-driver again defaults to pcsclite.
1935 David Corcoran was so kind to remove the GPL incompatible
1936 advertisng clause from pcsclite.
1937 * apdu.c (apdu_open_reader): Actually make pcsc-driver option work.
1939 2003-09-05 Werner Koch <wk@gnupg.org>
1941 * ccid-driver.c: More work, data can now actually be retrieved.
1942 * ccid-driver.c, ccid-driver.h: Alternativley allow use under BSD
1945 2003-09-02 Werner Koch <wk@gnupg.org>
1947 * scdaemon.c, scdaemon.h: New option --pcsc-ccid.
1948 * ccid-driver.c, ccid-driver.h: New but far from being useful.
1949 * Makefile.am: Add above.
1950 * apdu.c: Add support for that ccid driver.
1952 2003-08-26 Timo Schulz <twoaday@freakmail.de>
1954 * apdu.c (new_reader_slot): Only set 'is_osc' when OpenSC
1957 2003-08-25 Werner Koch <wk@gnupg.org>
1959 * command.c (cmd_setattr): Use a copy of LINE.
1960 (cmd_genkey): Use a copy of KEYNO.
1961 (cmd_passwd): Use a copy of CHVNOSTR.
1962 (cmd_pksign, cmd_pkauth, cmd_pkdecrypt): s/strdup/xtrystrdup/.
1964 2003-08-19 Werner Koch <wk@gnupg.org>
1966 * scdaemon.c, scdaemon.h: New option --pcsc-driver.
1967 * apdu.c (apdu_open_reader): Use that option here instead of a
1970 2003-08-18 Werner Koch <wk@gnupg.org>
1972 * Makefile.am: Add OPENSC_LIBS to all programs.
1974 * scdaemon.c, scdaemon.h: New option --disable-opensc.
1975 * card.c (card_open): Implement it.
1976 * apdu.c (open_osc_reader, osc_send_apdu): New.
1977 (apdu_open_reader) [HAVE_OPENSC]: Use the opensc driver if not
1979 (error_string) [HAVE_OPENSC]: Use sc_strerror.
1980 (send_apdu) [HAVE_OPENSC]: Call osc_apdu_send.
1982 * card-p15.c (p15_enum_keypairs, p15_prepare_key): Adjusted for
1985 2003-08-14 Timo Schulz <twoaday@freakmail.de>
1987 * apdu.c (ct_activate_card): Change the code a little to avoid
1988 problems with other readers.
1989 * Always use 'dynload.h' instead of 'dlfcn.h'.
1991 2003-08-05 Werner Koch <wk@gnupg.org>
1993 * app-openpgp.c (dump_all_do): Don't analyze constructed DOs after
1996 2003-08-04 Werner Koch <wk@gnupg.org>
1998 * app.c (app_set_default_reader_port): New.
1999 (select_application): Use it here.
2000 * scdaemon.c (main): and here.
2001 * sc-copykeys.c: --reader-port does now take a string.
2002 * sc-investigate.c, scdaemon.c: Ditto.
2003 * apdu.c (apdu_open_reader): Ditto. Load pcsclite if no ctapi
2004 driver is configured. Always include code for ctapi.
2005 (new_reader_slot): Don't test for already used ports and remove
2007 (open_pcsc_reader, pcsc_send_apdu, pcsc_error_string): New.
2008 (apdu_send_le): Changed RC to long to cope with PC/SC.
2010 * scdaemon.c, scdaemon.h: New option --ctapi-driver.
2011 * sc-investigate.c, sc-copykeys.c: Ditto.
2013 2003-07-31 Werner Koch <wk@gnupg.org>
2015 * Makefile.am (scdaemon_LDADD): Added INTLLIBS.
2017 2003-07-28 Werner Koch <wk@gnupg.org>
2019 * app-openpgp.c (do_setattr): Change implementation. Allow all
2022 2003-07-27 Werner Koch <wk@gnupg.org>
2024 Adjusted for gcry_mpi_print and gcry_mpi_scan API change.
2026 2003-07-24 Werner Koch <wk@gnupg.org>
2028 * app-openpgp.c (do_learn_status): Print more status information.
2029 (app_select_openpgp): Store the card version.
2030 (store_fpr): Add argument card_version and fix DOs for old cards.
2031 (app_openpgp_storekey): Likewise.
2033 2003-07-23 Werner Koch <wk@gnupg.org>
2035 * command.c (cmd_pkauth): New.
2036 (cmd_setdata): Check whether data was given at all to avoid
2037 passing 0 to malloc.
2039 * app.c (app_auth): New.
2040 * app-openpgp.c (do_auth): New.
2042 2003-07-22 Werner Koch <wk@gnupg.org>
2044 * command.c (cmd_passwd): New.
2045 * app.c (app_change_pin): New.
2046 * app-openpgp.c (do_change_pin): New.
2047 * iso7816.c (iso7816_reset_retry_counter): Implemented.
2049 * sc-investigate.c (main): New option --gen-random.
2050 * iso7816.c (iso7816_get_challenge): Don't create APDUs with a
2051 length larger than 255.
2053 2003-07-17 Werner Koch <wk@gnupg.org>
2055 * command.c (cmd_random): New command RANDOM.
2057 * iso7816.c (map_sw): New. Use it in this file to return
2058 meaningful error messages. Changed all public fucntions to return
2060 (iso7816_change_reference_data): New.
2061 * apdu.c (apdu_open_reader): Use faked status words for soem
2064 2003-07-16 Werner Koch <wk@gnupg.org>
2066 * apdu.c (apdu_send_simple): Use apdu_send_le so that we can
2067 specify not to send Le as it should be.
2069 2003-07-15 Werner Koch <wk@gnupg.org>
2071 * Makefile.am: Add sc-copykeys program.
2072 * sc-copykeys.c: New.
2073 * app-openpgp.c (app_openpgp_storekey): New.
2074 (app_openpgp_cardinfo): New.
2076 (store_fpr): And use it here to get the actual length in bit.
2078 2003-07-03 Werner Koch <wk@gnupg.org>
2080 * app-openpgp.c (do_setattr): Add setting of the URL.
2081 (app_select_openpgp): Dump card data only in very verbose mode.
2084 2003-07-02 Werner Koch <wk@gnupg.org>
2086 * app-openpgp.c (get_sig_counter): New.
2087 (do_sign): Print the signature counter and enable the PIN callback.
2088 (do_genkey): Implement the PIN callback.
2090 2003-07-01 Werner Koch <wk@gnupg.org>
2092 * app-openpgp.c (store_fpr): Fixed fingerprint calculation.
2094 2003-06-26 Werner Koch <wk@gnupg.org>
2096 * app-openpgp.c (find_tlv): Fixed length header parsing.
2098 * app.c (app_genkey): New.
2099 * command.c (cmd_genkey): New.
2101 2003-06-25 Werner Koch <wk@gnupg.org>
2103 * command.c (percent_plus_unescape): New.
2106 2003-06-24 Werner Koch <wk@gnupg.org>
2108 * command.c (send_status_info): New.
2110 * app-openpgp.c (app_select_openpgp): Replace SLOT arg by APP arg
2111 and setup the function pointers in APP on success. Changed callers.
2113 * app-common.h: New.
2114 * scdaemon.h (APP): New type to handle applications.
2115 (server_control_s): Add an APP context field.
2117 * command.c (cmd_serialno): Handle applications.
2118 (cmd_pksign): Ditto.
2119 (cmd_pkdecrypt): Ditto.
2120 (reset_notify): Ditto.
2121 (cmd_learn): For now return error for application contexts.
2122 (cmd_readcert): Ditto.
2123 (cmd_readkey): Ditto.
2125 2003-06-04 Werner Koch <wk@gnupg.org>
2127 * card.c (map_sc_err): Renamed gpg_make_err to gpg_err_make.
2129 Renamed error codes from INVALID to INV and removed _ERROR suffixes.
2131 2003-06-03 Werner Koch <wk@gnupg.org>
2133 Changed all error codes in all files to the new libgpg-error scheme.
2135 * scdaemon.h: Include gpg-error.h and errno.h
2136 * card.c (map_sc_err): Use unknown for the error source.
2137 * Makefile.am: Link with libgpg-error
2139 2003-05-14 Werner Koch <wk@gnupg.org>
2141 * atr.c, atr.h: New.
2142 * sc-investigate.c: Dump the ATR in a human readable format.
2144 2003-05-08 Werner Koch <wk@gnupg.org>
2146 * scdaemon.h (DBG_CARD_IO_VALUE): New.
2148 * sc-investigate.c: New.
2149 * scdaemon.c (main): Removed --print-atr option.
2151 * iso7816.c, iso7816.h, app-openpgp.c: New.
2153 2003-04-29 Werner Koch <wk@gnupg.org>
2155 * scdaemon.c: New options --print-atr and --reader-port
2156 * apdu.c, apdu.h: New
2158 * card.c, card-p15.c, card-dinsig.c: Allow build without OpenSC.
2160 * Makefile.am (LDFLAGS): Removed.
2162 * command.c (register_commands): Adjusted for new Assuan semantics.
2164 2002-08-21 Werner Koch <wk@gnupg.org>
2166 * scdaemon.c (main): New option --daemon so that the program is
2167 not accidently started in the background.
2169 2002-08-16 Werner Koch <wk@gnupg.org>
2171 * scdaemon.c: Include i18n.h.
2173 * card-common.h (struct p15_private_s): Forward declaration. Add
2175 * card.c (card_close): Make sure private data is released.
2176 (card_enum_certs): New.
2177 * card-p15.c (p15_release_private_data): New.
2178 (init_private_data): New to work around an OpenSC weirdness.
2179 (p15_enum_keypairs): Do an OpenSC get_objects only once.
2180 (p15_enum_certs): New.
2181 (card_p15_bind): Bind new function.
2182 * command.c (cmd_learn): Return information about the certificates.
2184 2002-08-09 Werner Koch <wk@gnupg.org>
2186 * card.c (card_get_serial_and_stamp): Use the tokeinfo serial
2187 number as a fallback. Add a special prefix for serial numbers.
2189 2002-07-30 Werner Koch <wk@gnupg.org>
2191 Changes to cope with OpenSC 0.7.0:
2193 * card.c: Removed the check for the packed opensc version.
2194 Changed include file names of opensc.
2195 (map_sc_err): Adjusted error codes for new opensc version.
2196 * card-p15.c: Changed include filename of opensc.
2197 * card-dinsig.c: Ditto.
2199 * card-p15.c (p15_decipher): Add flags argument to OpenSC call.
2201 2002-07-24 Werner Koch <wk@gnupg.org>
2203 * card.c (find_simple_tlv, find_iccsn): New.
2204 (card_get_serial_and_stamp): Improved serial number parser.
2206 2002-06-27 Werner Koch <wk@gnupg.org>
2208 * scdaemon.c (main): Use GNUPG_DEFAULT_HOMEDIR constant.
2210 2002-06-15 Werner Koch <wk@gnupg.org>
2212 * card-dinsig.c: Documented some stuff from the DIN norm.
2214 2002-04-15 Werner Koch <wk@gnupg.org>
2216 * command.c (cmd_pksign, cmd_pkdecrypt): Use a copy of the key ID.
2218 2002-04-12 Werner Koch <wk@gnupg.org>
2220 * scdaemon.c: New option --debug-sc N.
2221 * card.c (card_open): set it here.
2223 * card-p15.c (p15_prepare_key): Factored out common code from ...
2224 (p15_sign, p15_decipher): here and made the decryption work the
2227 2002-04-10 Werner Koch <wk@gnupg.org>
2229 * card.c (card_open): Return immediately when no reader is available.
2231 2002-03-27 Werner Koch <wk@gnupg.org>
2233 * card.c (card_open, card_close): Adjusted for changes in OpenSC.
2235 2002-03-10 Werner Koch <wk@gnupg.org>
2237 * card-p15.c, card-dinsig.c, card-common.h: New.
2238 * card.c: Factored most code out to the new modules, so that we
2239 can better support different types of card applications.
2241 2002-01-26 Werner Koch <wk@gnupg.org>
2243 * scdaemon.c scdaemon.h, command.c: New. Based on the code from
2247 Copyright 2002, 2003, 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
2249 This file is free software; as a special exception the author gives
2250 unlimited permission to copy and/or distribute it, with or without
2251 modifications, as long as this notice is preserved.
2253 This file is distributed in the hope that it will be useful, but
2254 WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
2255 implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.