allow pin removal
either change to PIN to an empty one or "4321"
This commit is contained in:
parent
72063049a7
commit
78f7a7a979
@ -2350,6 +2350,9 @@ uint8_t ctap_request(uint8_t * pkt_raw, int length, CTAP_RESPONSE * resp)
|
||||
|
||||
dump_hex1(TAG_DUMP,buf, resp->length);
|
||||
break;
|
||||
case CTAP_VENDOR_LOAD:
|
||||
//TODO: load secret
|
||||
break;
|
||||
default:
|
||||
status = CTAP1_ERR_INVALID_COMMAND;
|
||||
printf2(TAG_ERR,"error, invalid cmd: 0x%02x\n", cmd);
|
||||
@ -2475,6 +2478,11 @@ uint8_t ctap_is_pin_set()
|
||||
*/
|
||||
void ctap_update_pin(uint8_t * pin, int len)
|
||||
{
|
||||
if(len == 0 || strncmp(pin, "4321", len) == 0) {
|
||||
STATE.is_pin_set = 0;
|
||||
authenticator_write_state(&STATE);
|
||||
return;
|
||||
}
|
||||
if (len >= NEW_PIN_ENC_MIN_SIZE || len < 4)
|
||||
{
|
||||
printf2(TAG_ERR, "Update pin fail length\n");
|
||||
|
Loading…
x
Reference in New Issue
Block a user