bool err = false;
char * securityData = NULL;
CborValue map;
- err = err || cbor_value_enter_container(rootValue, &map);
-
- if(cbor_value_is_map(&map))
- {
- size_t len;
- err = err || cbor_value_dup_text_string(&map, &securityData, &len, NULL);
- }
- else
- {
- OC_LOG(ERROR, TAG, "Cbor main value not a map");
- return OC_STACK_MALFORMED_RESPONSE;
- }
+ size_t len;
+ err = err || cbor_value_enter_container(rootValue, &map);
+ err = err || cbor_value_dup_text_string(&map, &securityData, &len, NULL);
err = err || cbor_value_leave_container(rootValue, &map);
if(err)