CBOR: Add self describing CBOR tag at the beginning
This commit is contained in:
@@ -587,6 +587,11 @@ std::unique_lock<std::mutex> ul(m);
|
||||
CborParser parser;
|
||||
CborValue value;
|
||||
cborErr(cbor_parser_init(buffer.data(), buffer.size(), 0, &parser, &value));
|
||||
|
||||
if (GetCBORTag(value) != SelfDescribedCBOR)
|
||||
throw JFJochException(JFJochExceptionCategory::CBORError, "CBOR must start with dedicated tag");
|
||||
|
||||
|
||||
if (cbor_value_is_map(&value)) {
|
||||
CborValue map_value;
|
||||
cborErr(cbor_value_enter_container(&value, &map_value));
|
||||
|
||||
Reference in New Issue
Block a user