Compare commits

..

2 Commits

Author SHA1 Message Date
fd9a4fd6b3 do not delay bootloader 2019-08-23 14:31:03 +08:00
d5c30eca7c add delay to cap button improve reliability 2019-08-23 14:28:25 +08:00
2 changed files with 3 additions and 1 deletions

View File

@ -486,7 +486,7 @@ static int ctap_make_auth_data(struct rpId * rp, CborEncoder * map, uint8_t * au
device_set_status(CTAPHID_STATUS_PROCESSING); device_set_status(CTAPHID_STATUS_PROCESSING);
authData->head.flags = (1 << 0); // User presence authData->head.flags = (but << 0);
authData->head.flags |= (ctap_is_pin_set() << 2); authData->head.flags |= (ctap_is_pin_set() << 2);

View File

@ -802,6 +802,7 @@ void nfc_process_iblock(uint8_t * buf, int len)
memmove(&chain_buffer[chain_buffer_len], apdu.data, apdu.lc); memmove(&chain_buffer[chain_buffer_len], apdu.data, apdu.lc);
chain_buffer_len += apdu.lc; chain_buffer_len += apdu.lc;
delay(1);
nfc_write_response(buf[0], SW_SUCCESS); nfc_write_response(buf[0], SW_SUCCESS);
printf1(TAG_NFC, "APDU chaining ok. %d/%d\r\n", apdu.lc, chain_buffer_len); printf1(TAG_NFC, "APDU chaining ok. %d/%d\r\n", apdu.lc, chain_buffer_len);
return; return;
@ -809,6 +810,7 @@ void nfc_process_iblock(uint8_t * buf, int len)
// if we have ISO 7816 APDU chain - move there all the data // if we have ISO 7816 APDU chain - move there all the data
if (!chain_buffer_tx && chain_buffer_len > 0) { if (!chain_buffer_tx && chain_buffer_len > 0) {
delay(1);
memmove(&apdu.data[chain_buffer_len], apdu.data, apdu.lc); memmove(&apdu.data[chain_buffer_len], apdu.data, apdu.lc);
memmove(apdu.data, chain_buffer, chain_buffer_len); memmove(apdu.data, chain_buffer, chain_buffer_len);
apdu.lc += chain_buffer_len; // here apdu struct does not match with memory! apdu.lc += chain_buffer_len; // here apdu struct does not match with memory!