From 26b4a012e3eb3a6ce79a1e53f7cdfbbdf8c8e8f5 Mon Sep 17 00:00:00 2001 From: NIIBE Yutaka Date: Mon, 28 Nov 2011 16:16:38 +0900 Subject: PC/SC pinpad support. Before this change, it is layered like following: iso7816_verify iso7816_verify_kp apdu_send_simple, apdu_send_simple_kp ... After this change, it will be layered like: iso7816_verify iso7816_verify_kp apdu_send_simple apdu_keypad_verify ... and apdu_send_simple_kp will be deprecated. For PC/SC API, we use: SCardControl API to compose CCID PC_to_RDR_Secure message SCardTransmit API to compose CCID PC_to_RDR_XfrBlock message Considering the support of PC/SC, we have nothing to share between _kp version of iso7816_* and no _kp version. --- scd/apdu.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'scd/apdu.h') diff --git a/scd/apdu.h b/scd/apdu.h index 7c0188782..4dff9eb95 100644 --- a/scd/apdu.h +++ b/scd/apdu.h @@ -114,6 +114,9 @@ int apdu_get_status (int slot, int hang, unsigned int *status, unsigned int *changed); int apdu_check_keypad (int slot, int command, int pin_mode, int pinlen_min, int pinlen_max, int pin_padlen); +int apdu_keypad_verify (int slot, int class, int ins, int p0, int p1, + int pin_mode, int pinlen_min, int pinlen_max, + int pin_padlen); int apdu_send_simple (int slot, int extended_mode, int class, int ins, int p0, int p1, int lc, const char *data); -- cgit v1.2.3 From 57d4f7fae13810f4daed266139c33057de38d114 Mon Sep 17 00:00:00 2001 From: NIIBE Yutaka Date: Tue, 29 Nov 2011 11:59:32 +0900 Subject: PC/SC pinpad support (pinpad input for modify pass phrase). --- scd/apdu.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'scd/apdu.h') diff --git a/scd/apdu.h b/scd/apdu.h index 4dff9eb95..e5b4c0878 100644 --- a/scd/apdu.h +++ b/scd/apdu.h @@ -117,6 +117,9 @@ int apdu_check_keypad (int slot, int command, int pin_mode, int apdu_keypad_verify (int slot, int class, int ins, int p0, int p1, int pin_mode, int pinlen_min, int pinlen_max, int pin_padlen); +int apdu_keypad_modify (int slot, int class, int ins, int p0, int p1, + int pin_mode, int pinlen_min, int pinlen_max, + int pin_padlen); int apdu_send_simple (int slot, int extended_mode, int class, int ins, int p0, int p1, int lc, const char *data); -- cgit v1.2.3 From 5a62b0d6ee7cecc2e41a429ccc586a1a129e1b04 Mon Sep 17 00:00:00 2001 From: NIIBE Yutaka Date: Tue, 29 Nov 2011 17:56:22 +0900 Subject: PC/SC pinpad support (pinpad input for modify pass phrase with resetcode, by admin). --- scd/apdu.h | 4 ---- 1 file changed, 4 deletions(-) (limited to 'scd/apdu.h') diff --git a/scd/apdu.h b/scd/apdu.h index e5b4c0878..ac1eeeb3b 100644 --- a/scd/apdu.h +++ b/scd/apdu.h @@ -123,10 +123,6 @@ int apdu_keypad_modify (int slot, int class, int ins, int p0, int p1, int apdu_send_simple (int slot, int extended_mode, int class, int ins, int p0, int p1, int lc, const char *data); -int apdu_send_simple_kp (int slot, int class, int ins, int p0, int p1, - int lc, const char *data, - int pin_mode, - int pinlen_min, int pinlen_max, int pin_padlen); int apdu_send (int slot, int extended_mode, int class, int ins, int p0, int p1, int lc, const char *data, unsigned char **retbuf, size_t *retbuflen); -- cgit v1.2.3 From 07ea8c56b507b06d4bd70e94fa51914659afac4b Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Wed, 14 Dec 2011 10:21:15 +0100 Subject: scd: Add debug option for reader function calls. * scd/scdaemon.h (DBG_READER_VALUE, DBG_READER): New. * scd/apdu.c (apdu_open_reader, apdu_close_reader) (apdu_shutdown_reader, apdu_connect, apdu_disconnect) (apdu_reset, apdu_get_atr, apdu_get_status): Add debug code. (apdu_activate): Remove this unused function. --- scd/apdu.h | 1 - 1 file changed, 1 deletion(-) (limited to 'scd/apdu.h') diff --git a/scd/apdu.h b/scd/apdu.h index ac1eeeb3b..f70425620 100644 --- a/scd/apdu.h +++ b/scd/apdu.h @@ -108,7 +108,6 @@ int apdu_disconnect (int slot); int apdu_set_progress_cb (int slot, gcry_handler_progress_t cb, void *cb_arg); -int apdu_activate (int slot); int apdu_reset (int slot); int apdu_get_status (int slot, int hang, unsigned int *status, unsigned int *changed); -- cgit v1.2.3 From 0bac31ee9f74a25d76b08c3e0355a338908f083a Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Wed, 14 Dec 2011 18:48:47 +0100 Subject: scd: Add more status word values for documentation. --- scd/apdu.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'scd/apdu.h') diff --git a/scd/apdu.h b/scd/apdu.h index f70425620..75025469e 100644 --- a/scd/apdu.h +++ b/scd/apdu.h @@ -41,6 +41,9 @@ enum { SW_NOT_SUPPORTED = 0x6a81, SW_FILE_NOT_FOUND = 0x6a82, SW_RECORD_NOT_FOUND = 0x6a83, + SW_NOT_ENOUGH_MEMORY= 0x6a84, /* Not enough memory space in the file. */ + SW_INCONSISTENT_LC = 0x6a85, /* Lc inconsistent with TLV structure. */ + SW_INCORRECT_P0_P1 = 0x6a86, SW_BAD_LC = 0x6a87, /* Lc does not match command or p1/p2. */ SW_REF_NOT_FOUND = 0x6a88, SW_BAD_P0_P1 = 0x6b00, -- cgit v1.2.3