[IOT-1884] Allow IoTivity to generate and persist PIID
authorAlex Kelley <alexke@microsoft.com>
Mon, 13 Feb 2017 19:57:20 +0000 (11:57 -0800)
committerDan Mihai <Daniel.Mihai@microsoft.com>
Thu, 9 Mar 2017 17:21:34 +0000 (17:21 +0000)
commit699df03913657e7338018e93b7da7d7053b086b3
tree9af425392efd937dc734ad68bb711cd51c587db8
parent6076a2ddc17b2458253a5ac199c2c59f9991111c
[IOT-1884] Allow IoTivity to generate and persist PIID

 1. Generate a PIID for the device so that one is always available.
 2. Add the ability to store and retrieve the PIID from a new .dat
    file so it remains persistent across reboots of the device.
    - This .dat file can be updated to handle other information
      relevant to the device in the future.
 3. Update the PIID in the .dat file if the application wants to
    use a specific PIID.
 4. Update PSInterface to handle different databases instead of
    just the security database.
 5. Update the json2cbor tool to make it easy for developers to
    generate .dat files to specify PIID.
 6. Add example JSON and .dat files for specifying a PIID.

Change-Id: Ic556508ea0fb053386d76b2578721debea8ac046
Signed-off-by: Alex Kelley <alexke@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/17667
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
resource/csdk/security/include/internal/psinterface.h
resource/csdk/security/src/psinterface.c
resource/csdk/security/tool/json2cbor.c
resource/csdk/stack/include/internal/ocresourcehandler.h
resource/csdk/stack/samples/linux/SimpleClientServer/SConscript
resource/csdk/stack/samples/linux/SimpleClientServer/device_properties.dat [new file with mode: 0644]
resource/csdk/stack/samples/linux/SimpleClientServer/device_properties.json [new file with mode: 0644]
resource/csdk/stack/src/ocresource.c
resource/csdk/stack/src/ocstack.c
resource/csdk/stack/test/stacktests.cpp