Fix credProtect should not be returned on getAssertion.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
@@ -174,7 +174,6 @@ int cbor_get_assertion(const uint8_t *data, size_t len, bool next) {
|
|||||||
CBOR_PARSE_MAP_END(_f2, 3);
|
CBOR_PARSE_MAP_END(_f2, 3);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
CBOR_FIELD_KEY_TEXT_VAL_UINT(2, "credProtect", extensions.credProtect);
|
|
||||||
CBOR_FIELD_KEY_TEXT_VAL_BOOL(2, "credBlob", credBlob);
|
CBOR_FIELD_KEY_TEXT_VAL_BOOL(2, "credBlob", credBlob);
|
||||||
CBOR_ADVANCE(2);
|
CBOR_ADVANCE(2);
|
||||||
}
|
}
|
||||||
@@ -379,8 +378,6 @@ int cbor_get_assertion(const uint8_t *data, size_t len, bool next) {
|
|||||||
extensions.hmac_secret = NULL;
|
extensions.hmac_secret = NULL;
|
||||||
if (extensions.hmac_secret != NULL)
|
if (extensions.hmac_secret != NULL)
|
||||||
l++;
|
l++;
|
||||||
if (extensions.credProtect != 0)
|
|
||||||
l++;
|
|
||||||
if (credBlob == ptrue)
|
if (credBlob == ptrue)
|
||||||
l++;
|
l++;
|
||||||
CBOR_CHECK(cbor_encoder_create_map(&encoder, &mapEncoder, l));
|
CBOR_CHECK(cbor_encoder_create_map(&encoder, &mapEncoder, l));
|
||||||
@@ -391,10 +388,6 @@ int cbor_get_assertion(const uint8_t *data, size_t len, bool next) {
|
|||||||
else
|
else
|
||||||
CBOR_CHECK(cbor_encode_byte_string(&mapEncoder, NULL, 0));
|
CBOR_CHECK(cbor_encode_byte_string(&mapEncoder, NULL, 0));
|
||||||
}
|
}
|
||||||
if (extensions.credProtect != 0) {
|
|
||||||
CBOR_CHECK(cbor_encode_text_stringz(&mapEncoder, "credProtect"));
|
|
||||||
CBOR_CHECK(cbor_encode_uint(&mapEncoder, extensions.credProtect));
|
|
||||||
}
|
|
||||||
if (extensions.hmac_secret != NULL) {
|
if (extensions.hmac_secret != NULL) {
|
||||||
|
|
||||||
CBOR_CHECK(cbor_encode_text_stringz(&mapEncoder, "hmac-secret"));
|
CBOR_CHECK(cbor_encode_text_stringz(&mapEncoder, "hmac-secret"));
|
||||||
|
|||||||
Reference in New Issue
Block a user