sc-hsm: Add support for SmartCard-HSM MicroSD card
This commit is contained in:
parent
78548a9394
commit
7858f3cd06
|
@ -1687,13 +1687,18 @@ static int sc_hsm_init(struct sc_card *card)
|
|||
sc_file_free(file);
|
||||
|
||||
// APDU Buffer limits
|
||||
// JCOP 2.4.1r3 1462
|
||||
// JCOP 2.4.2r3 1454
|
||||
// JCOP 3 1232
|
||||
// Reiner SCT 1014
|
||||
// JCOP 2.4.1r3 1462
|
||||
// JCOP 2.4.2r3 1454
|
||||
// JCOP 3 1232
|
||||
// MicroSD with JCOP 3 478 / 506
|
||||
// Reiner SCT 1014
|
||||
|
||||
card->max_send_size = 1217; // 1232 buffer size - 15 byte header and TLV because of odd ins in UPDATE BINARY
|
||||
if (card->type == SC_CARD_TYPE_SC_HSM_SOC
|
||||
card->max_send_size = 1232 - 17; // 1232 buffer size - 17 byte header and TLV because of odd ins in UPDATE BINARY
|
||||
|
||||
if (!strncmp("Secure Flash Card", card->reader->name, 17)) {
|
||||
card->max_send_size = 478 - 17;
|
||||
card->max_recv_size = 506 - 2;
|
||||
} else if (card->type == SC_CARD_TYPE_SC_HSM_SOC
|
||||
|| card->type == SC_CARD_TYPE_SC_HSM_GOID) {
|
||||
card->max_recv_size = 0x0630; // SoC Proxy forces this limit
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue