Commit a2525774 authored by js126.lee's avatar js126.lee Committed by Sachin Agrawal

Correct the ENUM value of OTM according to spec.

- Issue : Compliance issue on OTM type
- Solution : Samsung suggest to revive enum type of OTM, and make URN type to optional and ENUM type to mandatory/
            THis patch is for this solution.
     oic:justwork = 0, oic:randompin = 1, oic:mfgcert = 2

Note : Need to apply this patch, once ENUM type of OTM is revived on Spec.

Change-Id: Id0ae1fcf4175576ff2afd7fde7e473942c391f66
Signed-off-by: default avatarjs126.lee <js126.lee@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/3627Tested-by: default avatarjenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: default avatarSachin Agrawal <sachin.agrawal@intel.com>
parent 4d63ada3
......@@ -24,11 +24,9 @@ package org.iotivity.base;
public enum OxmType {
OIC_JUST_WORKS(0),
OIC_MODE_SWITCH(1),
OIC_RANDOM_DEVICE_PIN(2),
OIC_PRE_PROVISIONED_DEVICE_PIN(3),
OIC_PRE_PROVISION_STRONG_CREDENTIAL(4),
OIC_OXM_COUNT(5);
OIC_RANDOM_DEVICE_PIN(1),
OIC_MANUFACTURER_CERTIFICATE(2),
OIC_OXM_COUNT(3);
private int value;
......
......@@ -98,10 +98,8 @@ extern const char * WILDCARD_RESOURCE_URI;
//Ownership Transfer Methods
extern const char * OXM_JUST_WORKS;
extern const char * OXM_MODE_SWITCH;
extern const char * OXM_RANDOM_DEVICE_PIN;
extern const char * OXM_PRE_PROVISIONED_DEVICE_PIN;
extern const char * OXM_PRE_PROVISIONED_STRONG_CREDENTIAL;
extern const char * OXM_MANUFACTURER_CERTIFICATE;
extern const char * OIC_SEC_TRUE;
extern const char * OIC_SEC_FALSE;
......
......@@ -240,10 +240,8 @@ typedef enum
typedef enum
{
OIC_JUST_WORKS = 0x0,
OIC_MODE_SWITCH = 0x1,
OIC_RANDOM_DEVICE_PIN = 0x2,
OIC_PRE_PROVISIONED_DEVICE_PIN = 0x3,
OIC_PRE_PROVISION_STRONG_CREDENTIAL = 0x4,
OIC_RANDOM_DEVICE_PIN = 0x1,
OIC_MANUFACTURER_CERTIFICATE = 0x2,
OIC_OXM_COUNT
}OicSecOxm_t;
......@@ -448,8 +446,8 @@ struct OicSecSvc
struct OicSecCrl
{
uint16_t CrlId;
ByteArray ThisUpdate;
ByteArray CrlData;
ByteArray ThisUpdate;
ByteArray CrlData;
};
#endif /* __WITH_X509__ */
......
......@@ -37,7 +37,7 @@
"sm": [3]
},
"doxm": {
"oxm": [0,2],
"oxm": [0,1],
"oxmsel": 0,
"sct": 1,
"owned": false,
......
......@@ -88,14 +88,10 @@ static const char* GetOxmString(OicSecOxm_t oxmType)
{
case OIC_JUST_WORKS:
return OXM_JUST_WORKS;
case OIC_MODE_SWITCH:
return OXM_MODE_SWITCH;
case OIC_RANDOM_DEVICE_PIN:
return OXM_RANDOM_DEVICE_PIN;
case OIC_PRE_PROVISIONED_DEVICE_PIN:
return OXM_PRE_PROVISIONED_DEVICE_PIN;
case OIC_PRE_PROVISION_STRONG_CREDENTIAL:
return OXM_PRE_PROVISIONED_STRONG_CREDENTIAL;
case OIC_MANUFACTURER_CERTIFICATE:
return OXM_MANUFACTURER_CERTIFICATE;
default:
return NULL;
}
......
......@@ -96,10 +96,8 @@ const char * WILDCARD_RESOURCE_URI = "*";
//Ownership Transfer Methods
const char * OXM_JUST_WORKS = "oic.sec.doxm.jw";
const char * OXM_MODE_SWITCH = "oic.sec.doxm.ms";
const char * OXM_RANDOM_DEVICE_PIN = "oic.sec.doxm.rdp";
const char * OXM_PRE_PROVISIONED_DEVICE_PIN = "oic.sec.doxm.ppdp";
const char * OXM_PRE_PROVISIONED_STRONG_CREDENTIAL = "oic.sec.doxm.ppsc";
const char * OXM_MANUFACTURER_CERTIFICATE = "oic.sec.doxm.mfgcert";
const char * OIC_SEC_TRUE = "true";
const char * OIC_SEC_FALSE = "false";
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment