From da4c132cca2c6df81243c9660b7348268a848f88 Mon Sep 17 00:00:00 2001 From: NIIBE Yutaka Date: Mon, 13 Feb 2017 11:09:13 +0900 Subject: scd: Fix use case of PC/SC. * scd/apdu.c (apdu_open_reader): Add an argument APP_EMPTY. When CCID driver fails to open, try PC/SC if APP is nothing. * scd/app.c (select_application): Supply arg if APP is nothing. -- After scanning available card readers by CCID driver, scdaemon should try PC/SC service if no APP is registered yet. Also, when the slot is allocated for PC/SC (ccid.handle==NULL), it should not call ccid_compare_BAI, otherwise scdaemon crashes. Debian-bug-id: 852702, 854005, 854595, 854616 Signed-off-by: NIIBE Yutaka --- scd/app.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scd/app.c') diff --git a/scd/app.c b/scd/app.c index 5b8da1c38..7e728705a 100644 --- a/scd/app.c +++ b/scd/app.c @@ -343,7 +343,7 @@ select_application (ctrl_t ctrl, const char *name, app_t *r_app, int slot; int periodical_check_needed_this; - slot = apdu_open_reader (l); + slot = apdu_open_reader (l, !app_top); if (slot < 0) break; -- cgit v1.2.3