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 8e92810625c7dd651ed150532839f5b0d3a5521b..96befc0859879d9e0a1004d2d5760f8f71240c9c 100755 (executable)
@@ -27,7 +27,7 @@
        "pstat":        {
                "isop": true,
                "deviceid":     "YWRtaW5EZXZpY2VVVUlE",
-               "commithash": 0,
+               "ch": 0,
                "cm":   0,
                "tm":   0,
                "om":   3,
index 0a26ecce7003135ac9058bddb72b8019796be6b5..6deca6b82360561bb9feb9b0ae77356add86bff9 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 721a8bf88b67fdf6ce3dc55b77b43a6b2b6d95e5..66212eeecfba5af7fc97f9d70cec97c8478a1c39 100644 (file)
@@ -30,7 +30,7 @@
        "pstat":        {
                "isop": false,
                "deviceid":     "ZGV2aWNlaWQAAAAAABhanw==",
-               "commithash": 0,
+               "ch": 0,
                "cm":   0,
                "tm":   0,
                "om":   3,
index 76638806c1d2c6acc64a7b21b1997b34ae0b432c..9ebfbddfe53e9ad07c50d938291d7c2d40520452 100644 (file)
@@ -28,7 +28,7 @@
        "pstat":        {
                "isop": false,
                "deviceid":     "ZGV2aWNlaWQAAAAAABhanw==",
-               "commithash":   1234,
+               "ch":   1234,
                "cm":   63,
                "tm":   48,
                "om":   0,
index dcdac773c19436b0b8fbe69812ec840c4b59a21a..4ccdb8690c3bfc68b77d1b75b905455e0aaecbe7 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 aba059090babd1403bdfc66dec1f50a8dda00e72..17dc43f8a32744eff82a86615994816a9b1f3898 100644 (file)
@@ -26,7 +26,7 @@
        "pstat":        {
                "isop": true,
                "deviceid":     "ZGV2aWNlaWQAAAAAABhanw==",
-               "commithash": 0,
+               "ch": 0,
                "cm":   0,
                "tm":   0,
                "om":   3,
index a23287dcfeba2b67444d71ca97fddb5cbca30054..1f8ad5cef3f2a04f3f8344c5e7664022be125c59 100644 (file)
@@ -32,7 +32,7 @@
        "pstat":        {
                "isop": true,
                "deviceid":     "ZGV2aWNlaWQAAAAAABhanw==",
-               "commithash": 0,
+               "ch": 0,
                "cm":   0,
                "tm":   0,
                "om":   3,