Reset shall call for user presence and can only be called within the 10 seconds from boot.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
@@ -20,10 +20,16 @@
|
|||||||
#include "file.h"
|
#include "file.h"
|
||||||
#include "fido.h"
|
#include "fido.h"
|
||||||
#include "apdu.h"
|
#include "apdu.h"
|
||||||
|
#include "ctap.h"
|
||||||
|
#include "bsp/board.h"
|
||||||
|
|
||||||
extern void scan_all();
|
extern void scan_all();
|
||||||
|
|
||||||
int cbor_reset() {
|
int cbor_reset() {
|
||||||
|
if (board_millis() > 10000)
|
||||||
|
return CTAP2_ERR_NOT_ALLOWED;
|
||||||
|
if (check_user_presence() == false)
|
||||||
|
return CTAP2_ERR_USER_ACTION_TIMEOUT;
|
||||||
initialize_flash(true);
|
initialize_flash(true);
|
||||||
scan_all();
|
scan_all();
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user