- Timestamp:
- 08/06/04 07:21:33 (4 years ago)
- Location:
- branches/openct-0.6/src/ifd
- Files:
-
- 2 modified
-
ifd-kaan.c (modified) (5 diffs)
-
usb-descriptors.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/openct-0.6/src/ifd/ifd-kaan.c
r513 r566 304 304 { 305 305 kaan_status_t *st = (kaan_status_t *) reader->driver_data; 306 unsigned char buffer[16] = { 0x20, 0x13, slot+1, 0x80, 0x00 };306 unsigned char buffer[16] = { 0x20, 0x13, 0x00, 0x80, 0x00 }; 307 307 unsigned char *byte; 308 308 int rc, n; 309 309 310 buffer[2] = slot+1; 310 311 ifd_debug(1, "slot=%d", slot); 311 312 if (!st->frozen … … 443 444 kaan_card_reset(ifd_reader_t *reader, int nslot, void *result, size_t size) 444 445 { 445 unsigned char cmd[5] = { 0x20, 0x10, nslot+1, 0x01, 0x00 }; 446 446 unsigned char cmd[5] = { 0x20, 0x10, 0x00, 0x01, 0x00 }; 447 448 cmd[2] = nslot + 1; 447 449 ifd_debug(1, "called."); 448 450 return kaan_do_reset(reader, nslot, cmd, 5, (unsigned char *) result, size, 0); … … 458 460 { 459 461 ct_buf_t buf; 460 unsigned char buffer[256] = { 0x20, 0x17, slot+1, 0x01, 0x00 };462 unsigned char buffer[256] = { 0x20, 0x17, 0x00, 0x01, 0x00 }; 461 463 int n; 462 464 465 buffer[2] = slot + 1; 463 466 /* Build the APDU, which is basically a modified CTBCS OUTPUT command */ 464 467 ct_buf_init(&buf, buffer, sizeof(buffer)-1); … … 483 486 { 484 487 kaan_status_t *st = (kaan_status_t *) reader->driver_data; 485 unsigned char cmd[] = { 0x80, 0x60, nslot+1, 0x00, 0x03, 0x22, 0x01, 0x00 };488 unsigned char cmd[] = { 0x80, 0x60, 0x00, 0x00, 0x03, 0x22, 0x01, 0x00 }; 486 489 unsigned char buffer[2]; 487 490 unsigned short sw; … … 489 492 int rc; 490 493 494 cmd[2] = nslot + 1; 491 495 ifd_debug(1, "proto=%d", proto); 492 496 -
branches/openct-0.6/src/ifd/usb-descriptors.c
r506 r566 229 229 230 230 memcpy(config, buffer, IFD_USB_DT_CONFIG_SIZE); 231 IFD_USB_LE16_TO_CPU(config->wTotalLength); 231 232 size = config->wTotalLength; 232 233
