mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
sys/fido2/ctap: fix parsing validation
This commit is contained in:
parent
43a927cbe9
commit
9bb6449a1e
@ -819,8 +819,12 @@ int fido2_ctap_cbor_parse_get_assertion_req(ctap_get_assertion_req_t *req,
|
||||
CborValue map;
|
||||
CborType type;
|
||||
|
||||
ret = cbor_parser_init(req_raw, len, CborValidateCanonicalFormat, &parser,
|
||||
&it);
|
||||
ret = cbor_parser_init(req_raw, len, 0, &parser, &it);
|
||||
if (ret != CborNoError) {
|
||||
return CTAP2_ERR_CBOR_PARSING;
|
||||
}
|
||||
|
||||
ret = cbor_value_validate(&it, CborValidateCanonicalFormat);
|
||||
if (ret != CborNoError) {
|
||||
return CTAP2_ERR_CBOR_PARSING;
|
||||
}
|
||||
@ -937,8 +941,12 @@ int fido2_ctap_cbor_parse_client_pin_req(ctap_client_pin_req_t *req,
|
||||
CborValue it;
|
||||
CborValue map;
|
||||
|
||||
ret = cbor_parser_init(req_raw, len, CborValidateCanonicalFormat, &parser,
|
||||
&it);
|
||||
ret = cbor_parser_init(req_raw, len, 0, &parser, &it);
|
||||
if (ret != CborNoError) {
|
||||
return CTAP2_ERR_CBOR_PARSING;
|
||||
}
|
||||
|
||||
ret = cbor_value_validate(&it, CborValidateCanonicalFormat);
|
||||
if (ret != CborNoError) {
|
||||
return CTAP2_ERR_CBOR_PARSING;
|
||||
}
|
||||
@ -1048,8 +1056,12 @@ int fido2_ctap_cbor_parse_make_credential_req(ctap_make_credential_req_t *req,
|
||||
CborValue map;
|
||||
CborType type;
|
||||
|
||||
ret = cbor_parser_init(buf, size, CborValidateCanonicalFormat, &parser,
|
||||
&it);
|
||||
ret = cbor_parser_init(buf, size, 0, &parser, &it);
|
||||
if (ret != CborNoError) {
|
||||
return CTAP2_ERR_CBOR_PARSING;
|
||||
}
|
||||
|
||||
ret = cbor_value_validate(&it, CborValidateCanonicalFormat);
|
||||
if (ret != CborNoError) {
|
||||
return CTAP2_ERR_CBOR_PARSING;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user