Commit 7b92b979 authored by Oleksandr Andrieiev's avatar Oleksandr Andrieiev

Add "oic.if.rw" to all SVRs

Signed-off-by: Oleksandr Andrieiev's avatarOleksandr Andrieiev <o.andrieiev@samsung.com>
parent 4bb35b3e
Pipeline #242 passed with stage
in 49 seconds
......@@ -136,6 +136,7 @@ get_doxm(oc_request_t *request, oc_interface_mask_t iface_mask, void *data)
{
(void)data;
switch (iface_mask) {
case OC_IF_RW:
case OC_IF_BASELINE: {
char *q;
int ql = oc_get_query_value(request, "owned", &q);
......
......@@ -563,6 +563,7 @@ get_pstat(oc_request_t *request, oc_interface_mask_t iface_mask, void *data)
{
(void)data;
switch (iface_mask) {
case OC_IF_RW:
case OC_IF_BASELINE: {
oc_sec_encode_pstat(request->resource->device);
oc_send_response(request, OC_STATUS_OK);
......
......@@ -204,6 +204,7 @@ get_sp(oc_request_t *request, oc_interface_mask_t iface_mask, void *data)
{
(void)data;
switch (iface_mask) {
case OC_IF_RW:
case OC_IF_BASELINE: {
oc_sec_encode_sp(request->resource->device);
oc_send_response(request, OC_STATUS_OK);
......
......@@ -39,32 +39,28 @@ oc_sec_create_svr(void)
size_t i;
for (i = 0; i < oc_core_get_num_devices(); i++) {
oc_core_populate_resource(OCF_SEC_DOXM, i, "/oic/sec/doxm", OC_IF_BASELINE,
OC_IF_BASELINE, OC_DISCOVERABLE, get_doxm, 0,
oc_core_populate_resource(OCF_SEC_DOXM, i, "/oic/sec/doxm", OC_IF_RW | OC_IF_BASELINE,
OC_IF_RW, OC_DISCOVERABLE, get_doxm, 0,
post_doxm, 0, 1, "oic.r.doxm");
oc_core_populate_resource(OCF_SEC_PSTAT, i, "/oic/sec/pstat",
OC_IF_BASELINE, OC_IF_BASELINE,
OC_DISCOVERABLE | OC_OBSERVABLE, get_pstat, 0,
oc_core_populate_resource(OCF_SEC_PSTAT, i, "/oic/sec/pstat", OC_IF_RW | OC_IF_BASELINE,
OC_IF_RW, OC_DISCOVERABLE | OC_OBSERVABLE, get_pstat, 0,
post_pstat, 0, 1, "oic.r.pstat");
oc_core_populate_resource(OCF_SEC_ACL, i, "/oic/sec/acl2", OC_IF_BASELINE,
OC_IF_BASELINE, OC_DISCOVERABLE | OC_SECURE,
get_acl, 0, post_acl, delete_acl, 1,
"oic.r.acl2");
oc_core_populate_resource(OCF_SEC_CRED, i, "/oic/sec/cred", OC_IF_BASELINE,
OC_IF_BASELINE, OC_DISCOVERABLE | OC_SECURE,
get_cred, 0, post_cred, delete_cred, 1,
"oic.r.cred");
oc_core_populate_resource(OCF_SEC_ACL, i, "/oic/sec/acl2", OC_IF_RW | OC_IF_BASELINE,
OC_IF_RW, OC_DISCOVERABLE | OC_SECURE,
get_acl, 0, post_acl, delete_acl, 1, "oic.r.acl2");
oc_core_populate_resource(OCF_SEC_CRED, i, "/oic/sec/cred", OC_IF_RW | OC_IF_BASELINE,
OC_IF_RW, OC_DISCOVERABLE | OC_SECURE,
get_cred, 0, post_cred, delete_cred, 1, "oic.r.cred");
oc_core_populate_resource(OCF_SEC_SP, i, "/oic/sec/sp", OC_IF_BASELINE,
OC_IF_BASELINE, OC_DISCOVERABLE | OC_SECURE,
oc_core_populate_resource(OCF_SEC_SP, i, "/oic/sec/sp", OC_IF_RW | OC_IF_BASELINE,
OC_IF_RW, OC_DISCOVERABLE | OC_SECURE,
get_sp, 0, post_sp, 0, 1, "oic.r.sp");
#ifdef OC_PKI
oc_core_populate_resource(OCF_SEC_CSR, i, "/oic/sec/csr", OC_IF_BASELINE,
OC_IF_BASELINE, OC_DISCOVERABLE | OC_SECURE,
oc_core_populate_resource(OCF_SEC_CSR, i, "/oic/sec/csr", OC_IF_RW | OC_IF_BASELINE,
OC_IF_RW, OC_DISCOVERABLE | OC_SECURE,
get_csr, 0, 0, 0, 1, "oic.r.csr");
oc_core_populate_resource(OCF_SEC_ROLES, i, "/oic/sec/roles",
OC_IF_BASELINE, OC_IF_BASELINE,
OC_DISCOVERABLE | OC_SECURE, get_cred, 0,
oc_core_populate_resource(OCF_SEC_ROLES, i, "/oic/sec/roles", OC_IF_RW | OC_IF_BASELINE,
OC_IF_RW, OC_DISCOVERABLE | OC_SECURE, get_cred, 0,
post_cred, delete_cred, 1, "oic.r.roles");
#endif /* OC_PKI */
}
......
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