Update pstat property name
authorSakthivel Samidurai <sakthivel.samidurai@intel.com>
Mon, 8 Jun 2015 18:57:06 +0000 (11:57 -0700)
committerSachin Agrawal <sachin.agrawal@intel.com>
Wed, 10 Jun 2015 21:23:06 +0000 (21:23 +0000)
Update the pstate commit hash property name based on the
security specification.

Change-Id: Id965150e9a1b17920e9c6339a7bc967e63f6f318
Signed-off-by: Sakthivel Samidurai <sakthivel.samidurai@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1217
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Sachin Agrawal <sachin.agrawal@intel.com>
resource/csdk/security/provisioning/sample/oic_svr_db.json
resource/csdk/security/src/srmresourcestrings.c
resource/csdk/security/unittest/oic_svr_db.json
resource/csdk/security/unittest/oic_unittest.json
resource/csdk/security/unittest/pstatresource.cpp
resource/csdk/stack/samples/linux/secure/oic_svr_db_client.json
resource/csdk/stack/samples/linux/secure/oic_svr_db_server.json

index 8e92810..96befc0 100755 (executable)
@@ -27,7 +27,7 @@
        "pstat":        {
                "isop": true,
                "deviceid":     "YWRtaW5EZXZpY2VVVUlE",
-               "commithash": 0,
+               "ch": 0,
                "cm":   0,
                "tm":   0,
                "om":   3,
index 0a26ecc..6deca6b 100644 (file)
@@ -61,7 +61,7 @@ const char * OIC_JSON_OXM_TYPE_NAME = "oxmtype";
 const char * OIC_JSON_OXM_SEL_NAME = "oxmsel";
 const char * OIC_JSON_DEVICE_ID_FORMAT_NAME = "dvcidfrmt";
 const char * OIC_JSON_ISOP_NAME = "isop";
-const char * OIC_JSON_COMMIT_HASH_NAME = "commithash";
+const char * OIC_JSON_COMMIT_HASH_NAME = "ch";
 const char * OIC_JSON_DEVICE_ID_NAME = "deviceid";
 const char * OIC_JSON_CM_NAME = "cm";
 const char * OIC_JSON_TM_NAME = "tm";
index 721a8bf..66212ee 100644 (file)
@@ -30,7 +30,7 @@
        "pstat":        {
                "isop": false,
                "deviceid":     "ZGV2aWNlaWQAAAAAABhanw==",
-               "commithash": 0,
+               "ch": 0,
                "cm":   0,
                "tm":   0,
                "om":   3,
index 7663880..9ebfbdd 100644 (file)
@@ -28,7 +28,7 @@
        "pstat":        {
                "isop": false,
                "deviceid":     "ZGV2aWNlaWQAAAAAABhanw==",
-               "commithash":   1234,
+               "ch":   1234,
                "cm":   63,
                "tm":   48,
                "om":   0,
index dcdac77..4ccdb86 100644 (file)
@@ -38,7 +38,7 @@ OCEntityHandlerResult PstatEntityHandler (OCEntityHandlerFlag flag,
 char * BinToPstatJSON(const OicSecPstat_t * pstat);
 OicSecPstat_t * JSONToPstatBin(const char * jsonStr);
 char* ReadFile(const char* filename);
-extern char* JSON_FILE_NAME;
+const char* UNIT_TEST_JSON_FILE_NAME = "oic_unittest.json";
 #ifdef __cplusplus
 }
 #endif
@@ -125,7 +125,7 @@ TEST(MarshalingAndUnMarshalingTest, BinToPstatJSONAndJSONToPstatBin)
 
 TEST(PstatTests, JSONMarshalliingTests)
 {
-    char *jsonStr1 = ReadFile(JSON_FILE_NAME);
+    char *jsonStr1 = ReadFile(UNIT_TEST_JSON_FILE_NAME);
     if (NULL != jsonStr1)
     {
         cJSON_Minify(jsonStr1);
@@ -154,6 +154,6 @@ TEST(PstatTests, JSONMarshalliingTests)
    }
     else
     {
-        printf("Please copy %s into unittest folder\n", JSON_FILE_NAME);
+        printf("Please copy %s into unittest folder\n", UNIT_TEST_JSON_FILE_NAME);
     }
 }
index aba0590..17dc43f 100644 (file)
@@ -26,7 +26,7 @@
        "pstat":        {
                "isop": true,
                "deviceid":     "ZGV2aWNlaWQAAAAAABhanw==",
-               "commithash": 0,
+               "ch": 0,
                "cm":   0,
                "tm":   0,
                "om":   3,
index a23287d..1f8ad5c 100644 (file)
@@ -32,7 +32,7 @@
        "pstat":        {
                "isop": true,
                "deviceid":     "ZGV2aWNlaWQAAAAAABhanw==",
-               "commithash": 0,
+               "ch": 0,
                "cm":   0,
                "tm":   0,
                "om":   3,