Not attach coap ep to rsrcs for anon-clear ACE
Tested-by: IoTivity Jenkins
@@ -917,9 +917,11 @@ oc_sec_decode_acl(oc_rep_t *rep, bool from_storage, size_t device)
oc_ace_wildcard_t wc = OC_ACE_NO_WC;
oc_rep_t *resource = resources->value.object;
const char *href = 0;
+ /*
#ifdef OC_SERVER
oc_resource_properties_t wc_r = 0;
-#endif /* OC_SERVER */
+ #endif
+ */
oc_interface_mask_t interfaces = 0;
oc_string_array_t *rt = 0;
int i;
@@ -934,21 +936,27 @@ oc_sec_decode_acl(oc_rep_t *rep, bool from_storage, size_t device)
memcmp(oc_string(resource->name), "wc", 2) == 0) {
if (oc_string(resource->value.string)[0] == '*') {
wc = OC_ACE_WC_ALL;
+ /*
#ifdef OC_SERVER
wc_r = ~0;
-#endif /* OC_SERVER */
+ #endif
+ */
}
if (oc_string(resource->value.string)[0] == '+') {
wc = OC_ACE_WC_ALL_DISCOVERABLE;
+ /*
#ifdef OC_SERVER
wc_r = ~0;
-#endif /* OC_SERVER */
+ #endif
+ */
}
if (oc_string(resource->value.string)[0] == '-') {
wc = OC_ACE_WC_ALL_NON_DISCOVERABLE;
+ /*
#ifdef OC_SERVER
wc_r = ~OC_DISCOVERABLE;
-#endif /* OC_SERVER */
+ #endif
+ */
}
}
break;
@@ -983,6 +991,10 @@ oc_sec_decode_acl(oc_rep_t *rep, bool from_storage, size_t device)
oc_sec_ace_update_res(subject_type, &subject, aceid, permission, href,
wc, rt, interfaces, device);
+ /* The following code block attaches "coap" endpoints to
+ resources linked to an anon-clear ACE. This logic is being
+ currently disabled to comply with the SH spec which requires
+ that all vertical resources not expose a "coap" endpoint.
#ifdef OC_SERVER
if (subject_type == OC_SUBJECT_CONN &&
subject.conn == OC_CONN_ANON_CLEAR) {
@@ -1002,7 +1014,8 @@ oc_sec_decode_acl(oc_rep_t *rep, bool from_storage, size_t device)
}
}
}
-#endif /* OC_SERVER */
+ #endif
+ */
resources = resources->next;
}
