Not necessary scan on every call.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
@@ -26,8 +26,8 @@
|
||||
int cmd_authenticate() {
|
||||
CTAP_AUTHENTICATE_REQ *req = (CTAP_AUTHENTICATE_REQ *)apdu.data;
|
||||
CTAP_AUTHENTICATE_RESP *resp = (CTAP_AUTHENTICATE_RESP *)res_APDU;
|
||||
if (scan_files(true) != CCID_OK)
|
||||
return SW_EXEC_ERROR();
|
||||
//if (scan_files(true) != CCID_OK)
|
||||
// return SW_EXEC_ERROR();
|
||||
if (req->keyHandleLen != KEY_HANDLE_LEN)
|
||||
return SW_WRONG_DATA();
|
||||
if (P1(apdu) == CTAP_AUTH_ENFORCE && wait_button_pressed() == true)
|
||||
|
||||
@@ -28,8 +28,8 @@ int cmd_register() {
|
||||
CTAP_REGISTER_RESP *resp = (CTAP_REGISTER_RESP *)res_APDU;
|
||||
resp->registerId = CTAP_REGISTER_ID;
|
||||
resp->keyHandleLen = KEY_HANDLE_LEN;
|
||||
if (scan_files(true) != CCID_OK)
|
||||
return SW_EXEC_ERROR();
|
||||
//if (scan_files(true) != CCID_OK)
|
||||
// return SW_EXEC_ERROR();
|
||||
if (apdu.nc != CTAP_APPID_SIZE + CTAP_CHAL_SIZE)
|
||||
return SW_WRONG_LENGTH();
|
||||
if (wait_button_pressed() == true)
|
||||
|
||||
Reference in New Issue
Block a user