Changeset View
Changeset View
Standalone View
Standalone View
b/scd/ccid-driver.c
Context not available. | |||||
size_t dummy_nresp; | size_t dummy_nresp; | ||||
int testmode; | int testmode; | ||||
int cherry_mode = 0; | int cherry_mode = 0; | ||||
int add_zero = 0; | |||||
int enable_varlen = 0; | int enable_varlen = 0; | ||||
testmode = !resp && !nresp; | testmode = !resp && !nresp; | ||||
Context not available. | |||||
enable_varlen = 1; | enable_varlen = 1; | ||||
break; | break; | ||||
case VENDOR_CHERRY: | case VENDOR_CHERRY: | ||||
pininfo->maxlen = 25; | pininfo->maxlen = 15; | ||||
enable_varlen = 1; | enable_varlen = 1; | ||||
/* The CHERRY XX44 keyboard echos an asterisk for each entered | /* The CHERRY XX44 keyboard echos an asterisk for each entered | ||||
character on the keyboard channel. We use a special variant | character on the keyboard channel. We use a special variant | ||||
Context not available. | |||||
Lc byte to the APDU. It seems that it will be replaced with | Lc byte to the APDU. It seems that it will be replaced with | ||||
the actual length instead of being appended before the APDU | the actual length instead of being appended before the APDU | ||||
is send to the card. */ | is send to the card. */ | ||||
add_zero = 1; | |||||
if (handle->id_product != CHERRY_ST2000) | if (handle->id_product != CHERRY_ST2000) | ||||
cherry_mode = 1; | cherry_mode = 1; | ||||
break; | break; | ||||
Context not available. | |||||
msg[msglen++] = apdu_buf[1]; /* INS */ | msg[msglen++] = apdu_buf[1]; /* INS */ | ||||
msg[msglen++] = apdu_buf[2]; /* P1 */ | msg[msglen++] = apdu_buf[2]; /* P1 */ | ||||
msg[msglen++] = apdu_buf[3]; /* P2 */ | msg[msglen++] = apdu_buf[3]; /* P2 */ | ||||
if (cherry_mode) | if (add_zero) | ||||
msg[msglen++] = 0; | msg[msglen++] = 0; | ||||
else if (pininfo->fixedlen != 0) | else if (pininfo->fixedlen != 0) | ||||
{ | { | ||||
Context not available. |