Change name of encoding type 29/6329/3
authorjs126.lee <js126.lee@samsung.com>
Mon, 28 Mar 2016 01:30:14 +0000 (10:30 +0900)
committerRandeep Singh <randeep.s@samsung.com>
Mon, 28 Mar 2016 05:53:41 +0000 (05:53 +0000)
There is no name of encoding type as "oic.sec.encoding.bytestream" in the spec.
But we need a type to handling priv/pub data as byte array because our db is binary.
So we define new name of encoding type as "oic.sec.encoding.none" that means no need to encoding.
And we have asked to add this type into RAML spec.

-Patch 1 : Init
-Patch 2 : Modify encoding type from encodign.none to encoding.raw.

Change-Id: I7ad3d8facd302f97426cd42f139fbc11a7682638
Signed-off-by: Jongsung Lee <js126.lee@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/6329
Reviewed-by: dongik Lee <dongik.lee@samsung.com>
Reviewed-by: Chul Lee <chuls.lee@samsung.com>
Reviewed-by: Yonggoo Kang <ygace.kang@samsung.com>
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
21 files changed:
android/examples/simpleclient/src/main/assets/oic_svr_db_client.dat [new file with mode: 0644]
android/examples/simpleclient/src/main/assets/oic_svr_db_client.json
android/examples/simpleserver/src/main/assets/oic_svr_db_server.dat [new file with mode: 0644]
android/examples/simpleserver/src/main/assets/oic_svr_db_server.json
resource/csdk/security/include/internal/srmresourcestrings.h
resource/csdk/security/src/credresource.c
resource/csdk/security/src/srmresourcestrings.c
resource/csdk/stack/samples/linux/secure/oic_amss_db.dat
resource/csdk/stack/samples/linux/secure/oic_amss_db.json
resource/csdk/stack/samples/linux/secure/oic_svr_db_client.dat
resource/csdk/stack/samples/linux/secure/oic_svr_db_client.json
resource/csdk/stack/samples/linux/secure/oic_svr_db_server.dat
resource/csdk/stack/samples/linux/secure/oic_svr_db_server.json
resource/examples/oic_svr_db_client.dat [new file with mode: 0644]
resource/examples/oic_svr_db_client.json
resource/examples/oic_svr_db_server.dat [new file with mode: 0644]
resource/examples/oic_svr_db_server.json
service/resource-encapsulation/examples/linux/secureResourceExample/oic_svr_db_client.dat [new file with mode: 0644]
service/resource-encapsulation/examples/linux/secureResourceExample/oic_svr_db_client.json
service/resource-encapsulation/examples/linux/secureResourceExample/oic_svr_db_server.dat [new file with mode: 0644]
service/resource-encapsulation/examples/linux/secureResourceExample/oic_svr_db_server.json

diff --git a/android/examples/simpleclient/src/main/assets/oic_svr_db_client.dat b/android/examples/simpleclient/src/main/assets/oic_svr_db_client.dat
new file mode 100644 (file)
index 0000000..9de47b8
Binary files /dev/null and b/android/examples/simpleclient/src/main/assets/oic_svr_db_client.dat differ
index c5b6ee8..5052bd1 100644 (file)
@@ -93,7 +93,7 @@
                 "credtype": 1,\r
                 "privatedata": {\r
                     "data": "AAAAAAAAAAAAAAAA",\r
-                    "encoding": "oic.sec.encoding.bytestream"\r
+                    "encoding": "oic.sec.encoding.raw"\r
                 }\r
             }\r
         ],\r
diff --git a/android/examples/simpleserver/src/main/assets/oic_svr_db_server.dat b/android/examples/simpleserver/src/main/assets/oic_svr_db_server.dat
new file mode 100644 (file)
index 0000000..31e1814
Binary files /dev/null and b/android/examples/simpleserver/src/main/assets/oic_svr_db_server.dat differ
index 1ab4505..0e1bf23 100644 (file)
                 "credtype": 1,\r
                 "privatedata": {\r
                     "data": "AAAAAAAAAAAAAAAA",\r
-                    "encoding": "oic.sec.encoding.bytestream"\r
+                    "encoding": "oic.sec.encoding.raw"\r
                 }\r
             }\r
         ],\r
index cbc8e82..d87d2ee 100644 (file)
@@ -155,7 +155,7 @@ extern const char * OXM_RANDOM_DEVICE_PIN;
 extern const char * OXM_MANUFACTURER_CERTIFICATE;
 
 extern const char * OIC_SEC_ENCODING_BASE64;
-extern const char * OIC_SEC_ENCODING_BYTESTREAM;
+extern const char * OIC_SEC_ENCODING_RAW;
 
 extern const char * OIC_SEC_TRUE;
 extern const char * OIC_SEC_FALSE;
index b1f4101..703ec90 100644 (file)
@@ -236,8 +236,8 @@ OCStackResult CredToCBORPayload(const OicSecCred_t *credS, uint8_t **cborPayload
             cborEncoderResult = cbor_encode_text_string(&publicMap, OIC_JSON_ENCODING_NAME,
                 strlen(OIC_JSON_ENCODING_NAME));
             VERIFY_CBOR_SUCCESS(TAG, cborEncoderResult, "Failed Adding Public Encoding Tag.");
-            cborEncoderResult = cbor_encode_text_string(&publicMap, OIC_SEC_ENCODING_BYTESTREAM,
-                strlen(OIC_SEC_ENCODING_BYTESTREAM));
+            cborEncoderResult = cbor_encode_text_string(&publicMap, OIC_SEC_ENCODING_RAW,
+                strlen(OIC_SEC_ENCODING_RAW));
             VERIFY_CBOR_SUCCESS(TAG, cborEncoderResult, "Failed Adding Public Encoding Value.");
 
             cborEncoderResult = cbor_encoder_close_container(&credMap, &publicMap);
@@ -268,8 +268,8 @@ OCStackResult CredToCBORPayload(const OicSecCred_t *credS, uint8_t **cborPayload
             cborEncoderResult = cbor_encode_text_string(&privateMap, OIC_JSON_ENCODING_NAME,
                 strlen(OIC_JSON_ENCODING_NAME));
             VERIFY_CBOR_SUCCESS(TAG, cborEncoderResult, "Failed Adding Private Encoding Tag.");
-            cborEncoderResult = cbor_encode_text_string(&privateMap, OIC_SEC_ENCODING_BYTESTREAM,
-                strlen(OIC_SEC_ENCODING_BYTESTREAM));
+            cborEncoderResult = cbor_encode_text_string(&privateMap, OIC_SEC_ENCODING_RAW,
+                strlen(OIC_SEC_ENCODING_RAW));
             VERIFY_CBOR_SUCCESS(TAG, cborEncoderResult, "Failed Adding Private Encoding Value.");
 
             cborEncoderResult = cbor_encoder_close_container(&credMap, &privateMap);
index e8b8165..6398cf3 100644 (file)
@@ -154,7 +154,7 @@ const char * OXM_MANUFACTURER_CERTIFICATE = "oic.sec.doxm.mfgcert";
 
 //Credential data encoding methods
 const char * OIC_SEC_ENCODING_BASE64 = "oic.sec.encoding.base64";
-const char * OIC_SEC_ENCODING_BYTESTREAM = "oic.sec.encoding.bytestream";
+const char * OIC_SEC_ENCODING_RAW = "oic.sec.encoding.raw";
 
 const char * OIC_SEC_TRUE = "true";
 const char * OIC_SEC_FALSE = "false";
index 1d73bc7..ff0932f 100644 (file)
Binary files a/resource/csdk/stack/samples/linux/secure/oic_amss_db.dat and b/resource/csdk/stack/samples/linux/secure/oic_amss_db.dat differ
index 27faa92..4d958e9 100644 (file)
@@ -99,7 +99,7 @@
                 "credtype": 1,\r
                 "privatedata": {\r
                     "data": "BBBBBBBBBBBBBBBB",\r
-                    "encoding": "oic.sec.encoding.bytestream"\r
+                    "encoding": "oic.sec.encoding.raw"\r
                 }\r
             }\r
         ],\r
index 41224db..9cc7af8 100644 (file)
Binary files a/resource/csdk/stack/samples/linux/secure/oic_svr_db_client.dat and b/resource/csdk/stack/samples/linux/secure/oic_svr_db_client.dat differ
index 1bff7cd..d9713f9 100644 (file)
@@ -99,7 +99,7 @@
                 "credtype": 1,\r
                 "privatedata": {\r
                     "data": "AAAAAAAAAAAAAAAA",\r
-                    "encoding": "oic.sec.encoding.bytestream"\r
+                    "encoding": "oic.sec.encoding.raw"\r
                 }\r
             }\r
         ],\r
index a3a5e32..4f1831a 100644 (file)
Binary files a/resource/csdk/stack/samples/linux/secure/oic_svr_db_server.dat and b/resource/csdk/stack/samples/linux/secure/oic_svr_db_server.dat differ
index 83dd98a..9778537 100644 (file)
@@ -88,7 +88,7 @@
                             "rel": "",\r
                             "rt": "",\r
                             "if": ""\r
-                        } \r
+                        }\r
                     ],\r
                     "permission": 6,\r
                     "period" : ["20150630T060000/20150630T220000", "20150630T060000/20150630T200000"],\r
                             "rel": "",\r
                             "rt": "",\r
                             "if": ""\r
-                        } \r
+                        }\r
                     ],\r
                     "permission": 6,\r
                     "period" : ["20150630T060000/20150630T220000"],\r
                 "period": "20150630T060000/20990920T220000",\r
                 "privatedata": {\r
                     "data": "AAAAAAAAAAAAAAAA",\r
-                    "encoding": "oic.sec.encoding.bytestream"\r
+                    "encoding": "oic.sec.encoding.raw"\r
                 }\r
             },\r
             {\r
                 "period": "20150630T060000/20990920T220000",\r
                 "privatedata": {\r
                     "data": "BBBBBBBBBBBBBBBB",\r
-                    "encoding": "oic.sec.encoding.bytestream"\r
+                    "encoding": "oic.sec.encoding.raw"\r
                 }\r
             }\r
         ],\r
diff --git a/resource/examples/oic_svr_db_client.dat b/resource/examples/oic_svr_db_client.dat
new file mode 100644 (file)
index 0000000..9de47b8
Binary files /dev/null and b/resource/examples/oic_svr_db_client.dat differ
index c5b6ee8..5052bd1 100644 (file)
@@ -93,7 +93,7 @@
                 "credtype": 1,\r
                 "privatedata": {\r
                     "data": "AAAAAAAAAAAAAAAA",\r
-                    "encoding": "oic.sec.encoding.bytestream"\r
+                    "encoding": "oic.sec.encoding.raw"\r
                 }\r
             }\r
         ],\r
diff --git a/resource/examples/oic_svr_db_server.dat b/resource/examples/oic_svr_db_server.dat
new file mode 100644 (file)
index 0000000..e903839
Binary files /dev/null and b/resource/examples/oic_svr_db_server.dat differ
index 495403d..921cc9d 100644 (file)
                 "credtype": 1,\r
                 "privatedata": {\r
                     "data": "AAAAAAAAAAAAAAAA",\r
-                    "encoding": "oic.sec.encoding.bytestream"\r
+                    "encoding": "oic.sec.encoding.raw"\r
                 }\r
             }\r
         ],\r
diff --git a/service/resource-encapsulation/examples/linux/secureResourceExample/oic_svr_db_client.dat b/service/resource-encapsulation/examples/linux/secureResourceExample/oic_svr_db_client.dat
new file mode 100644 (file)
index 0000000..9de47b8
Binary files /dev/null and b/service/resource-encapsulation/examples/linux/secureResourceExample/oic_svr_db_client.dat differ
index c5b6ee8..5052bd1 100644 (file)
@@ -93,7 +93,7 @@
                 "credtype": 1,\r
                 "privatedata": {\r
                     "data": "AAAAAAAAAAAAAAAA",\r
-                    "encoding": "oic.sec.encoding.bytestream"\r
+                    "encoding": "oic.sec.encoding.raw"\r
                 }\r
             }\r
         ],\r
diff --git a/service/resource-encapsulation/examples/linux/secureResourceExample/oic_svr_db_server.dat b/service/resource-encapsulation/examples/linux/secureResourceExample/oic_svr_db_server.dat
new file mode 100644 (file)
index 0000000..31e1814
Binary files /dev/null and b/service/resource-encapsulation/examples/linux/secureResourceExample/oic_svr_db_server.dat differ
index 1ab4505..0e1bf23 100644 (file)
                 "credtype": 1,\r
                 "privatedata": {\r
                     "data": "AAAAAAAAAAAAAAAA",\r
-                    "encoding": "oic.sec.encoding.bytestream"\r
+                    "encoding": "oic.sec.encoding.raw"\r
                 }\r
             }\r
         ],\r