Fix for IOT-1214: Incorrect use of tinyCBOR API in security code
authorKishen Maloor <kishen.maloor@intel.com>
Mon, 15 Aug 2016 01:22:10 +0000 (18:22 -0700)
committerRandeep Singh <randeep.s@samsung.com>
Mon, 26 Sep 2016 10:28:21 +0000 (10:28 +0000)
commitbfb86f11401c3c4451f32c21c2294f313a136349
tree0a982344596f97f1ecb1ae65d5d6ecefc93088e8
parent6d7b882e619237047822a4087128626d4e4e647c
Fix for IOT-1214: Incorrect use of tinyCBOR API in security code

mapSize is consistently larger than the actual size of doxmMap.
This results in an erroneous parse of the resulting payload wherein
the last key-value pair is truncated.

When creating containers, we must specify CborIndefiniteLength unless
we know the exact length the container.

Change-Id: I8beb6bc45ae41531e8a7528d9dbd254a27e14be9
Signed-off-by: Kishen Maloor <kishen.maloor@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/10455
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Dave Thaler <dthaler@microsoft.com>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
Reviewed-by: Jaehong Jo <jaehong.jo@samsung.com>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Reviewed-by: Kevin Kane <kkane@microsoft.com>
Reviewed-by: Ziran Sun <ziran.sun@samsung.com>
(cherry picked from commit a909e871afe8a9ea7e0a779302e4d47dac74649d)
Reviewed-on: https://gerrit.iotivity.org/gerrit/11711
Reviewed-by: David Antler <david.a.antler@intel.com>
resource/csdk/security/src/doxmresource.c