ACL payload conversion from JSON to CBOR
authorHabib Virji <habib.virji@samsung.com>
Sun, 20 Dec 2015 23:44:41 +0000 (23:44 +0000)
committerHabib Virji <habib.virji@samsung.com>
Sat, 12 Mar 2016 11:17:50 +0000 (11:17 +0000)
commit8d8cf6ccd8dc7e1ac04b0e9a133cfa9d33c13a12
treee9ef3250e7f3820ec056c551c22c40797d44b713
parent22932f7aefc633d90011f8fc474f416305976cfc
ACL payload conversion from JSON to CBOR

Converts ACL payload conversion from JSON to CBOR directly using tinycbor library.

- It includes  a new interface for psinterface to update persistant storage to write CBOR instead of JSON.
- Includes a new interface to read file from cbor and pass to Init functions.
- Also removes base64 conversion for device id field.
- OCConvert payload is updated to send uint8_t payload instead of JSON payload string.
- ACL Unit test is updated to match new changes.
- New file unittest.h is added to pass functions from testing purpose.
- Data file are updated to handle new format.
- ACL format: [{"sub": <byteString>, "rsrc":[<string>, ..], prms: <uint64_t>, ownrs: [<byteString>,..]}. ..]
- Persistant storage format: { "acl": <aclcbor>, ... }

Change-Id: I125eb3291342c49cc4335ee3a1327a02b88952ba
Signed-off-by: Habib Virji <habib.virji@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/4669
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/5755
32 files changed:
oic_svr_db.dat [new file with mode: 0644]
oic_svr_db.json [new file with mode: 0644]
resource/csdk/security/SConscript
resource/csdk/security/include/internal/aclresource.h
resource/csdk/security/include/internal/psinterface.h
resource/csdk/security/include/internal/resourcemanager.h
resource/csdk/security/include/internal/security_internals.h [new file with mode: 0644]
resource/csdk/security/include/internal/srmresourcestrings.h
resource/csdk/security/include/srmutility.h
resource/csdk/security/provisioning/src/ownershiptransfermanager.c
resource/csdk/security/provisioning/src/secureresourceprovider.c
resource/csdk/security/src/aclresource.c
resource/csdk/security/src/amsmgr.c
resource/csdk/security/src/directpairing.c
resource/csdk/security/src/dpairingresource.c
resource/csdk/security/src/psinterface.c
resource/csdk/security/src/resourcemanager.c
resource/csdk/security/src/srmresourcestrings.c
resource/csdk/security/unittest/SConscript
resource/csdk/security/unittest/aclresourcetest.cpp
resource/csdk/security/unittest/oic_unittest.dat [new file with mode: 0644]
resource/csdk/security/unittest/oic_unittest_acl1.dat [new file with mode: 0644]
resource/csdk/security/unittest/oic_unittest_acl1.json
resource/csdk/security/unittest/oic_unittest_default_acl.dat [new file with mode: 0644]
resource/csdk/security/unittest/oic_unittest_default_acl.json
resource/csdk/security/unittest/srmtestcommon.cpp
resource/csdk/security/unittest/srmtestcommon.h
resource/csdk/stack/include/ocpayload.h
resource/csdk/stack/include/octypes.h
resource/csdk/stack/src/ocpayload.c
resource/csdk/stack/src/ocpayloadconvert.c
resource/unittests/OCPlatformTest.cpp