summaryrefslogtreecommitdiffstats
path: root/scd/apdu.h
diff options
context:
space:
mode:
authorNIIBE Yutaka <gniibe@fsij.org>2017-02-13 03:09:13 +0100
committerNIIBE Yutaka <gniibe@fsij.org>2017-02-13 03:09:13 +0100
commitda4c132cca2c6df81243c9660b7348268a848f88 (patch)
treeb3ac676f9f4aa45d1a1b7ae3f09d17d595bbfc5c /scd/apdu.h
parentgpg: Fix memory leak in the error case of signature creation. (diff)
downloadgnupg2-da4c132cca2c6df81243c9660b7348268a848f88.tar.xz
gnupg2-da4c132cca2c6df81243c9660b7348268a848f88.zip
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 <gniibe@fsij.org>
Diffstat (limited to 'scd/apdu.h')
-rw-r--r--scd/apdu.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/scd/apdu.h b/scd/apdu.h
index 473def518..6751e8c9b 100644
--- a/scd/apdu.h
+++ b/scd/apdu.h
@@ -91,7 +91,7 @@ gpg_error_t apdu_dev_list_start (const char *portstr, struct dev_list **l_p);
void apdu_dev_list_finish (struct dev_list *l);
/* Note, that apdu_open_reader returns no status word but -1 on error. */
-int apdu_open_reader (struct dev_list *l);
+int apdu_open_reader (struct dev_list *l, int app_empty);
int apdu_open_remote_reader (const char *portstr,
const unsigned char *cookie, size_t length,
int (*readfnc) (void *opaque,