"isop": true,\r
"cm": 2,\r
"tm": 0,\r
- "om": 3,\r
- "sm": 3,\r
+ "om": 4,\r
+ "sm": 4,\r
"deviceuuid": "61646D69-6E44-6576-6963-655575696430",\r
"rowneruuid": "61646D69-6E44-6576-6963-655575696430"\r
},\r
"rowneruuid": "32323232-3232-3232-3232-323232323232",\r
"cm": 0,\r
"tm": 0,\r
- "om": 3,\r
- "sm": 3\r
+ "om": 4,\r
+ "sm": 4\r
},\r
"doxm": {\r
"oxms": [0],\r
"rowneruuid": "31313131-3131-3131-3131-313131313131",\r
"cm": 0,\r
"tm": 0,\r
- "om": 3,\r
- "sm": 3\r
+ "om": 4,\r
+ "sm": 4\r
},\r
"doxm": {\r
"oxms": [0],\r
// << 6 THROUGH 15 RESERVED
} OicSecDpm_t;
+// These types are taken from the Security Spec v1.1.12 /pstat resource definition
+// Note that per the latest spec, there is NO definition for Multiple Service Client Directed
+// provisioning mode, so that enum value has been removed.
typedef enum OicSecDpom
{
- MULTIPLE_SERVICE_SERVER_DRIVEN = 0x0,
- SINGLE_SERVICE_SERVER_DRIVEN = 0x1,
- MULTIPLE_SERVICE_CLIENT_DRIVEN = 0x2,
- SINGLE_SERVICE_CLIENT_DRIVEN = 0x3,
+ MULTIPLE_SERVICE_SERVER_DRIVEN = (0x1 << 0),
+ SINGLE_SERVICE_SERVER_DRIVEN = (0x1 << 1),
+ SINGLE_SERVICE_CLIENT_DRIVEN = (0x1 << 2),
} OicSecDpom_t;
typedef enum OicSecSvcType
/**
* /oic/sec/pstat (Provisioning Status) data type.
- * NOTE: this struct is ahead of Spec v0.95 in definition to include Sm.
- * TODO: change comment when reconciled to Spec v0.96.
*/
struct OicSecPstat
{
"isop": true,
"cm": 0,
"tm": 0,
- "om": 3,
- "sm": 3,
+ "om": 4,
+ "sm": 4,
"deviceuuid": "61646D69-6E44-6576-6963-655575696430",
"rowneruuid": "61646D69-6E44-6576-6963-655575696430"
},
"isop": true,\r
"cm": 0,\r
"tm": 0,\r
- "om": 3,\r
- "sm": 3,\r
+ "om": 4,\r
+ "sm": 4,\r
"deviceuuid": "61646D69-6E44-6576-6963-655575696430",\r
"rowneruuid": "61646D69-6E44-6576-6963-655575696430"\r
},\r
"rowneruuid": "",
"cm": 2,
"tm": 0,
- "om": 3,
- "sm": 3
+ "om": 4,
+ "sm": 4
},
"doxm": {
"oxms": [0, 1],
"rowneruuid": "6A757374-776F-726B-4465-765575696430",\r
"cm": 2,\r
"tm": 0,\r
- "om": 3,\r
- "sm": 3\r
+ "om": 4,\r
+ "sm": 4\r
},\r
"doxm": {\r
"oxms": [0],\r
"rowneruuid": "72616E64-5069-6E44-6576-557569643030",\r
"cm": 2,\r
"tm": 0,\r
- "om": 3,\r
- "sm": 3\r
+ "om": 4,\r
+ "sm": 4\r
},\r
"doxm": {\r
"oxms": [0, 1],\r
pstat->isOp = false;
memcpy(pstat->deviceID.id, pTargetDev->doxm->deviceID.id, sizeof(OicUuid_t));
pstat->tm = TAKE_OWNER;
- pstat->om = (OicSecDpom_t)(SINGLE_SERVICE_SERVER_DRIVEN | MULTIPLE_SERVICE_CLIENT_DRIVEN);
+ pstat->om = (OicSecDpom_t)(SINGLE_SERVICE_CLIENT_DRIVEN); // the only mode IoTivity supports currently
pstat->smLen = 1;
pstat->sm = (OicSecDpom_t *) OICCalloc(pstat->smLen, sizeof(OicSecDpom_t));
if (NULL == pstat->sm)
OICFree(pstat);
return OC_STACK_NO_MEMORY;
}
- pstat->sm[0] = (OicSecDpom_t)(SINGLE_SERVICE_SERVER_DRIVEN | MULTIPLE_SERVICE_CLIENT_DRIVEN);
+ pstat->sm[0] = (OicSecDpom_t)(SINGLE_SERVICE_CLIENT_DRIVEN); // the only mode IoTivity supports currently
OCSecurityPayload * secPayload = (OCSecurityPayload *) OICCalloc(1, sizeof(OCSecurityPayload));
if (!secPayload)
0x61, 0x63, 0x6C, 0x62, 0x69, 0x66, 0x81, 0x6F, 0x6F, 0x69, 0x63, 0x2E, 0x69, 0x66, 0x2E, 0x62,
0x61, 0x73, 0x65, 0x6C, 0x69, 0x6E, 0x65, 0x65, 0x70, 0x73, 0x74, 0x61, 0x74, 0x58, 0x9D, 0xA9,
0x64, 0x69, 0x73, 0x6F, 0x70, 0xF4, 0x62, 0x63, 0x6D, 0x02, 0x62, 0x74, 0x6D, 0x00, 0x62, 0x6F,
- 0x6D, 0x03, 0x62, 0x73, 0x6D, 0x03, 0x6A, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x75, 0x75, 0x69,
+ 0x6D, 0x04, 0x62, 0x73, 0x6D, 0x04, 0x6A, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x75, 0x75, 0x69,
0x64, 0x78, 0x24, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x2D, 0x31, 0x31, 0x31, 0x31,
0x2D, 0x31, 0x31, 0x31, 0x31, 0x2D, 0x31, 0x31, 0x31, 0x31, 0x2D, 0x31, 0x31, 0x31, 0x31, 0x31,
0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x6A, 0x72, 0x6F, 0x77, 0x6E, 0x65, 0x72, 0x75, 0x75,
0x61, 0x63, 0x6C, 0x62, 0x69, 0x66, 0x81, 0x6F, 0x6F, 0x69, 0x63, 0x2E, 0x69, 0x66, 0x2E, 0x62,
0x61, 0x73, 0x65, 0x6C, 0x69, 0x6E, 0x65, 0x65, 0x70, 0x73, 0x74, 0x61, 0x74, 0x58, 0x9D, 0xA9,
0x64, 0x69, 0x73, 0x6F, 0x70, 0xF4, 0x62, 0x63, 0x6D, 0x02, 0x62, 0x74, 0x6D, 0x00, 0x62, 0x6F,
- 0x6D, 0x03, 0x62, 0x73, 0x6D, 0x03, 0x6A, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x75, 0x75, 0x69,
+ 0x6D, 0x04, 0x62, 0x73, 0x6D, 0x04, 0x6A, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x75, 0x75, 0x69,
0x64, 0x78, 0x24, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, 0x2D, 0x32, 0x32, 0x32, 0x32,
0x2D, 0x32, 0x32, 0x32, 0x32, 0x2D, 0x32, 0x32, 0x32, 0x32, 0x2D, 0x32, 0x32, 0x32, 0x32, 0x32,
0x32, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, 0x6A, 0x72, 0x6F, 0x77, 0x6E, 0x65, 0x72, 0x75, 0x75,
}
validReq = false;
- //Currently, we dose not support the multiple service server driven yet.
- if (pstat->om != MULTIPLE_SERVICE_SERVER_DRIVEN)
+ //Currently, IoTivity only supports Single Service Client Directed provisioning
+ if (pstat->om == SINGLE_SERVICE_CLIENT_DRIVEN)
{
if ((pstat->cm & RESET) && false == pstat->isOp)
{
"rowneruuid": "756E6B6E-6F77-6564-4465-766963654964",
"cm": 2,
"tm": 0,
- "om": 3,
- "sm": 3
+ "om": 4,
+ "sm": 4
},
"doxm": {
"oxms": [0],
"deviceuuid": "646f6f72-4465-7669-6365-555549443030",\r
"cm": 0,\r
"tm": 0,\r
- "om": 3,\r
- "sm": 3,\r
+ "om": 4,\r
+ "sm": 4,\r
"rowneruuid": "61646d69-6e44-6576-6963-655575696430"\r
},\r
"doxm": {\r
"rowneruuid": "31393139-3139-3139-3139-313931393139",\r
"cm": 0,\r
"tm": 0,\r
- "om": 3,\r
- "sm": 3\r
+ "om": 4,\r
+ "sm": 4\r
},\r
"doxm": {\r
"oxms": [0],\r
"rowneruuid": "32323232-3232-3232-3232-323232323232",\r
"cm": 0,\r
"tm": 0,\r
- "om": 3,\r
- "sm": 3\r
+ "om": 4,\r
+ "sm": 4\r
},\r
"doxm": {\r
"oxms": [0],\r
"rowneruuid": "31393139-3139-3139-3139-313931393139",\r
"cm": 0,\r
"tm": 0,\r
- "om": 3,\r
- "sm": 3\r
+ "om": 4,\r
+ "sm": 4\r
},\r
"doxm": {\r
"oxms": [0],\r
"rowneruuid": "31313131-3131-3131-3131-313131313131",\r
"cm": 0,\r
"tm": 0,\r
- "om": 3,\r
- "sm": 3\r
+ "om": 4,\r
+ "sm": 4\r
},\r
"doxm": {\r
"oxms": [0],\r
"deviceuuid": "6a757374-776f-726b-4465-765575696430",\r
"cm": 2,\r
"tm": 0,\r
- "om": 3,\r
- "sm": 3,\r
+ "om": 4,\r
+ "sm": 4,\r
"rowneruuid": "6a757374-776f-726b-4465-765575696430"\r
},\r
"doxm": {\r
"rowneruuid": "32323232-3232-3232-3232-323232323232",\r
"cm": 0,\r
"tm": 0,\r
- "om": 3,\r
- "sm": 3\r
+ "om": 4,\r
+ "sm": 4\r
},\r
"doxm": {\r
"oxms": [0],\r
"rowneruuid": "31313131-3131-3131-3131-313131313131",\r
"cm": 0,\r
"tm": 0,\r
- "om": 3,\r
- "sm": 3\r
+ "om": 4,\r
+ "sm": 4\r
},\r
"doxm": {\r
"oxms": [0],\r
--- /dev/null
+{
+ "acl": {
+ "aclist": {
+ "aces": [
+ {
+ "subjectuuid": "*",
+ "resources": [
+ {
+ "href": "/oic/res",
+ "rel": "",
+ "rt": ["oic.wk.res"],
+ "if": ["oic.if.ll"]
+ },{
+ "href": "/oic/d",
+ "rel": "",
+ "rt": ["oic.wk.d"],
+ "if": ["oic.if.baseline", "oic.if.r"]
+ },{
+ "href": "/oic/p",
+ "rel": "",
+ "rt": ["oic.wk.p"],
+ "if": ["oic.if.baseline", "oic.if.r"]
+ }
+ ],
+ "permission": 2
+ },
+ {
+ "subjectuuid": "*",
+ "resources": [
+ {
+ "href": "/oic/sec/doxm",
+ "rel": "",
+ "rt": ["oic.r.doxm"],
+ "if": ["oic.if.baseline"]
+ },
+ {
+ "href": "/oic/sec/pstat",
+ "rel": "",
+ "rt": ["oic.r.pstat"],
+ "if": ["oic.if.baseline"]
+ }
+ ],
+ "permission": 2
+ }
+ ]
+ },
+ "rowneruuid" : "61646D69-6E44-6576-6963-655575696430"
+ },
+ "pstat": {
+ "isop": true,
+ "cm": 0,
+ "tm": 0,
+ "om": 4,
+ "sm": 4,
+ "deviceuuid": "61646D69-6E44-6576-6963-655575696430",
+ "rowneruuid": "61646D69-6E44-6576-6963-655575696430"
+ },
+ "doxm": {
+ "oxms": [0],
+ "oxmsel": 0,
+ "sct": 1,
+ "owned": true,
+ "deviceuuid": "61646D69-6E44-6576-6963-655575696430",
+ "x.org.iotivity.dpc": false,
+ "devowneruuid": "61646D69-6E44-6576-6963-655575696430",
+ "rowneruuid": "61646D69-6E44-6576-6963-655575696430"
+ }
+}
"isop": true,\r
"cm": 0,\r
"tm": 0,\r
- "om": 3,\r
- "sm": 3,\r
+ "om": 4,\r
+ "sm": 4,\r
"deviceuuid": "61646D69-6E44-6576-6963-655575696430",\r
"rowneruuid": "61646D69-6E44-6576-6963-655575696430"\r
},\r
"rowneruuid": "61646d69-6e44-6576-6963-655575696430",
"cm": 0,
"tm": 0,
- "om": 3,
- "sm": 3
+ "om": 4,
+ "sm": 4
},
"doxm": {
"oxms": [0],
"rowneruuid": "32323232-3232-3232-3232-323232323232",\r
"cm": 0,\r
"tm": 0,\r
- "om": 3,\r
- "sm": 3\r
+ "om": 4,\r
+ "sm": 4\r
},\r
"doxm": {\r
"oxms": [0],\r
"rowneruuid": "31313131-3131-3131-3131-313131313131",\r
"cm": 0,\r
"tm": 0,\r
- "om": 3,\r
- "sm": 3\r
+ "om": 4,\r
+ "sm": 4\r
},\r
"doxm": {\r
"oxms": [0],\r