1 2009-05-20 Werner Koch <wk@g10code.com>
3 * app-openpgp.c (verify_chv2): Add case for v2 cards.
4 (verify_chv3): Factor some code out to ..
5 (build_enter_admin_pin_prompt): .. new.
6 (do_change_pin): Properly handle v2 cards.
8 2009-05-19 Werner Koch <wk@g10code.com>
10 * scdaemon.c (create_server_socket): Use SUN_LEN.
11 (JNLIB_NEED_AFLOCAL): Define.
13 2009-05-13 Werner Koch <wk@g10code.com>
15 * ccid-driver.c (abort_cmd): Add arg SEQNO and change callers.
16 (bulk_in): Retry on seqno mismatch.
18 * apdu.c (send_le): Release result_buffer.
19 (apdu_send_direct): Implemend extended length.
20 * command.c (cmd_apdu): Add option "--exlen".
22 2009-05-11 Werner Koch <wk@g10code.com>
24 * apdu.c (send_le): Replace log_error by log_info.
26 2009-05-08 Werner Koch <wk@g10code.com>
28 * app-openpgp.c (do_genkey): Allow larger key sizes.
30 * iso7816.c (do_generate_keypair): Add arg EXTENDED_MODE an LE.
31 (iso7816_generate_keypair, iso7816_read_public_key): Ditto.
33 * apdu.c (send_le): Implement extended length return values.
35 * ccid-driver.c (bulk_in): Retry on EAGAIN.
36 (abort_cmd): Change seqno handling.
38 2009-04-28 Werner Koch <wk@g10code.com>
40 * app-help.c (app_help_count_bits): New.
42 * app-nks.c (switch_application): Detect mass signature cards.
43 Take care of new NEED_APP_SELECT flag.
44 (do_sign): Don't allow mass signature cards.
47 (app_select_nks): Register do_readkey.
49 2009-04-01 Werner Koch <wk@g10code.com>
51 * app-openpgp.c (do_setattr, do_writekey): Prepare for extended
54 2009-03-31 Werner Koch <wk@g10code.com>
56 * command.c (percent_plus_unescape): Remove.
57 (cmd_setattr): Use percent_plus_unescape_inplace.
59 2009-03-30 Werner Koch <wk@g10code.com>
61 * app-nks.c (do_decipher): Make it work for TCOS 3.
62 * iso7816.c (iso7816_decipher): Add arg EXTENDED_MODE.
63 * apdu.c (apdu_send): Add arg EXTENDED_MODE and change all callers.
64 (apdu_send_le): Ditto.
65 (apdu_send_direct): Ditto, but not yet functional.
66 (send_le): Fix command chaining. Implement extended length option.
67 * ccid-driver.c (ccid_transceive): Remove restriction on apdu length.
68 (struct ccid_driver_s): Add field IFSC.
69 (ccid_get_atr): Set IFSC.
70 (ccid_transceive): Use negotiated IFSC and support S(IFS) command.
72 2009-03-26 Werner Koch <wk@g10code.com>
74 * command.c (cmd_pksign): Allow more hash algorithms.
76 * scdaemon.h (MAX_DIGEST_LEN): Change to 64.
78 * apdu.c (open_ccid_reader): Clear the is_to flag.
80 * app-nks.c (filelist): Add field KID.
81 (do_getattr): Change standard authentication key.
82 (do_sign): Setup a security environment for TCOS 3 cards and support
85 2009-03-24 Werner Koch <wk@g10code.com>
87 * command.c (struct server_local_s): Add flag
88 APP_CTX_MARKED_FOR_RELEASE.
89 (do_reset): Set the flag.
90 (open_card): Act on this flag.
91 * app-common.h (struct app_ctx_s): Add flag NO_REUSE.
92 (application_notify_card_reset): Set the flag.
93 * app.c (select_application, release_application): Take care of
96 2009-03-20 Werner Koch <wk@g10code.com>
98 * app-nks.c (keygripstr_from_pk_file): Fix for TCOS 3 cards.
100 2009-03-18 Werner Koch <wk@g10code.com>
102 * apdu.c (open_pcsc_reader_wrapped): Use close_all_fds.
104 * command.c (cmd_learn): Add option --keypairinfo.
105 * app.c (app_write_learn_status): Add arg FLAGS.
106 * app-common.h (struct app_ctx_s): Add arg FLAGS to LEARN_STATUS.
107 Change all implementors.
108 * app-p15.c (do_learn_status): Take care of flag bit 0.
109 * app-nks.c (do_learn_status, do_learn_status_core): Ditto.
111 2009-03-10 Werner Koch <wk@g10code.com>
113 * app-openpgp.c (send_key_attr): New.
114 (do_getattr): New attribute KEY_ATTR.
115 * command.c (send_status_direct): New.
117 2009-03-06 Werner Koch <wk@g10code.com>
119 * app-nks.c (do_learn_status): Factor code out to..
120 (do_learn_status_core): .. new.
121 (do_readcert, do_sign, do_decipher): Switch to SigG if needed.
122 (verify_pin): Use DESC also for keypad based verify.
124 2009-03-05 Werner Koch <wk@g10code.com>
126 * app-openpgp.c (verify_a_chv): Remove special case for keypads.
127 (verify_chv3): Ditto.
129 * app-nks.c (get_chv_status): New.
130 (parse_pwidstr): New.
131 (verify_pin): Add args PWID and DESC and use them. Remove the
133 (do_change_pin): Allow PIN selection and add reset mode.
134 (do_learn_status): Use NKS-NKS3 tag for TCOS 3 cards.
135 (do_readcert, do_sign): Allow NKS-NKS3 tag.
137 2009-03-04 Werner Koch <wk@g10code.com>
139 * app-nks.c (do_getattr): New.
140 (app_select_nks): Register it.
141 (verify_pin): Factor some code out to...
142 (basic_pin_checks): New.
143 (do_change_pin): Call the basic check.
144 (app_select_nks): Move AID to ..
147 (switch_application): New.
148 (do_getattr, do_learn_status, do_readcert, do_sign, do_decipher)
149 (do_change_pin, do_check_pin): Make sure we are in NKS mode.
151 2009-03-03 Werner Koch <wk@g10code.com>
153 * command.c (scd_command_handler): Remove dereference of STOPME
156 2009-02-27 Werner Koch <wk@g10code.com>
158 * app.c (get_supported_applications): New.
159 * command.c (cmd_getinfo): New subcommand "app_list"
161 (register_commands): Register command KILLSCD.
162 (struct server_local_s): Add field STOPME.
163 (scd_command_handler): Act upon this.
165 2009-02-25 Werner Koch <wk@g10code.com>
167 * apdu.c (apdu_get_status): Factor all code out to ...
168 (apdu_private_get_status): .. new. Add arg NO_ATR_RESET.
169 (apdu_connect): Call new function.
171 * scdaemon.c: New option --debug-log-tid.
172 (tid_log_callback): New.
173 (main): Move debug-wait code after debug stream init.
175 2009-02-24 Werner Koch <wk@g10code.com>
177 * ccid-driver.c (ccid_get_atr): Move debug output to ..
178 (print_r2p_parameters): .. new.
179 (print_r2p_header, print_pr_data, print_r2p_unknown)
180 (print_r2p_datablock, print_r2p_slotstatus, print_r2p_escape)
181 (print_r2p_datarate): New.
182 (bulk_in): Call parameter printing.
183 (ccid_set_debug_level): Add debug level 3.
184 (convert_le_u16): New.
185 (print_p2r_header, print_p2r_iccpoweron, print_p2r_iccpoweroff)
186 (print_p2r_getslotstatus, print_p2r_xfrblock)
187 (print_p2r_getparameters, print_p2r_resetparameters)
188 (print_p2r_setparameters, print_p2r_escape, print_p2r_iccclock)
189 (print_p2r_to0apdu, print_p2r_secure, print_p2r_mechanical)
190 (print_p2r_abort, print_p2r_setdatarate, print_r2p_unknown): New.
191 (bulk_out): Add arg NO_DEBUG and change all callers to pass 0.
192 Call parameter printing.
193 (ccid_slot_status): Call with NO_DEBUG set.
194 (abort_cmd, send_escape_cmd, ccid_get_atr, ccid_get_atr)
195 (ccid_transceive_apdu_level, ccid_transceive)
196 (ccid_transceive_secure): Remove old debug print code.
198 2009-02-12 Werner Koch <wk@g10code.com>
200 * command.c (cmd_getinfo): Add new subcommand "deny_admin".
202 2009-01-28 Werner Koch <wk@g10code.com>
204 * scdaemon.c (main): Make --allow-admin the default and make the
207 2009-01-27 Werner Koch <wk@g10code.com>
209 * app-geldkarte.c: Changed to use an AID.
211 * app.c (app_munge_serialno): Add case for no serialno.
212 (app_get_serial_and_stamp): Ditto.
214 2009-01-26 Werner Koch <wk@g10code.com>
216 * app-geldkarte.c: New.
217 * Makefile.am (card_apps): Add new file.
218 * app.c (select_application): Test for geldkarte.
220 2009-01-12 Werner Koch <wk@g10code.com>
222 * command.c (send_client_notifications) [HAVE_W32_SYSTEM]: Fix
225 2009-01-08 Werner Koch <wk@g10code.com>
227 * iso7816.c (iso7816_read_record, iso7816_read_binary): Pass 0 for
228 L_e because the problem with the CCID driver has gone.
229 (iso7816_apdu_direct): New.
231 * app-nks.c (filelist): Add NKS_VER field. Add NKS 3 specific
233 (app_local_s, do_deinit): New.
234 (get_nks_version): New.
235 (app_select_nks): Setup local data.
236 (keygripstr_from_pk_file): Replace SLOT by APP and take care of
238 (do_learn_status): Take care of NKS version.
240 2009-01-05 Werner Koch <wk@g10code.com>
242 * apdu.c (apdu_get_status): Save the last status.
244 2008-12-18 Werner Koch <wk@g10code.com>
246 * ccid-driver.c (abort_cmd): New.
247 (bulk_in): Call abort_cmd after severe errors.
249 * apdu.c (reader_table_s): Add field ANY_STATUS.
250 (new_reader_slot): Clear it.
251 (apdu_get_status): Use ANY_STATUS to update the change counter.
252 Remove the use of the flag bit from LAST_STATUS everywhere.
253 * command.c (update_reader_status_file): Factor code out to ...
254 (send_client_notifications): New. Track signals already sent.
255 (update_reader_status_file): Shutdown the reader after a failed
258 2008-12-09 Werner Koch <wk@g10code.com>
260 * scdaemon.c (main): Call i18n_init before init_common_subsystems.
262 2008-12-08 Werner Koch <wk@g10code.com>
264 * scdaemon.c (handle_connections): Sync ticker to the next full
266 (TIMERTICK_INTERVAL_USEC): Change to 500ms.
268 2008-12-05 Werner Koch <wk@g10code.com>
270 * app-openpgp.c (app_local_s): Add field ALGO_ATTR_CHANGE.
271 (app_select_openpgp): Parse new capability.
272 (show_caps): Show new capability.
274 2008-12-03 Werner Koch <wk@g10code.com>
276 * scdaemon.c (opts): Use ARGPARSE_ macros. Add option
278 * command.c (update_reader_status_file): Implement it.
280 2008-11-18 Werner Koch <wk@g10code.com>
282 * scdaemon.c (make_libversion): New.
283 (my_strusage): Print libgcrypt and libksba version.
285 2008-11-03 Werner Koch <wk@g10code.com>
287 * command.c (server_local_s): Add field DISCONNECT_ALLOWED.
288 (cmd_disconnect): Implement command.
289 (open_card): Reset disconnect flag.
290 (update_reader_status_file): Disconnect if allowed.
292 * app-common.h (app_ctx_s): Remove INITIALIZED. Make REF_COUNT
294 * app.c (select_application): Remove INITIALIZED.
295 (app_write_learn_status, app_readcert, app_readkey, app_getattr)
296 (app_setattr, app_sign, app_decipher, app_writecert)
297 (app_writekey, app_get_challenge, app_change_pin, app_check_pin):
298 Replace INITIALIZED by REF_COUNT check.
299 (application_notify_card_removed): Rename to ..
300 (application_notify_card_reset): .. this. Change all callers.
301 * command.c (do_reset): Call application_notify_card_reset after
303 (update_reader_status_file): Add arg SET_CARD_REMOVED.
304 (scd_update_reader_status_file): Pass true for new flag.
305 (do_reset): Pass false for new flag.
307 * app.c (app_get_serial_and_stamp): Use bin2hex.
308 * app-help.c (app_help_get_keygrip_string): Ditto.
309 * app-p15.c (send_certinfo, send_keypairinfo, do_getattr): Ditto.
310 * app-openpgp.c (send_fpr_if_not_null, send_key_data)
311 (retrieve_fpr_from_card, send_keypair_info): Ditto.
312 * app-nks.c (keygripstr_from_pk_file): Ditto.
313 * command.c (cmd_apdu): Ditto.
315 2008-10-21 Marcus Brinkmann <marcus@g10code.com>
317 * command.c (open_card): If connect error is SW_HOST_NO_CARD,
318 return a more descriptive error.
320 2008-10-20 Werner Koch <wk@g10code.com>
322 * pcsc-wrapper.c (read_32): Use provided arg and not stdin. Is
323 called with stdin, though.
324 (handle_close): Mark unused arg.
325 (handle_status, handle_reset): Ditto.
327 * ccid-driver.c (ccid_check_card_presence): Mark not yet used arg.
329 * scdaemon.c (scd_deinit_default_ctrl): Mark unused arg.
330 * command.c (cmd_unlock, cmd_restart, cmd_disconnect): Ditto.
331 * apdu.c (ct_get_status): Ditto.
332 (ct_send_apdu, pcsc_send_apdu_wrapped)
333 (apdu_open_remote_reader): Ditto.
334 * app.c (select_application): Ditto.
335 * app-openpgp.c (do_writecert, do_change_pin, do_writekey): Ditto.
336 * app-nks.c (do_change_pin, do_check_pin): Ditto.
338 2008-10-16 Werner Koch <wk@g10code.com>
340 * command.c (cmd_disconnect): New dummy command.
341 (register_commands): Register command.
343 2008-10-15 Werner Koch <wk@g10code.com>
345 * command.c (scd_command_handler): Return true if there is no more
347 * scdaemon.c (start_connection_thread): Set shutdown flag if
348 requested by command handler.
349 (main): Make PIPE_SERVER module global.
350 (handle_connections): Disable listen_fd if a shutdown is pending.
352 2008-10-14 Werner Koch <wk@g10code.com>
354 * apdu.c (reader_table_s): Add fields connect_card and
356 (new_reader_slot): Set them to NULL.
357 (apdu_connect, apdu_disconnect): New.
358 (apdu_close_reader, apdu_shutdown_reader): Call apdu_disconnect.
359 (connect_pcsc_card, disconnect_pcsc_card): new.
360 (reset_pcsc_reader_direct): Implement in terms of
361 disconnect_pcsc_card and connect_pcsc_card.
362 (apdu_get_atr): Return NULL if there is no ATR.
363 * sc-copykeys.c (main): Add call to apdu_connect.
364 * command.c (open_card): Ditto.
366 * apdu.h (SW_HOST_ALREADY_CONNECTED): New.
367 (APDU_CARD_USABLE, APDU_CARD_PRESENT, APDU_CARD_ACTIVE): New.
368 * apdu.c: Replace constants by the new macros.
369 (open_pcsc_reader): Factor code out to ...
370 (open_pcsc_reader_direct, open_pcsc_reader_wrapped): New.
371 (reset_pcsc_reader): Factor code out to ...
372 (reset_pcsc_reader_direct, reset_pcsc_reader_wrapped): New.
373 (pcsc_get_status): Factor code out to ...
374 (pcsc_get_status_direct, pcsc_get_status_wrapped): New.
375 (pcsc_send_apdu): Factor code out to ...
376 (pcsc_send_apdu_direct, pcsc_send_apdu_wrapped): New.
377 (close_pcsc_reader): Factor code out to ...
378 (close_pcsc_reader_direct, close_pcsc_reader_wrapped): New.
380 * command.c (update_reader_status_file): Open the reader if not
383 * scdaemon.c (TIMERTICK_INTERVAL_SEC, TIMERTICK_INTERVAL_USEC):
384 New to replace TIMERTICK_INTERVAL. Chnage from 2s (4 under W32)
387 2008-10-13 Werner Koch <wk@g10code.com>
389 * command.c (option_handler) [W32]: Use strtoul with base 16.
390 (update_reader_status_file) [W32]: Set Event.
391 (scd_command_handler): Use INT2FD to silent warning.
393 2008-09-29 Werner Koch <wk@g10code.com>
395 * scdaemon.h (GCRY_MD_USER): Rename to GCRY_MODULE_ID_USER.
396 (GCRY_MD_USER_TLS_MD5SHA1): Rename to MD_USER_TLS_MD5SHA1 and
399 2008-09-28 Marcus Brinkmann <marcus@g10code.com>
401 * apdu.c (pcsc_get_status): Fix last change.
403 2008-09-25 Werner Koch <wk@g10code.com>
405 * app-openpgp.c (do_setattr): Do not allow setting of the reset
407 (do_change_pin): Allow setting of the reset code.
409 2008-09-24 Werner Koch <wk@g10code.com>
411 * app-openpgp.c (verify_chv3): Set the did_chv3 flag which was
412 accidently removed on 2008-03-26.
413 (verify_chv2): Revert last change.
414 (do_change_pin): Do not change CHV2. Add reset code logic for v2
416 * iso7816.c (iso7816_reset_retry_counter_with_rc): New.
418 * app-openpgp.c (add_tlv, build_privkey_template): New.
419 (do_writekey): Support v2 keys and other key lengths than 1024.
420 * iso7816.c (iso7816_put_data_odd): New.
422 2008-09-23 Werner Koch <wk@g10code.com>
424 * app-openpgp.c (do_sign): Support SHA-2 digests.
425 (verify_chv2): No CHV auto-sync for v2 cards.
426 (do_auth): Allow 2048 bit keys.
427 (parse_algorithm_attribute): New.
428 (rsa_key_format_t): New.
429 (struct app_local_s): Add struct KEYATTR.
431 2008-09-23 Marcus Brinkmann <marcus@g10code.com>
433 * apdu.c (pcsc_get_status): Be more relaxed with the usable flag
436 2008-09-23 Werner Koch <wk@g10code.com>
438 * app-openpgp.c (do_setattr): Use command chaining for long
440 * iso7816.c (iso7816_put_data): Add arg EXTENDED_MODE. Change all
442 * apdu.c (apdu_send_simple): Add arg EXTENDED_MODE. Change all
444 (send_le): Implement command chaining.
445 * ccid-driver.c (ccid_transceive_apdu_level): Increase allowed
447 (ccid_transceive): Alow for APDUS of up to 259 bytes.
448 * apdu.h: Add new SW_ codes.
450 2008-09-16 Werner Koch <wk@g10code.com>
452 * command.c (cmd_writecert): New.
453 (register_commands): Register it.
454 * app-common.h (app_ctx_s): Add member WRITECERT.
455 * app.c (app_writecert): New.
456 * app-openpgp.c (do_writecert): New.
457 (parse_historical): New.
459 (dump_all_do): Print only the length of longs DOs.
460 * command.c (cmd_writekey, cmd_apdu, cmd_pksign)
461 (cmd_passwd): Replace open coding by skip_options.
463 2008-08-30 Moritz <moritz@gnu.org>
465 * scdaemon.c (main): Use estream_asprintf instead of asprintf.
466 * command.c (update_reader_status_file): Likewise.
467 (cmd_serialno): Use estream_asprintf instead of asprintf
468 and xfree instead of free to release memory allocated
469 through (estream_)asprintf.
470 (cmd_learn): Likewise.
472 * app-openpgp.c (get_public_key): Likewise.
474 2008-08-18 Werner Koch <wk@g10code.com>
476 * app-openpgp.c (do_setattr): Fix test for v2 cards.
478 2008-08-11 Werner Koch <wk@g10code.com>
480 * apdu.c (reset_pcsc_reader, open_pcsc_reader)
481 (reset_rapdu_reader, open_rapdu_reader): Allow ATRs of up to 33
482 bytes. Provide maximum size of ATR buffer using DIM. Such long
483 ATR are never seen in reality but the PC/SC library of MAC OS X is
484 just too buggy. Reported by Ludovic Rousseau. Fixes bug #948.
486 2008-07-30 Werner Koch <wk@g10code.com>
488 * app-openpgp.c (verify_a_chv): Use xtrymalloc and make the prompt
489 for CHV2 more user friendly.
491 2008-07-03 Werner Koch <wk@g10code.com>
493 * app-openpgp.c (do_readcert): New.
494 (app_local_s): Add fields IS_V2 and MAX_CERTLEN_3.
495 (app_select_openpgp): Set them and register do_readcert.
496 (do_setattr): Allow storing of the certificate.
498 2008-06-25 Werner Koch <wk@g10code.com>
500 * app-dinsig.c (do_sign): Allow for SHA256.
502 2008-06-24 Werner Koch <wk@g10code.com>
504 * app-common.h (app_ctx_s): Renamed reset_mode parameter of
505 change_pin to mode_Flags and make it an unsigned int.
506 (APP_CHANGE_FLAG_RESET, APP_CHANGE_FLAG_NULLPIN): New.
507 * app-openpgp.c (do_change_pin): Adjust for that.
509 * command.c (cmd_passwd): Add option --nullpin.
510 * app-nks.c (do_check_pin, do_change_pin): New.
511 (app_select_nks): Register new functions.
513 2008-04-21 Moritz Schulte <mo@g10code.com> (wk)
515 * app-openpgp.c (verify_a_chv): Make use of the default CHV flag.
517 2008-03-26 Werner Koch <wk@g10code.com>
519 * app-openpgp.c (verify_chv3): Support the keypad.
521 2008-02-09 Marcus Brinkmann <marcus@g10code.de>
523 * scdaemon.c (main): Use CONFIG_FILENAME as filename if it is set
524 in gpgconf-list output.
526 2007-12-10 Werner Koch <wk@g10code.com>
528 * app-openpgp.c (do_decipher): Take care of cryptograms shorter
529 that 128 bytes. Fixes bug#851.
531 2007-11-14 Werner Koch <wk@g10code.com>
533 * scdaemon.c (main): Pass STANDARD_SOCKET flag to
534 create_server_socket.
536 2007-11-13 Werner Koch <wk@g10code.com>
538 * scdaemon.c (start_connection_thread): Do not call
539 assuan_sock_check_nonce if we are running in --server mode.
541 2007-11-07 Werner Koch <wk@g10code.com>
543 * scdaemon.h: Remove errors.h.
545 2007-10-02 Werner Koch <wk@g10code.com>
547 * command.c (cmd_getinfo): Add "pid" subcommand.
549 2007-10-01 Werner Koch <wk@g10code.com>
551 * scdaemon.c (create_server_socket): Use Assuan socket wrappers
552 and remove Windows specific code.
554 (start_connection_thread): Check nonce.
556 2007-09-14 Marcus Brinkmann <marcus@g10code.de>
558 * scdaemon.c (main): New variable STANDARD_SOCKET, which is 1 for
559 W32 targets. Use it for create_socket_name.
561 2007-08-07 Werner Koch <wk@g10code.com>
563 * tlv.c, tlv.h: Move to ../common/.
565 2007-08-02 Werner Koch <wk@g10code.com>
567 * scdaemon.c: Include gc-opt-flags.h and remove their definition
570 2007-08-01 Werner Koch <wk@g10code.com>
572 * apdu.c (send_le): Implement exact length hack. Suggested by
575 2007-07-05 Werner Koch <wk@g10code.com>
577 * command.c (has_option_name, skip_options): New.
578 (cmd_genkey): Add option --timestamp.
579 (cmd_writekey): Enter confidential mode while inquiring the key data.
581 * app.c (app_genkey): Add arg CREATETIME.
582 * app-common.h (app_ctx_s): Likewise
583 * app-openpgp.c (do_genkey): Ditto. Use it.
586 2007-07-04 Werner Koch <wk@g10code.com>
588 * command.c (cmd_getinfo): New subcommand "version".
590 * scdaemon.c (TIMERTICK_INTERVAL): New.
591 (handle_connections) [W32]: Enable a dummy sigs event.
592 (handle_connections): Use a proper count for select and not
594 (fixed_gcry_pth_init, main): Kludge to fix pth initialization.
596 2007-06-21 Werner Koch <wk@g10code.com>
598 * scdaemon.h (ctrl_t): Remove. It is now declared in ../common/util.h.
600 2007-06-18 Marcus Brinkmann <marcus@g10code.de>
602 * scdaemon.c (main): Percent escape output of --gpgconf-list.
604 2007-06-12 Werner Koch <wk@g10code.com>
606 * scdaemon.c (main): Replace some calls by init_common_subsystems.
608 2007-06-11 Werner Koch <wk@g10code.com>
610 * Makefile.am (scdaemon_LDADD): Use libcommonpth macro.
612 * command.c (initialize_module_command): New.
613 * scdaemon.c (main) [W32]: Do not use sigpipe code.
614 (main): Call initialize_module_command.
616 2007-06-06 Werner Koch <wk@g10code.com>
618 * app-openpgp.c (do_sign): Fix arithmetic on void*.
620 * app.c (dump_mutex_state) [W32]: Handle the W32Pth case.
622 * apdu.c: Remove dynload.h.
624 * scdaemon.c (i18n_init): Remove.
626 2007-04-20 Werner Koch <wk@g10code.com>
628 * sc-copykeys.c (my_gcry_logger): Removed.
629 (main): Call setup_libgcrypt_logging helper.
630 * scdaemon.c (my_gcry_logger): Removed.
631 (main): Call setup_libgcrypt_logging helper.
633 2007-04-03 Werner Koch <wk@g10code.com>
635 * command.c (cmd_getinfo): New subcommand "reader_list".
636 * ccid-driver.c (scan_or_find_devices): Ignore EBUSY in scan mode
637 for special transports.
639 2007-03-07 Werner Koch <wk@g10code.com>
641 * app-dinsig.c: Include i18n.h.
642 (verify_pin): Support PIN pads.
643 * app-nks.c (verify_pin): Ditto.
645 * ccid-driver.c (bulk_in): Handle time extension before checking
647 (ccid_transceive_secure): Support the Cherry XX44 keyboard.
648 Kudos to the nice folks at Cherry for helping with that.
650 2007-02-18 Werner Koch <wk@g10code.com>
652 * scdaemon.c (DEFAULT_PCSC_DRIVER): Add a default for OS X.
654 2007-01-25 Werner Koch <wk@g10code.com>
656 * Makefile.am (scdaemon_LDADD): Added LIBICONV. Noted by Billy
659 2006-12-21 Werner Koch <wk@g10code.com>
661 * app-openpgp.c (verify_chv2): Factored most code out into...
662 (verify_a_chv): ... new.
663 (do_sign): Factored verification code out to new function and
664 take care of a keypad entered PIN.
665 (compare_fingerprint): Print an additional diagnostic.
667 2006-11-28 Werner Koch <wk@g10code.com>
669 * apdu.c (send_le, apdu_send_direct): Increase RESULTLEN to 258 to
670 allow for full 256 byte and the status word. This might break
671 some old PC/SC drivers or cards, but we will see. Suggested by
674 2006-11-23 Werner Koch <wk@g10code.com>
676 * command.c (scd_command_handler): Fixed use of CTRL.
678 2006-11-21 Werner Koch <wk@g10code.com>
680 * Makefile.am (libexec_PROGRAMS): Put pscs-wrapper into libexec.
681 Renamed to gnupg-pcsc-wrapper.
682 * apdu.c (open_pcsc_reader): Use GNUPG_LIBEXECDIR to accces the
683 wrapper. Suggested by Eric Dorland.
685 2006-11-20 Werner Koch <wk@g10code.com>
687 * app-openpgp.c (verify_chv2): Support for keypads (only CHV2).
689 * ccid-driver.c (ccid_transceive_secure): Made it work for Kaan
692 2006-11-17 Werner Koch <wk@g10code.com>
694 * ccid-driver.c (scan_or_find_devices): Use DEBUGOUT_2 instead of
695 log_debug. Removed few other log_debug.
697 * iso7816.c (iso7816_check_keypad): Allow for a SW of 0.
699 * command.c (pin_cb): New mode to prompt for a keypad entry.
701 * scdaemon.c (main) <gpgconf-list>: Add disable-keypad.
703 2006-11-15 Werner Koch <wk@g10code.com>
705 * app-p15.c (read_ef_odf): Cast one printf arg.
707 * scdaemon.h (struct server_control_s): Add field THREAD_STARTUP.
708 * command.c (scd_command_handler): Add new arg CTRL.
709 * scdaemon.c (scd_init_default_ctrl): Made static.
710 (scd_deinit_default_ctrl): New.
711 (start_connection_thread): Call init/deinit of ctrl.
712 (handle_connections): Allocate CTRL.
714 * apdu.c (PCSC_ERR_MASK): New.
715 (reset_pcsc_reader, pcsc_get_status, pcsc_send_apdu)
716 (close_pcsc_reader, open_pcsc_reader): Use it after shifting error
717 values. Reported by Henrik Nordstrom. Fixes bug #724.
719 2006-10-24 Werner Koch <wk@g10code.com>
721 * scdaemon.h (GCRY_MD_USER_TLS_MD5SHA1): New.
722 (MAX_DIGEST_LEN): Increased to 36.
723 * app-p15.c (do_sign): Support for TLS_MD5SHA1.
724 (do_auth): Detect TLS_MD5SHA1.
725 (do_sign): Tweaks for that digest.
727 2006-10-23 Werner Koch <wk@g10code.com>
729 * scdaemon.c (main): New command --gpgconf-test.
731 2006-10-17 Werner Koch <wk@g10code.com>
733 * Makefile.am (scdaemon_LDADD): Link against libcommonpth.
735 2006-10-12 Werner Koch <wk@g10code.com>
737 * apdu.c: Include pth.h after unistd.h for the sake of newer Pth
740 2006-10-11 Werner Koch <wk@g10code.com>
742 * app-openpgp.c (do_sign): Redirect to do_auth for OpenPGP.3.
744 2006-10-06 Werner Koch <wk@g10code.com>
746 * Makefile.am (AM_CFLAGS): Use PTH version of libassuan.
747 (scdaemon_LDADD): Ditto.
749 * scdaemon.h (send_status_info): Mark with sentinel attribute.
751 2006-10-02 Marcus Brinkmann <marcus@g10code.de>
753 * command.c (update_reader_status_file): Increase buffer of
754 NUMBUF2 (fixing typo).
756 2006-09-24 Marcus Brinkmann <marcus@g10code.de>
758 * app-openpgp.c (do_sign): Advance INDATA by the SHA1 resp. RMD160
761 2006-09-14 Werner Koch <wk@g10code.com>
763 Replaced all call gpg_error_from_errno(errno) by
764 gpg_error_from_syserror().
766 * command.c (scd_command_handler): Replaced
767 init_connected_socket_server by init_socket_server_ext.
769 2006-09-07 Werner Koch <wk@g10code.com>
771 * command.c (update_reader_status_file): Execute an event handler
774 2006-09-06 Werner Koch <wk@g10code.com>
776 * apdu.c (pcsc_end_transaction):
777 * pcsc-wrapper.c (pcsc_end_transaction: Fixed dclaration.
778 Reported by Bob Dunlop.
780 * scdaemon.h (CTRL,APP): Removed and changed everywhere to
783 Replaced all Assuan error codes by libgpg-error codes. Removed
784 all map_to_assuan_status and map_assuan_err.
786 * scdaemon.c (main): Call assuan_set_assuan_err_source to have Assuan
787 switch to gpg-error codes.
788 * command.c (set_error): Adjusted.
790 2006-09-02 Marcus Brinkmann <marcus@g10code.de>
792 * command.c (get_reader_slot): Return the slot_table index, not
793 the APDU slot number.
794 (update_reader_status_file): Use the slot_table index in the
795 update_card_removed invocation.
797 2006-09-01 Marcus Brinkmann <marcus@g10code.de>
799 * command.c (cmd_getinfo): Handle status command.
801 2006-08-30 Marcus Brinkmann <marcus@g10code.de>
803 * command.c (do_reset): Delay resetting CTRL->reader_slot until
804 after update_card_removed invocation.
806 2006-08-28 Marcus Brinkmann <marcus@g10code.de>
808 * app-openpgp.c (do_decipher, do_sign): Allow "OPENPGP.2"
809 resp. "OPENPGP.1" for KEYIDSTR.
811 2006-08-21 Werner Koch <wk@g10code.com>
813 * pcsc-wrapper.c (handle_open, handle_close): Reset card and
814 protocol on error/close.
815 (handle_status): Don't set the state if the state is unknown.
816 (handle_reset): Ignore an error if already disconnected. May
817 happen due to system wake-up after hibernation. Suggested by Bob
820 2006-06-28 Werner Koch <wk@g10code.com>
822 * app-openpgp.c (do_writekey): Fixed computation of memmove
823 length. This led to garbled keys if E was larger than one byte.
824 Thanks to Achim Pietig for hinting at the garbled E.
826 2006-06-09 Marcus Brinkmann <marcus@g10code.de>
828 * Makefile.am (scdaemon_LDADD): Add $(NETLIBS).
830 2006-04-14 Marcus Brinkmann <marcus@g10code.de>
832 * app.c (select_application): Cover up a slot mismatch error in
833 case it happens (it shouldn't happen).
834 (release_application): Use APP->slot. Lock the reader.
835 (application_notify_card_removed): Lock the reader.
837 2006-04-11 Werner Koch <wk@g10code.com>
839 * command.c (hex_to_buffer): New.
842 2006-04-03 Werner Koch <wk@g10code.com>
844 * scdaemon.c [__GLIBC__]: Default to libpcsclite.so.1.
846 2006-03-21 Werner Koch <wk@g10code.com>
848 * command.c (cmd_pksign): Add --hash option.
850 2006-03-01 Werner Koch <wk@g10code.com>
852 * command.c (status_file_update_lock): New.
853 (scd_update_reader_status_file): Use lock and factor existing code
855 (update_reader_status_file): .. this.
856 (do_reset): Use the lock and call update_reader_status_file.
858 2006-02-20 Werner Koch <wk@g10code.com>
860 * apdu.c (open_pcsc_reader): Fixed double free. Thanks to Moritz.
862 2006-02-09 Werner Koch <wk@g10code.com>
864 * command.c (get_reader_slot, do_reset)
865 (scd_update_reader_status_file): Rewrote.
867 * app.c (release_application): Factored code out to ..
868 (deallocate_app): new function.
869 (select_application): Introduce new saved application stuff.
870 (application_notify_card_removed): New.
871 * command.c (update_card_removed): Call it here.
872 (do_reset): And here.
874 * app.c (check_application_conflict): New.
875 * command.c (open_card): Use it here.
876 (cmd_restart): New command.
878 * command.c (cmd_lock): Fixed --wait option to actually terminate.
880 2006-02-08 Werner Koch <wk@g10code.com>
882 * ccid-driver.c (ccid_get_atr): Read Parameter and select T=1
883 using these parameters.
884 (scan_or_find_devices): Check for NULL r_fd.
886 2006-02-02 Werner Koch <wk@g10code.com>
888 * ccid-driver.c (special_transport): New
889 (ccid_open_reader, do_close_reader, ccid_shutdown_reader)
890 (bulk_out, bulk_in): Add support for CardMan 4040 reader.
892 * ccid-driver.c (scan_or_find_devices): Factored most code out to
893 (scan_or_find_usb_device): .. new.
894 (make_reader_id): Fixed vendor mask.
896 2006-01-01 Werner Koch <wk@g10code.com>
898 * app-openpgp.c (do_sign): Give user error if hash algorithm is
899 not supported by the card.
901 2005-12-06 Werner Koch <wk@g10code.com>
903 * apdu.c (open_pcsc_reader): Check that pcsc-wrapper is actually
906 2005-11-23 Werner Koch <wk@g10code.com>
908 * app-nks.c (verify_pin): Give a special error message for a Nullpin.
910 2005-10-29 Werner Koch <wk@g10code.com>
912 * ccid-driver.c (send_escape_cmd): New args RESULT, RESULTLEN and
913 RESULTMAX. Changed all callers.
914 (ccid_transceive_escape): New.
916 2005-10-27 Werner Koch <wk@g10code.com>
918 * apdu.c [__CYGWIN__]: Make cygwin environment similar to _WIN32.
919 Suggested by John P. Clizbe.
920 * scdaemon.c [__CYGWIN__]: Set default PC/SC driver to winscard.dll.
922 2005-10-19 Werner Koch <wk@g10code.com>
924 * ccid-driver.h (CCID_DRIVER_ERR_NO_KEYPAD): New.
925 * apdu.h (SW_HOST_NO_KEYPAD): New.
926 * iso7816.h (struct iso7816_pininfo_s): New.
927 * iso7816.c (map_sw): Support new code.
928 (iso7816_check_keypad): New.
929 (iso7816_verify_kp, iso7816_change_reference_data_kp)
930 (iso7816_reset_retry_counter_kp): New. Extended versions of the
932 * apdu.c (host_sw_string): Support new code.
933 (reader_table_s): New field CHECK_KEYPAD.
934 (new_reader_slot, open_ct_reader, open_pcsc_reader)
935 (open_ccid_reader, open_rapdu_reader): Initialize it.
936 (check_ccid_keypad): New.
937 (apdu_check_keypad): New.
938 (apdu_send_le): Factored all code out to ...
939 (send_le): .. new. Takes an additional arg; changed all callers
940 of the orginal function to use this one with a NULL for the new
942 (apdu_send_simple_kp): New.
943 (ct_send_apdu, pcsc_send_apdu, my_rapdu_send_apdu)
944 (send_apdu_ccid): New arg PININFO.
945 (send_apdu_ccid): Use the new arg.
947 * scdaemon.c: New option --disable-keypad.
949 2005-10-08 Marcus Brinkmann <marcus@g10code.de>
951 * Makefile.am (scdaemon_LDADD): Add ../gl/libgnu.a after
952 ../common/libcommon.a.
954 2005-09-20 Werner Koch <wk@g10code.com>
956 * app-dinsig.c (verify_pin): Try ISO 9564 BCD encoding.
958 * iso7816.c (iso7816_select_application): Add arg FLAGS. Changed
959 all callers to pass 0.
960 * app-openpgp.c (app_select_openpgp): But this one requires a
963 * app-p15.c (app_select_p15): Don't use select application for the
966 2005-09-09 Werner Koch <wk@g10code.com>
968 * pcsc-wrapper.c (main): Removed bogus free.
970 * app-p15.c (do_auth): New.
971 (do_getattr): New attribs $AUTHKEYID and $DISPSERIALNO.
972 * app-openpgp.c (do_getattr): Ditto.
974 2005-09-08 Werner Koch <wk@g10code.com>
976 * app-openpgp.c (do_getattr): New key $AUTHKEYID.
978 2005-09-06 Werner Koch <wk@g10code.com>
980 * app-p15.c (do_sign): Tweaked for BELPIC cards.
981 (read_home_df): New arg R_BELPIC.
982 (app_select_p15): Set card type for BELPIC.
984 2005-09-05 Werner Koch <wk@g10code.com>
986 * iso7816.c (iso7816_select_path): New.
987 * app-p15.c (select_ef_by_path): Allow for direct path selection.
988 (app_select_p15): Try using the Belgian variant of pkcs#15.
990 (read_ef_odf): Generalized.
991 (read_ef_tokeninfo): New.
992 (read_p15_info): Set serialnumber from TokenInfo.
993 (app_select_p15): Don't munge serialNumber - that must be done
996 * iso7816.c (iso7816_read_binary): Use Le=0 when reading all
997 data. Handle 6C00 error and take 6B00 as indication for EOF.
998 * apdu.h (SW_EXACT_LENGTH_P): New.
999 * apdu.c (new_reader_slot, reset_pcsc_reader, pcsc_get_status)
1000 (open_pcsc_reader): Set new reader state IS_T0.
1001 (apdu_send_le): When doing T=0 make sure not to send Lc and Le.
1002 Problem reported by Carl Meijer.
1003 (apdu_send_direct): Initialize RESULTLEN.
1004 * pcsc-wrapper.c (handle_status): Return the current protocol as
1007 2005-08-05 Werner Koch <wk@g10code.com>
1009 * apdu.c (open_rapdu_reader): Set the reader number.
1011 2005-07-05 Werner Koch <wk@g10code.com>
1013 * app-openpgp.c (do_readkey): Return a mallcoed copy of the key as
1014 required by the description. Thanks to Moritz for tracking this
1017 2005-06-21 Werner Koch <wk@g10code.com>
1019 * scdaemon.c (main): ifdef call to ccid_set_debug_level.
1021 * apdu.c (reset_pcsc_reader, open_pcsc_reader): Cast size_t to
1024 2005-06-06 Werner Koch <wk@g10code.com>
1026 * scdaemon.c (main): New option --debug-allow-core-dump.
1028 2005-06-03 Werner Koch <wk@g10code.com>
1030 * scdaemon.c (handle_connections): Make sure that the signals we
1031 are handling are not blocked.Block signals while creating new
1033 (handle_connections): Include the file descriptor into the name of
1036 2005-06-02 Werner Koch <wk@g10code.com>
1038 * app.c (app_dump_state, dump_mutex_state): New.
1039 * scdaemon.c (handle_signal): Print it on SIGUSR1.
1041 * app-openpgp.c (do_writekey): Typo fix.
1043 * command.c (open_card): Check for locked state even if an
1044 application context is available.
1046 * app-common.h: Add REF_COUNT field.
1047 * app.c (release_application, select_application): Implement
1048 reference counting to share the context beween connections.
1050 * app.c (lock_reader, unlock_reader): Take SLOT instead of APP as
1051 argument. Changed all callers.
1052 (select_application): Unlock the reader on error. This should fix
1053 the hangs I noticed last week.
1055 * scdaemon.h: Removed card_ctx_t cruft.
1057 2005-06-01 Werner Koch <wk@g10code.com>
1059 * scdaemon.c: Include mkdtemp.h.
1061 2005-05-31 Werner Koch <wk@g10code.com>
1063 * tlv.c [GNUPG_MAJOR_VERSION==1]: Define constants instead of
1064 including a gnupg 1.4 header.
1066 2005-05-30 Werner Koch <wk@g10code.com>
1068 * tlv.c: Add hack to compile without gpg-error.h when used with
1071 2005-05-23 Werner Koch <wk@g10code.com>
1073 * Makefile.am: Do not build sc-copykeys anymore.
1075 * app-openpgp.c (app_openpgp_storekey, app_openpgp_readkey)
1076 (app_openpgp_cardinfo): Removed.
1078 * ccid-driver.c (parse_ccid_descriptor): SCR335 FW version 5.14 is
1080 (do_close_reader): Never do a reset. The caller should instead
1081 make sure that the reader has been closed properly. The new retry
1082 code in ccid_slot_status will make sure that the readersatrts up
1083 fine even if the last process didn't closed the USB connection
1085 (ccid_get_atr): For certain readers try switching to ISO mode.
1086 Thanks to Ludovic Rousseau for this hint and the magic numbers.
1087 (print_command_failed): New.
1088 (bulk_in): Use it here. Add new arg NO_DEBUG.
1089 (ccid_slot_status): Disabled debugging.
1091 2005-05-21 Werner Koch <wk@g10code.com>
1093 * scdaemon.c (handle_signal): Print thread info on SIGUSR1.
1095 2005-05-20 Werner Koch <wk@g10code.com>
1097 * ccid-driver.c: Replaced macro DEBUG_T1 by a new debug level.
1098 (parse_ccid_descriptor): Mark SCR335 firmware version 5.18 good.
1099 (ccid_transceive): Arghhh. The seqno is another bit in the
1100 R-block than in the I block, this was wrong at one place.
1102 * scdaemon.c: New options --debug-ccid-driver and
1103 --debug-disable-ticker.
1105 * app-openpgp.c (do_genkey, do_writekey): Factored code to check
1106 for existing key out into ..
1107 (does_key_exist): .. New function.
1109 2005-05-19 Werner Koch <wk@g10code.com>
1111 * tlv.c (parse_sexp): New.
1113 * command.c (cmd_writekey): New.
1114 * app.c (app_writekey): New.
1115 * app-common.c (app_t): Add function ptr WRITEKEY.
1116 * app-openpgp.c (do_writekey): New.
1118 * app-openpgp.c (do_readkey) [GNUPG_MAJOR_VERSION==1]: Return error.
1119 * app-common.h (app_t) [GNUPG_MAJOR_VERSION==1]: Add a field to
1120 store the Assuan context.
1122 2005-05-17 Werner Koch <wk@g10code.com>
1124 * scdaemon.c: Removed non-pth code paths.
1125 (create_socket_name, create_server_socket): New. Taken from
1127 (cleanup): Changed to adjust for SOCKET_NAME now being malloced.
1128 (ticker_thread): Always use pth_event_occurred; it is again
1129 defined for all decent PTH versions.
1130 (handle_connections): New. Based on the gpg-agent code.
1131 (start_connection_thread): Ditto.
1132 (ticker_thread): Removed.
1133 (cleanup_sh): Removed.
1134 (main): Run the handler for the pipe server in a separate
1135 thread. This replaces the old ticker thread.
1136 (scd_get_socket_name): New.
1137 * command.c (cmd_getinfo): New command GETINFO.
1138 (scd_command_handler): Renamed argument and changed code to use an
1139 already connected FD.
1141 2005-05-15 Werner Koch <wk@g10code.com>
1143 * app.c, app-common.h, app-nks.c, app-p15.c, app-dinsig.c
1144 * app-openpgp.c: Change most function return types from int to
1146 * command.c (pin_cb): Ditto.
1147 * sc-copykeys.c (pincb): Ditto.
1149 * app.c (lock_reader, unlock_reader): New. Changed call handler
1150 wrappers to make use of these functions.
1152 2005-05-07 Werner Koch <wk@g10code.com>
1154 * ccid-driver.c (do_close_reader): Don't do a reset before close.
1155 Some folks reported that it makes the SCR335 hang less often.
1156 Look at the source on how to re-enable it.
1158 2005-04-27 Werner Koch <wk@g10code.com>
1160 * app-p15.c (micardo_mse): New.
1162 * iso7816.c (iso7816_manage_security_env): Allow passing DATA as
1163 NULL to indicate an empty Lc.
1164 * tlv.c (find_tlv): Check that a found object fits into the
1166 (find_tlv_unchecked): New as replacement for the old non-checking
1168 * app.c (select_application): Keep on using the non-checking
1170 * app-openpgp.c (get_one_do, dump_all_do): Ditto.
1173 Removal of the old OpenSC based code.
1175 * app-p15.c: New. Basic support for pkcs15 cards without OpenSC.
1176 There are quite a couple of things missing but at least I can use
1177 my old TCOS cards from the Aegypten-1 development for signing.
1178 * app.c (select_application): Detect pkcs15 applications.
1179 * Makefile.am (scdaemon_SOURCES): Removed card.c, card-common.h
1180 and card-p15.c because they are now obsolete. Added app-p15.c.
1181 Removed all OpenSC stuff.
1182 * command.c (do_reset, open_card, cmd_serialno, cmd_learn)
1183 (cmd_readcert, cmd_readkey, cmd_pksign, cmd_pkdecrypt): Removed
1184 all special cases for the old card.c based mechanisms.
1185 * scdaemon.c, apdu.c: Removed all special cases for OpenSC.
1187 2005-04-20 Werner Koch <wk@g10code.com>
1189 * command.c: Use GPG_ERR_LOCKED instead of EBUSY.
1191 2005-04-14 Werner Koch <wk@g10code.com>
1193 * app-openpgp.c (retrieve_key_material): Rewritten. Return a
1195 (retrieve_next_token): Removed.
1196 (retrieve_fpr_from_card): Rewritten to make use of DO caching and
1197 to take the KEYNO as arg.
1198 (get_public_key): Renamed variable for clarity.
1200 2005-04-12 Werner Koch <wk@g10code.com>
1202 Basic support for several sessions.
1204 * command.c (scd_command_handler): Replace the primary_connection
1205 stuff by a real connection list. Release the local context on
1207 (scd_update_reader_status_file): Update accordingly. Send signal
1208 to all connections who registered an event signal.
1209 (cmd_lock, cmd_unlock, register_commands): New commands LOCK and
1211 (cmd_setdata, cmd_pksign, cmd_pkauth, cmd_pkdecrypt, cmd_setattr)
1212 (cmd_genkey, cmd_passwd, cmd_checkpin): Return an error if reader
1214 (do_reset): Handle locking.
1215 (open_card): Ditto. Share the reader slot with other sessions.
1216 (get_reader_slot): New.
1217 (update_card_removed): New. Use it in the TEST_CARD_REMOVAL macro.
1219 2005-04-07 Werner Koch <wk@g10code.com>
1221 * app-openpgp.c (do_check_pin): Add hack to allow verification of
1223 (get_public_key): Don't use gcry functions to create S-expressions.
1224 (do_deinit, do_readkey, do_genkey, send_keypair_info): Adjust for
1227 2005-03-29 Moritz Schulte <moritz@g10code.com>
1229 * app-openpgp.c (retrieve_fpr_from_card): New function.
1230 (retrieve_next_token): New function.
1231 (retrieve_key_material): New function.
1232 (get_public_key): Implement retrival of key through expernal
1233 helper (gpg) in case the openpgp card is not cooperative enough.
1235 2005-03-16 Werner Koch <wk@g10code.com>
1237 * ccid-driver.c (parse_ccid_descriptor): Make SCM workaround
1238 reader type specific.
1239 (scan_or_find_devices): Do not check the interface subclass in the
1240 SPR532 kludge, as this depends on the firmware version.
1241 (ccid_get_atr): Get the Slot status first. This solves the
1242 problem with readers hanging on recent Linux 2.6.x.
1243 (bulk_in): Add argument TIMEOUT and changed all callers to pass an
1244 appropriate one. Change the standard timeout from 10 to 5 seconds.
1245 (ccid_slot_status): Add a retry code with an initial short timeout.
1246 (do_close_reader): Do an usb_reset before closing the reader.
1248 2005-02-25 Werner Koch <wk@g10code.com>
1250 * app-openpgp.c (get_public_key): Make sure not to return negative
1252 (do_sign): Allow passing of indata with algorithm prefix.
1253 (do_auth): Allow OPENPGP.3 as an alternative ID.
1255 * app.c (app_getattr): Return just the S/N but not the timestamp.
1257 2005-02-24 Werner Koch <wk@g10code.com>
1259 * app.c (app_getattr): Return APPTYPE or SERIALNO type even if the
1260 application does dot support the getattr call.
1262 * app-openpgp.c (get_one_do): Never try to get a non cacheable
1263 object from the cache.
1264 (get_one_do): Add new arg to return an error code. Changed all
1266 (do_getattr): Let it return a proper error code.
1268 * app.c (select_application): Return an error code and the
1269 application context in an new arg.
1270 * command.c (open_card): Adjusted for that. Don't use the
1271 fallback if no card is present. Return an error if the card has
1272 been removed without a reset.
1273 (do_reset, cmd_serialno): Clear that error flag.
1274 (TEST_CARD_REMOVAL): New. Use it with all command handlers.
1275 (scd_update_reader_status_file): Set the error flag on all changes.
1277 * scdaemon.c (ticker_thread): Termintate if a shutdown is pending.
1279 * apdu.c: Added some PCSC error codes.
1280 (pcsc_error_to_sw): New.
1281 (reset_pcsc_reader, pcsc_get_status, pcsc_send_apdu)
1282 (open_pcsc_reader): Do proper error code mapping.
1284 2005-03-16 Werner Koch <wk@g10code.com>
1286 * ccid-driver.c (parse_ccid_descriptor): Make SCM workaround
1287 reader type specific.
1288 (scan_or_find_devices): Do not check the interface subclass in the
1289 SPR532 kludge, as this depends on the firmware version.
1290 (ccid_get_atr): Get the Slot status first. This solves the
1291 problem with readers hanging on recent Linux 2.6.x.
1293 2005-02-22 Werner Koch <wk@g10code.com>
1295 * app-openpgp.c (app_local_s): New field PK.
1296 (do_deinit, do_genkey, app_openpgp_storekey): Clear it.
1297 (get_public_key, send_keypair_info): New.
1298 (do_learn_status): Send KEYPAIR info
1300 * app-common.h (app_ctx_t): Add function pointer READKEY.
1301 * app.c (app_readkey): New.
1302 * command.c (cmd_readkey): Use READKEY function if possible.
1304 2005-01-26 Werner Koch <wk@g10code.com>
1306 * ccid-driver.c (parse_ccid_descriptor): Need the CSM workaround
1307 also for newer firmware versions. Need to get a list of fixed
1308 firmware versions and use that.
1310 2005-01-25 Werner Koch <wk@g10code.com>
1312 * apdu.c (apdu_send_le, apdu_send_direct): Fix some compiler
1315 * app-openpgp.c (get_cached_data): New arg GET_IMMEDIATE to bypass
1316 the cache. Changed all callers.
1317 (get_one_do): Bypass the cache if the value would have been read
1318 directly for v1.1 cards.It makes things a bit slower but obnly for
1319 1.0 cards and there are not that many cards out in the wild. This
1320 is required to fix a caching bug when generating new keys; as a
1321 side effect of the retrieval of the the C4 DO from the 6E DO the
1322 cached fingerprint will get updated to the old value and later
1323 when signing the generated key the checking of the fingerprint
1324 fails because it won't match the new one. Thanks to Moritz for
1325 analyzing this problem.
1326 (verify_chv3): Removed the CHV status reread logic because we
1327 won't cache the C4 DO anymore.
1329 2004-12-28 Werner Koch <wk@g10code.com>
1331 * ccid-driver.c (find_endpoint): New.
1332 (scan_or_find_devices): Add new args to return endpoint info and
1334 (ccid_open_reader, ccid_shutdown_reader): Take care of these new
1336 (bulk_in, bulk_out): Use the correct endpoints.
1337 (ccid_transceive_apdu_level): New.
1338 (ccid_transceive): Divert to above.
1339 (parse_ccid_descriptor): Allow APDU level exchange mode.
1340 (do_close_reader): Pass the interface number to usb_release_interface.
1342 2004-12-21 Werner Koch <wk@g10code.com>
1344 * scdaemon.c (main): Use default_homedir().
1346 2004-12-18 Werner Koch <wk@g10code.com>
1348 * scdaemon.c (main) [W32]: Remove special Pth initialize..
1350 * scdaemon.h (map_assuan_err): Define in terms of
1351 map_assuan_err_with_source.
1353 2004-12-15 Werner Koch <wk@g10code.com>
1355 * scdaemon.c [W32]: Various hacks to make it run under W32.
1357 * command.c (scd_update_reader_status_file) [W32]: Don't use kill.
1359 * apdu.c [W32]: Disable use of pcsc_wrapper.
1361 * Makefile.am (scdaemon_LDADD): Reorder libs.
1362 (sc_copykeys_LDADD): Add libassuan because it is needed for W32.
1364 2004-12-06 Werner Koch <wk@g10code.com>
1366 * Makefile.am (pkglib_PROGRAMS): Build only for W32.
1368 2004-10-22 Werner Koch <wk@g10code.com>
1370 * app-openpgp.c (verify_chv3): The minium length for CHV3 is
1371 8. Changed string to match the other ones.
1373 2004-10-21 Werner Koch <wk@g10code.com>
1375 * app-openpgp.c (do_sign): Replace asprintf by direct allocation.
1376 This avoids problems with missing vasprintf implementations in
1379 * app-common.h (app_openpgp_storekey: Add prototype.
1381 2004-10-20 Werner Koch <wk@g10code.com>
1383 * sc-investigate: Removed.
1384 * Makefile.am (sc_investigate): Removed.
1386 * pcsc-wrapper.c (load_pcsc_driver): Load get_status_change func.
1387 (handle_open): Succeed even without a present card.
1388 (handle_status, handle_reset): New.
1390 * apdu.c (apdu_open_reader): Load pcsc_get_status_change fucntion.
1391 (pcsc_get_status): Implemented.
1392 (reset_pcsc_reader): Implemented.
1393 (open_pcsc_reader): Succeed even with no card inserted.
1394 (open_ccid_reader): Set LAST_STATUS.
1396 * iso7816.c (iso7816_select_application): Always use 0 for P1.
1398 2004-10-18 Werner Koch <wk@g10code.com>
1400 * ccid-driver.c (ccid_get_atr): Reset T=1 state info.
1402 2004-10-14 Werner Koch <wk@g10code.com>
1404 * app-openpgp.c (parse_login_data): New.
1405 (app_select_openpgp): Call it.
1406 (do_setattr): Reparse it after change.
1408 2004-10-06 Werner Koch <wk@g10code.de>
1410 * ccid-driver.c (ccid_open_reader): Store the vendor ID.
1411 (ccid_transceive_secure): New.
1412 (parse_ccid_descriptor): Workaround for an SCM reader problem.
1414 2004-10-04 Werner Koch <wk@g10code.de>
1416 * ccid-driver.c (send_escape_cmd): New.
1418 2004-09-30 Werner Koch <wk@g10code.com>
1420 * Makefile.am: Adjusted for gettext 0.14.
1422 * app-openpgp.c (do_sign): Add the error string to the verify
1425 2004-09-27 Werner Koch <wk@g10code.com>
1429 * app-openpgp.c: Made all strings translatable.
1430 (verify_chv3) [GNUPG_MAJOR_VERSION]: Make opt.allow_admin
1431 available for use in gnupg 2.
1432 (verify_chv3): Reimplemented countdown showing to use only
1433 functions from this module. Flush the CVH status cache on a
1435 (get_one_do): Hack to bypass the cache for cards versions > 1.0.
1436 (store_fpr): Store the creation date for card version > 1.0.
1438 * app-openpgp.c (app_openpgp_storekey): Call flush_cache.
1439 (get_cached_data): Move local data initialization to ..
1440 (app_select_openpgp): .. here. Read some flags for later use.
1441 (do_getattr): New read-only attribute EXTCAP.
1443 * apdu.c (open_pcsc_reader): Do not print empty reader string.
1445 * ccid-driver.c (do_close_reader): Factored some code out from ...
1446 (ccid_close_reader): ..here.
1447 (ccid_shutdown_reader): New.
1449 * apdu.c (apdu_shutdown_reader): New.
1450 (shutdown_ccid_reader): New.
1452 * apdu.c (open_ccid_reader): New arg PORTSTR. Pass it to
1454 (apdu_open_reader): Pass portstr to open_ccid_reader.
1455 (apdu_open_reader): No fallback if a full CCID reader id has been
1458 * ccid-driver.c (ccid_get_reader_list): New.
1459 (ccid_open_reader): Changed API to take a string for the reader.
1460 Removed al the cruft for the libusb development vesion which seems
1461 not to be maintained anymore and there are no packages anyway.
1462 The stable library works just fine.
1463 (struct ccid_reader_id_s): Deleted and replaced everywhere by a
1465 (usb_get_string_simple): Removed.
1466 (bulk_in): Do valgrind hack here and not just everywhere.
1468 * ccid-driver.c (read_device_info): Removed.
1469 (make_reader_id, scan_or_find_devices): New.
1470 (ccid_open_reader): Simplified by make use of the new functions.
1471 (ccid_set_debug_level): New. Changed the macros to make use of
1472 it. It has turned out that it is often useful to enable debugging
1473 at runtime so I added this option.
1475 From gnupg 1.3 - David Shaw <dshaw@jabberwocky.com>
1477 * app-openpgp.c (verify_chv3): Show a countdown of how many wrong
1478 admin PINs can be entered before the card is locked.
1480 * app-openpgp.c (get_cached_data): Avoid mallocing zero since it
1481 breaks us when using --enable-m-guard.
1483 * ccid-driver.c (usb_get_string_simple): Replacement function to
1484 work with older libusb.
1486 * ccid-driver.c (read_device_info): Fix segfault when usb device
1488 (ccid_open_reader): Allow working with an even older version of
1489 libusb (usb_busses global instead of usb_get_busses()).
1491 2004-09-11 Werner Koch <wk@g10code.com>
1493 * app-openpgp.c (app_select_openpgp): Its app_munge_serialno and
1494 not app_number_serialno.
1496 2004-08-20 Werner Koch <wk@g10code.de>
1498 * app.c (select_application): Fixed serial number extraction and
1499 added the BMI card workaround.
1500 (app_munge_serialno): New.
1501 * app-openpgp.c (app_select_openpgp): Try munging serialno.
1503 2004-08-05 Werner Koch <wk@g10code.de>
1505 * scdaemon.c (main): New option --disable-application.
1506 * app.c (is_app_allowed): New.
1507 (select_application): Use it to check for disabled applications.
1509 * ccid-driver.h (CCID_DRIVER_ERR_ABORTED): New.
1510 * ccid-driver.c (ccid_open_reader): Support the stable 0.1 version
1512 (ccid_get_atr): Handle short messages.
1514 * apdu.c (my_rapdu_get_status): Implemented.
1516 2004-07-27 Moritz Schulte <moritz@g10code.com>
1518 * apdu.c: Include <signal.h>.
1520 * Makefile.am: Use @DL_LIBS@ instead of -ldl.
1522 2004-07-22 Werner Koch <wk@g10code.de>
1524 * Makefile.am: Make OpenSC lib link after libgcrypt. Do not link
1526 * apdu.c: Don't use Pth if we use OpenSC.
1527 * sc-investigate.c, scdaemon.c: Disable use of pth if OpenSC is used.
1529 * scdaemon.c (main): Bumbed thread stack size up to 512k.
1531 2004-07-16 Werner Koch <wk@gnupg.org>
1533 * apdu.c (reader_table_s): Add function pointers for the backends.
1534 (apdu_close_reader, apdu_get_status, apdu_activate)
1535 (send_apdu): Make use of them.
1536 (new_reader_slot): Intialize them to NULL.
1537 (dump_ccid_reader_status, ct_dump_reader_status): New.
1538 (dump_pcsc_reader_status): New.
1539 (open_ct_reader, open_pcsc_reader, open_ccid_reader)
1540 (open_osc_reader, open_rapdu_reader): Intialize function pointers.
1541 (ct_activate_card, ct_send_apdu, pcsc_send_apdu, osc_send_apdu)
1542 (error_string): Removed. Replaced by apdu_strerror.
1543 (get_ccid_error_string): Removed.
1544 (ct_activate_card): Remove the unused loop.
1545 (reset_ct_reader): Implemented.
1546 (ct_send_apdu): Activate the card if not yet done.
1547 (pcsc_send_apdu): Ditto.
1549 2004-07-15 Werner Koch <wk@gnupg.org>
1551 * ccid-driver.h: Add error codes.
1552 * ccid-driver.c: Implement more or less proper error codes all
1555 * apdu.c (apdu_send_direct): New.
1556 (get_ccid_error_string): Add some error code mappings.
1557 (send_apdu): Pass error codes along for drivers already supporting
1559 (host_sw_string): New.
1560 (get_ccid_error_string): Use above.
1561 (send_apdu_ccid): Reset the reader if it has not yet been done.
1562 (open_ccid_reader): Don't care if the ATR can't be read.
1563 (apdu_activate_card): New.
1564 (apdu_strerror): New.
1565 (dump_reader_status): Only enable it with opt.VERBOSE.
1566 * iso7816.c (map_sw): Add mappings for the new error codes.
1568 2004-07-02 Werner Koch <wk@gnupg.org>
1570 * apdu.c (open_ct_reader, open_pcsc_reader, open_ccid_reader)
1571 (reset_ccid_reader, open_osc_reader): Call dump_reader_status only
1574 2004-07-01 Werner Koch <wk@gnupg.org>
1576 * sc-investigate.c: Initialize Pth which is now required.
1577 (interactive_shell): New command "readpk".
1579 * app-openpgp.c (do_getattr): Fix for sending CA-FPR.
1581 2004-06-30 Werner Koch <wk@gnupg.org>
1583 * app-openpgp.c (app_openpgp_readkey): Fixed check for valid
1586 2004-06-18 Werner Koch <wk@g10code.com>
1588 * sc-investigate.c (my_read_line): Renamed from read_line.
1590 2004-06-16 Werner Koch <wk@gnupg.org>
1592 * apdu.c (osc_get_status): Fixed type in function name. Noted by
1593 Axel Thimm. Yes, I didn't tested it with OpenSC :-(.
1595 2004-04-28 Werner Koch <wk@gnupg.org>
1597 * app-openpgp.c (do_setattr): Sync FORCE_CHV1.
1599 2004-04-27 Werner Koch <wk@gnupg.org>
1601 * app-common.h: Do not include ksba.h for gnupg 1.
1603 2004-04-26 Werner Koch <wk@gnupg.org>
1605 * app-common.h: New members FNC.DEINIT and APP_LOCAL.
1606 * app.c (release_application): Call new deconstructor.
1607 * app-openpgp.c (do_deinit): New.
1608 (get_cached_data, flush_cache_item, flush_cache_after_error)
1610 (get_one_do): Replaced arg SLOT by APP. Make used of cached data.
1611 (verify_chv2, verify_chv3): Flush some cache item after error.
1612 (do_change_pin): Ditto.
1614 (do_setattr): Flush cache item.
1615 (do_genkey): Flush the entire cache.
1616 (compare_fingerprint): Use cached data.
1618 * scdaemon.c (main): Do the last change the usual way. This is so
1619 that we can easily test for versioned config files above.
1621 2004-04-26 Marcus Brinkmann <marcus@g10code.de>
1623 * scdaemon.c (main): For now, always print default filename for
1624 --gpgconf-list, and never /dev/null.
1626 2004-04-21 Werner Koch <wk@gnupg.org>
1628 * command.c (scd_update_reader_status_file): Send a signal back to
1630 (option_handler): Parse the new event-signal option.
1632 * scdaemon.c (handle_signal): Do not use SIGUSR{1,2} anymore for
1633 changing the verbosity.
1635 2004-04-20 Werner Koch <wk@gnupg.org>
1637 * command.c (scd_update_reader_status_file): Write status files.
1639 * app-help.c (app_help_read_length_of_cert): Fixed calculation of
1642 * pcsc-wrapper.c: New.
1643 * Makefile.am (pkglib_PROGRAMS): Install it here.
1644 * apdu.c (writen, readn): New.
1645 (open_pcsc_reader, pcsc_send_apdu, close_pcsc_reader): Use the
1646 pcsc-wrapper if we are using Pth.
1647 (apdu_send_le): Reinitialize RESULTLEN. Handle SW_EOF_REACHED
1650 2004-04-19 Werner Koch <wk@gnupg.org>
1652 * ccid-driver.c (parse_ccid_descriptor): Store some of the reader
1653 features away. New arg HANDLE
1654 (read_device_info): New arg HANDLE. Changed caller.
1655 (bulk_in): Handle time extension requests.
1656 (ccid_get_atr): Setup parameters and the IFSD.
1657 (compute_edc): New. Factored out code.
1658 (ccid_transceive): Use default NADs when required.
1660 2004-04-14 Werner Koch <wk@gnupg.org>
1662 * scdaemon.h (server_control_s): Add member READER_SLOT.
1663 * scdaemon.c (scd_init_default_ctrl): Initialize READER_SLOT to -1.
1664 * command.c (open_card): Reuse an open slot.
1665 (reset_notify): Just reset the slot if supported by the reader.
1666 (do_reset): Factored code from above out.
1667 (scd_command_handler): Use it for cleanup.
1669 * apdu.h: New pseudo stati SW_HOST_NOT_SUPPORTED,
1670 SW_HOST_LOCKING_FAILED and SW_HOST_BUSY.
1671 * iso7816.c (map_sw): Map it.
1673 * ccid-driver.c (ccid_slot_status): Add arg STATUSBITS.
1674 * apdu.c (apdu_get_status): New.
1675 (ct_get_status, pcsc_get_status, ocsc_get_status): New stubs.
1676 (get_status_ccid): New.
1678 (reset_ct_reader, reset_pcsc_reader, reset_osc_reader): New stubs.
1679 (reset_ccid_reader): New.
1680 (apdu_enum_reader): New.
1682 * apdu.c (lock_slot, trylock_slot, unlock_slot): New helpers.
1683 (new_reader_slot) [USE_GNU_PTH]: Init mutex.
1684 (apdu_reset, apdu_get_status, apdu_send_le): Run functions
1687 * command.c (scd_update_reader_status_file): New.
1688 * scdaemon.c (handle_tick): Call it.
1690 2004-04-13 Werner Koch <wk@gnupg.org>
1692 * scdaemon.c: Convert to a Pth application.
1693 (handle_signal, ticker_thread, handle_tick): New.
1694 (main): Fire up the ticker thread in server mode.
1696 2004-03-23 Werner Koch <wk@gnupg.org>
1698 * scdaemon.c (main) <gpgconf_list>: Fixed output for pcsc_driver.
1700 2004-03-17 Werner Koch <wk@gnupg.org>
1702 * tlv.c (parse_ber_header): Do not check for tag overflow - it
1703 does not make sense. Simplified the check for length overflow.
1705 * scdaemon.c (main) <gpgconf>: Fixed default value quoting.
1707 2004-03-16 Werner Koch <wk@gnupg.org>
1709 * app-dinsig.c: Implemented. Based on app-nks.c and card-dinsig.c
1710 * app-nks.c (get_length_of_cert): Removed.
1712 (app_help_read_length_of_cert): New. Code taken from above. New
1713 optional arg R_CERTOFF.
1715 * card-dinsig.c: Removed.
1716 * card.c (card_get_serial_and_stamp): Do not bind to the old and
1717 never finsiged card-dinsig.c.
1719 * iso7816.c (iso7816_read_binary): Allow for an NMAX > 254.
1721 2004-03-11 Werner Koch <wk@gnupg.org>
1723 * scdaemon.h (out_of_core): Removed. Replaced callers by standard
1726 * apdu.c, iso7816.c, ccid-driver.c [GNUPG_SCD_MAIN_HEADER]: Allow
1727 to include a header defined by the compiler. This helps us to
1728 reuse the source in other software.
1730 2004-03-10 Werner Koch <wk@gnupg.org>
1732 * iso7816.c (iso7816_read_record): New arg SHORT_EF. Changed all
1735 2004-02-18 Werner Koch <wk@gnupg.org>
1737 * sc-investigate.c (main): Setup the used character set.
1738 * scdaemon.c (main): Ditto.
1740 * scdaemon.c (set_debug): New. Add option --debug-level.
1741 (main): Add option --gpgconf-list.
1743 2004-02-12 Werner Koch <wk@gnupg.org>
1745 * Makefile.am: Include cmacros.am for common flags.
1747 2004-01-29 Werner Koch <wk@gnupg.org>
1749 * command.c (reset_notify): Release the application context and
1752 2004-01-28 Werner Koch <wk@gnupg.org>
1754 * iso7816.c (iso7816_manage_security_env): New.
1755 (iso7816_decipher): Add PADIND argument.
1757 2004-01-27 Werner Koch <wk@gnupg.org>
1759 * command.c (cmd_readcert, cmd_readkey): Work on a copy of LINE.
1761 * app-common.h (app_ctx_s): Added readcert field.
1762 * app.c (app_readcert): New.
1763 * tlv.c (parse_ber_header): Added; taken from libksba.
1765 2004-01-26 Werner Koch <wk@gnupg.org>
1767 * card.c (map_sc_err): Use SCD as the error source.
1769 * command.c (open_card): ADD arg NAME to allow requesting a
1770 specific application. Changed all callers.
1771 (cmd_serialno): Allow optional argument to select the desired
1776 * scdaemon.h (opt): Add READER_PORT.
1777 * scdaemon.c (main): Set it here.
1778 * app.c (app_set_default_reader_port): Removed.
1779 (select_application): Add NAME arg and figure out a
1780 default serial number from the GDO. Add SLOT arg and remove all
1782 (release_application): New.
1783 (app_write_learn_status): Output an APPTYPE status line.
1784 * command.c (open_card): Adapt for select_application change.
1785 * app-openpgp.c (app_select_openpgp): Removed SN and SNLEN args
1786 and set it directly. Changed all callers.
1788 2004-01-25 Werner Koch <wk@gnupg.org>
1790 * iso7816.c (iso7816_select_application): P1 kludge for OpenPGP
1792 * app-openpgp.c (find_tlv): Factor out this function to ..
1793 * tlv.c, tlv.h: .. new.
1795 * scdaemon.h: Introduced app_t and ctrl_t as the new types for APP
1798 2004-01-21 Werner Koch <wk@gnupg.org>
1800 * apdu.c (apdu_send_le): Treat SW_EOF_REACHED as a warning.
1802 2004-01-20 Werner Koch <wk@gnupg.org>
1804 * iso7816.c (iso7816_read_binary): New.
1805 (iso7816_select_file): New.
1806 (iso7816_list_directory): New.
1808 * sc-investigate.c: Add option -i.
1809 (select_app, read_line, interactive_shell): New.
1811 2004-01-16 Werner Koch <wk@gnupg.org>
1813 * apdu.h: Add SW_FILE_NOT_FOUND.
1814 * iso7816.c (map_sw): Map it to GPG_ERR_ENOENT.
1815 * iso7816.c (iso7816_select_file): New.
1817 * app-dinsig.c: New file w/o any real code yet.
1818 * Makefile.am (scdaemon_SOURCES,sc_investigate_SOURCES): Add file.
1820 * sc-investigate.c: Add option --disable-ccid.
1822 2003-12-19 Werner Koch <wk@gnupg.org>
1824 * apdu.c (apdu_send_le): Send a get_response with the indicated
1825 length and not the 64 bytes we used for testing.
1827 * app-openpgp.c (verify_chv2, verify_chv3, do_sign): Check the
1828 minimum length of the passphrase, so that we don't need to
1829 decrement the retry counter.
1831 2003-12-17 Werner Koch <wk@gnupg.org>
1833 * card-p15.c (p15_enum_keypairs): Replaced KRC by RC.
1834 * card-dinsig.c (dinsig_enum_keypairs): Ditto.
1836 2003-12-16 Werner Koch <wk@gnupg.org>
1838 * scdaemon.c (main): Set the prefixes for assuan logging.
1840 2003-11-17 Werner Koch <wk@gnupg.org>
1842 * scdaemon.c, scdaemon.h: New options --allow-admin and --deny-admin.
1843 * app-openpgp.c (verify_chv3): Check it here.
1845 2003-11-12 Werner Koch <wk@gnupg.org>
1847 Adjusted for API changes in Libksba.
1849 2003-10-30 Werner Koch <wk@gnupg.org>
1851 * apdu.c (close_ct_reader, close_pcsc_reader): Implemented.
1852 (get_ccid_error_string): New. Not very useful messages, though.
1854 2003-10-25 Werner Koch <wk@gnupg.org>
1856 * ccid-driver.c (ccid_open_reader): Return an error if no USB
1859 * command.c (cmd_genkey, cmd_passwd): Fixed faulty use of
1862 * apdu.c (apdu_open_reader): Hacks for PC/SC under Windows.
1864 2003-10-20 Werner Koch <wk@gnupg.org>
1866 * command.c (cmd_checkpin): New.
1867 (register_commands): Add command CHECKPIN.
1868 * app.c (app_check_pin): New.
1869 * app-openpgp.c (check_against_given_fingerprint): New. Factored
1870 out that code elsewhere.
1871 (do_check_pin): New.
1873 2003-10-10 Werner Koch <wk@gnupg.org>
1875 * ccid-driver.c (ccid_close_reader): New.
1877 * apdu.c (close_ccid_reader, close_ct_reader, close_csc_reader)
1878 (close_osc_reader, apdu_close_reader): New. Not all are properly
1881 2003-10-09 Werner Koch <wk@gnupg.org>
1883 * ccid-driver.c (ccid_transceive): Add T=1 chaining for sending.
1885 2003-10-08 Werner Koch <wk@gnupg.org>
1887 * app-openpgp.c (do_getattr): Support SERIALNO and AID.
1889 2003-10-01 Werner Koch <wk@gnupg.org>
1891 * ccid-driver.c: Detect GnuPG 1.3 and include appropriate files.
1893 * app-openpgp.c: Ditto.
1895 (generate_keypair): Renamed to ..
1896 (do_generate_keypair): .. this.
1897 * app-common.h [GNUPG_MAJOR_VERSION]: New.
1898 * iso7816.h [GNUPG_MAJOR_VERSION]: Include cardglue.h
1900 2003-09-30 Werner Koch <wk@gnupg.org>
1902 * command.c (cmd_getattr): New command GETATTR.
1903 * app.c (app_setattr): New.
1905 (do_learn_status): Reimplemented in terms of do_getattr.
1907 * app-openpgp.c (do_change_pin): Make sure CVH1 and CHV2 are
1909 (verify_chv2, verify_chv3): New. Factored out common code.
1910 (do_setattr, do_sign, do_auth, do_decipher): Change the names of
1911 the prompts to match that we have only 2 different PINs.
1912 (app_select_openpgp): Check whether the card enforced CHV1.
1913 (convert_sig_counter_value): New. Factor out code from
1916 2003-09-28 Werner Koch <wk@gnupg.org>
1918 * app-openpgp.c (dump_all_do): Use gpg_err_code and not gpg_error.
1920 2003-09-19 Werner Koch <wk@gnupg.org>
1922 * ccid-driver.c (parse_ccid_descriptor): New.
1923 (read_device_info): New.
1924 (ccid_open_reader): Check that the device has all required features.
1926 2003-09-06 Werner Koch <wk@gnupg.org>
1928 * scdaemon.c (main): --pcsc-driver again defaults to pcsclite.
1929 David Corcoran was so kind to remove the GPL incompatible
1930 advertisng clause from pcsclite.
1931 * apdu.c (apdu_open_reader): Actually make pcsc-driver option work.
1933 2003-09-05 Werner Koch <wk@gnupg.org>
1935 * ccid-driver.c: More work, data can now actually be retrieved.
1936 * ccid-driver.c, ccid-driver.h: Alternativley allow use under BSD
1939 2003-09-02 Werner Koch <wk@gnupg.org>
1941 * scdaemon.c, scdaemon.h: New option --pcsc-ccid.
1942 * ccid-driver.c, ccid-driver.h: New but far from being useful.
1943 * Makefile.am: Add above.
1944 * apdu.c: Add support for that ccid driver.
1946 2003-08-26 Timo Schulz <twoaday@freakmail.de>
1948 * apdu.c (new_reader_slot): Only set 'is_osc' when OpenSC
1951 2003-08-25 Werner Koch <wk@gnupg.org>
1953 * command.c (cmd_setattr): Use a copy of LINE.
1954 (cmd_genkey): Use a copy of KEYNO.
1955 (cmd_passwd): Use a copy of CHVNOSTR.
1956 (cmd_pksign, cmd_pkauth, cmd_pkdecrypt): s/strdup/xtrystrdup/.
1958 2003-08-19 Werner Koch <wk@gnupg.org>
1960 * scdaemon.c, scdaemon.h: New option --pcsc-driver.
1961 * apdu.c (apdu_open_reader): Use that option here instead of a
1964 2003-08-18 Werner Koch <wk@gnupg.org>
1966 * Makefile.am: Add OPENSC_LIBS to all programs.
1968 * scdaemon.c, scdaemon.h: New option --disable-opensc.
1969 * card.c (card_open): Implement it.
1970 * apdu.c (open_osc_reader, osc_send_apdu): New.
1971 (apdu_open_reader) [HAVE_OPENSC]: Use the opensc driver if not
1973 (error_string) [HAVE_OPENSC]: Use sc_strerror.
1974 (send_apdu) [HAVE_OPENSC]: Call osc_apdu_send.
1976 * card-p15.c (p15_enum_keypairs, p15_prepare_key): Adjusted for
1979 2003-08-14 Timo Schulz <twoaday@freakmail.de>
1981 * apdu.c (ct_activate_card): Change the code a little to avoid
1982 problems with other readers.
1983 * Always use 'dynload.h' instead of 'dlfcn.h'.
1985 2003-08-05 Werner Koch <wk@gnupg.org>
1987 * app-openpgp.c (dump_all_do): Don't analyze constructed DOs after
1990 2003-08-04 Werner Koch <wk@gnupg.org>
1992 * app.c (app_set_default_reader_port): New.
1993 (select_application): Use it here.
1994 * scdaemon.c (main): and here.
1995 * sc-copykeys.c: --reader-port does now take a string.
1996 * sc-investigate.c, scdaemon.c: Ditto.
1997 * apdu.c (apdu_open_reader): Ditto. Load pcsclite if no ctapi
1998 driver is configured. Always include code for ctapi.
1999 (new_reader_slot): Don't test for already used ports and remove
2001 (open_pcsc_reader, pcsc_send_apdu, pcsc_error_string): New.
2002 (apdu_send_le): Changed RC to long to cope with PC/SC.
2004 * scdaemon.c, scdaemon.h: New option --ctapi-driver.
2005 * sc-investigate.c, sc-copykeys.c: Ditto.
2007 2003-07-31 Werner Koch <wk@gnupg.org>
2009 * Makefile.am (scdaemon_LDADD): Added INTLLIBS.
2011 2003-07-28 Werner Koch <wk@gnupg.org>
2013 * app-openpgp.c (do_setattr): Change implementation. Allow all
2016 2003-07-27 Werner Koch <wk@gnupg.org>
2018 Adjusted for gcry_mpi_print and gcry_mpi_scan API change.
2020 2003-07-24 Werner Koch <wk@gnupg.org>
2022 * app-openpgp.c (do_learn_status): Print more status information.
2023 (app_select_openpgp): Store the card version.
2024 (store_fpr): Add argument card_version and fix DOs for old cards.
2025 (app_openpgp_storekey): Likewise.
2027 2003-07-23 Werner Koch <wk@gnupg.org>
2029 * command.c (cmd_pkauth): New.
2030 (cmd_setdata): Check whether data was given at all to avoid
2031 passing 0 to malloc.
2033 * app.c (app_auth): New.
2034 * app-openpgp.c (do_auth): New.
2036 2003-07-22 Werner Koch <wk@gnupg.org>
2038 * command.c (cmd_passwd): New.
2039 * app.c (app_change_pin): New.
2040 * app-openpgp.c (do_change_pin): New.
2041 * iso7816.c (iso7816_reset_retry_counter): Implemented.
2043 * sc-investigate.c (main): New option --gen-random.
2044 * iso7816.c (iso7816_get_challenge): Don't create APDUs with a
2045 length larger than 255.
2047 2003-07-17 Werner Koch <wk@gnupg.org>
2049 * command.c (cmd_random): New command RANDOM.
2051 * iso7816.c (map_sw): New. Use it in this file to return
2052 meaningful error messages. Changed all public fucntions to return
2054 (iso7816_change_reference_data): New.
2055 * apdu.c (apdu_open_reader): Use faked status words for soem
2058 2003-07-16 Werner Koch <wk@gnupg.org>
2060 * apdu.c (apdu_send_simple): Use apdu_send_le so that we can
2061 specify not to send Le as it should be.
2063 2003-07-15 Werner Koch <wk@gnupg.org>
2065 * Makefile.am: Add sc-copykeys program.
2066 * sc-copykeys.c: New.
2067 * app-openpgp.c (app_openpgp_storekey): New.
2068 (app_openpgp_cardinfo): New.
2070 (store_fpr): And use it here to get the actual length in bit.
2072 2003-07-03 Werner Koch <wk@gnupg.org>
2074 * app-openpgp.c (do_setattr): Add setting of the URL.
2075 (app_select_openpgp): Dump card data only in very verbose mode.
2078 2003-07-02 Werner Koch <wk@gnupg.org>
2080 * app-openpgp.c (get_sig_counter): New.
2081 (do_sign): Print the signature counter and enable the PIN callback.
2082 (do_genkey): Implement the PIN callback.
2084 2003-07-01 Werner Koch <wk@gnupg.org>
2086 * app-openpgp.c (store_fpr): Fixed fingerprint calculation.
2088 2003-06-26 Werner Koch <wk@gnupg.org>
2090 * app-openpgp.c (find_tlv): Fixed length header parsing.
2092 * app.c (app_genkey): New.
2093 * command.c (cmd_genkey): New.
2095 2003-06-25 Werner Koch <wk@gnupg.org>
2097 * command.c (percent_plus_unescape): New.
2100 2003-06-24 Werner Koch <wk@gnupg.org>
2102 * command.c (send_status_info): New.
2104 * app-openpgp.c (app_select_openpgp): Replace SLOT arg by APP arg
2105 and setup the function pointers in APP on success. Changed callers.
2107 * app-common.h: New.
2108 * scdaemon.h (APP): New type to handle applications.
2109 (server_control_s): Add an APP context field.
2111 * command.c (cmd_serialno): Handle applications.
2112 (cmd_pksign): Ditto.
2113 (cmd_pkdecrypt): Ditto.
2114 (reset_notify): Ditto.
2115 (cmd_learn): For now return error for application contexts.
2116 (cmd_readcert): Ditto.
2117 (cmd_readkey): Ditto.
2119 2003-06-04 Werner Koch <wk@gnupg.org>
2121 * card.c (map_sc_err): Renamed gpg_make_err to gpg_err_make.
2123 Renamed error codes from INVALID to INV and removed _ERROR suffixes.
2125 2003-06-03 Werner Koch <wk@gnupg.org>
2127 Changed all error codes in all files to the new libgpg-error scheme.
2129 * scdaemon.h: Include gpg-error.h and errno.h
2130 * card.c (map_sc_err): Use unknown for the error source.
2131 * Makefile.am: Link with libgpg-error
2133 2003-05-14 Werner Koch <wk@gnupg.org>
2135 * atr.c, atr.h: New.
2136 * sc-investigate.c: Dump the ATR in a human readable format.
2138 2003-05-08 Werner Koch <wk@gnupg.org>
2140 * scdaemon.h (DBG_CARD_IO_VALUE): New.
2142 * sc-investigate.c: New.
2143 * scdaemon.c (main): Removed --print-atr option.
2145 * iso7816.c, iso7816.h, app-openpgp.c: New.
2147 2003-04-29 Werner Koch <wk@gnupg.org>
2149 * scdaemon.c: New options --print-atr and --reader-port
2150 * apdu.c, apdu.h: New
2152 * card.c, card-p15.c, card-dinsig.c: Allow build without OpenSC.
2154 * Makefile.am (LDFLAGS): Removed.
2156 * command.c (register_commands): Adjusted for new Assuan semantics.
2158 2002-08-21 Werner Koch <wk@gnupg.org>
2160 * scdaemon.c (main): New option --daemon so that the program is
2161 not accidently started in the background.
2163 2002-08-16 Werner Koch <wk@gnupg.org>
2165 * scdaemon.c: Include i18n.h.
2167 * card-common.h (struct p15_private_s): Forward declaration. Add
2169 * card.c (card_close): Make sure private data is released.
2170 (card_enum_certs): New.
2171 * card-p15.c (p15_release_private_data): New.
2172 (init_private_data): New to work around an OpenSC weirdness.
2173 (p15_enum_keypairs): Do an OpenSC get_objects only once.
2174 (p15_enum_certs): New.
2175 (card_p15_bind): Bind new function.
2176 * command.c (cmd_learn): Return information about the certificates.
2178 2002-08-09 Werner Koch <wk@gnupg.org>
2180 * card.c (card_get_serial_and_stamp): Use the tokeinfo serial
2181 number as a fallback. Add a special prefix for serial numbers.
2183 2002-07-30 Werner Koch <wk@gnupg.org>
2185 Changes to cope with OpenSC 0.7.0:
2187 * card.c: Removed the check for the packed opensc version.
2188 Changed include file names of opensc.
2189 (map_sc_err): Adjusted error codes for new opensc version.
2190 * card-p15.c: Changed include filename of opensc.
2191 * card-dinsig.c: Ditto.
2193 * card-p15.c (p15_decipher): Add flags argument to OpenSC call.
2195 2002-07-24 Werner Koch <wk@gnupg.org>
2197 * card.c (find_simple_tlv, find_iccsn): New.
2198 (card_get_serial_and_stamp): Improved serial number parser.
2200 2002-06-27 Werner Koch <wk@gnupg.org>
2202 * scdaemon.c (main): Use GNUPG_DEFAULT_HOMEDIR constant.
2204 2002-06-15 Werner Koch <wk@gnupg.org>
2206 * card-dinsig.c: Documented some stuff from the DIN norm.
2208 2002-04-15 Werner Koch <wk@gnupg.org>
2210 * command.c (cmd_pksign, cmd_pkdecrypt): Use a copy of the key ID.
2212 2002-04-12 Werner Koch <wk@gnupg.org>
2214 * scdaemon.c: New option --debug-sc N.
2215 * card.c (card_open): set it here.
2217 * card-p15.c (p15_prepare_key): Factored out common code from ...
2218 (p15_sign, p15_decipher): here and made the decryption work the
2221 2002-04-10 Werner Koch <wk@gnupg.org>
2223 * card.c (card_open): Return immediately when no reader is available.
2225 2002-03-27 Werner Koch <wk@gnupg.org>
2227 * card.c (card_open, card_close): Adjusted for changes in OpenSC.
2229 2002-03-10 Werner Koch <wk@gnupg.org>
2231 * card-p15.c, card-dinsig.c, card-common.h: New.
2232 * card.c: Factored most code out to the new modules, so that we
2233 can better support different types of card applications.
2235 2002-01-26 Werner Koch <wk@gnupg.org>
2237 * scdaemon.c scdaemon.h, command.c: New. Based on the code from
2241 Copyright 2002, 2003, 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
2243 This file is free software; as a special exception the author gives
2244 unlimited permission to copy and/or distribute it, with or without
2245 modifications, as long as this notice is preserved.
2247 This file is distributed in the hope that it will be useful, but
2248 WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
2249 implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.