security: Refactor json2cbor for error checking
authorPhilippe Coval <philippe.coval@osg.samsung.com>
Fri, 16 Jun 2017 13:07:35 +0000 (15:07 +0200)
committerPhil Coval <philippe.coval@osg.samsung.com>
Thu, 29 Jun 2017 22:35:46 +0000 (22:35 +0000)
commit3c8662b663a76c1c49f75a6fe0e46068d1594024
treeea1d32a0166a866afb00d67353b69f660ce1caea
parenteb12e031cde101214430c7c79c1eefcfd2c97be8
security: Refactor json2cbor for error checking

Detect JSON type and make json2cbor fail on error.
IoTivity JSON are "upgraded" by default,
Swagger files are just converted.
Json2cbor report not zero on failure.
This prevents silent failure when generating CBOR from JSON.
Many MLK fixed.

Bug: https://jira.iotivity.org/browse/IOT-2310
Change-Id: I905b7d2ba1021686e3794167266b1853ad0f9872
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20795
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
(cherry picked from commit 48dfc99470067336f65ed2e7570b041805cd6d81)
Reviewed-on: https://gerrit.iotivity.org/gerrit/21145
resource/csdk/security/tool/json2cbor.c