parse bools

This commit is contained in:
Conor Patrick 2018-05-21 22:27:34 -04:00
parent 5bac402118
commit 5980c77775
2 changed files with 6 additions and 2 deletions

4
ctap.c
View File

@ -1661,9 +1661,13 @@ int ctap_parse_client_pin(CTAP_clientPin * CP, uint8_t * request, int length)
break;
case CP_getKeyAgreement:
printf1(TAG_CP,"CP_getKeyAgreement\n");
ret = cbor_value_get_boolean(&map, &CP->getKeyAgreement);
check_ret(ret);
break;
case CP_getRetries:
printf1(TAG_CP,"CP_getRetries\n");
ret = cbor_value_get_boolean(&map, &CP->getRetries);
check_ret(ret);
break;
default:
printf1(TAG_CP,"Unknown key %d\n", key);

4
ctap.h
View File

@ -213,8 +213,8 @@ typedef struct
int newPinEncSize;
uint8_t pinHashEnc[16];
uint8_t pinHashEncPresent;
int getKeyAgreement;
int getRetries;
_Bool getKeyAgreement;
_Bool getRetries;
} CTAP_clientPin;