Commit 67df64e4 authored by Kishen Maloor's avatar Kishen Maloor

Expose security profiles resource in all builds

Signed-off-by: Kishen Maloor's avatarKishen Maloor <kishen.maloor@intel.com>
parent 25b42a7d
Pipeline #75 passed with stage
in 1 minute and 28 seconds
...@@ -165,11 +165,11 @@ process_device_resources(CborEncoder *links, oc_request_t *request, ...@@ -165,11 +165,11 @@ process_device_resources(CborEncoder *links, oc_request_t *request,
request, oc_string(anchor), links)) request, oc_string(anchor), links))
matches++; matches++;
#ifdef OC_PKI
if (filter_resource(oc_core_get_resource_by_index(OCF_SEC_SP, device_index), if (filter_resource(oc_core_get_resource_by_index(OCF_SEC_SP, device_index),
request, oc_string(anchor), links)) request, oc_string(anchor), links))
matches++; matches++;
#ifdef OC_PKI
if (filter_resource(oc_core_get_resource_by_index(OCF_SEC_CSR, device_index), if (filter_resource(oc_core_get_resource_by_index(OCF_SEC_CSR, device_index),
request, oc_string(anchor), links)) request, oc_string(anchor), links))
matches++; matches++;
...@@ -389,11 +389,11 @@ process_oic_1_1_device_object(CborEncoder *device, oc_request_t *request, ...@@ -389,11 +389,11 @@ process_oic_1_1_device_object(CborEncoder *device, oc_request_t *request,
oc_rep_array(links))) oc_rep_array(links)))
matches++; matches++;
#ifdef OC_PKI
if (filter_oic_1_1_resource( if (filter_oic_1_1_resource(
oc_core_get_resource_by_index(OCF_SEC_SP, device_num), request, oc_core_get_resource_by_index(OCF_SEC_SP, device_num), request,
oc_rep_array(links))) oc_rep_array(links)))
matches++; matches++;
#ifdef OC_PKI
if (filter_oic_1_1_resource( if (filter_oic_1_1_resource(
oc_core_get_resource_by_index(OCF_SEC_CSR, device_num), request, oc_core_get_resource_by_index(OCF_SEC_CSR, device_num), request,
oc_rep_array(links))) oc_rep_array(links)))
......
...@@ -108,8 +108,8 @@ typedef enum { ...@@ -108,8 +108,8 @@ typedef enum {
OCF_SEC_PSTAT, OCF_SEC_PSTAT,
OCF_SEC_ACL, OCF_SEC_ACL,
OCF_SEC_CRED, OCF_SEC_CRED,
#ifdef OC_PKI
OCF_SEC_SP, OCF_SEC_SP,
#ifdef OC_PKI
OCF_SEC_CSR, OCF_SEC_CSR,
OCF_SEC_ROLES, OCF_SEC_ROLES,
#endif /* OC_PKI */ #endif /* OC_PKI */
......
...@@ -15,7 +15,6 @@ ...@@ -15,7 +15,6 @@
*/ */
#ifdef OC_SECURITY #ifdef OC_SECURITY
#ifdef OC_PKI
#include "oc_sp.h" #include "oc_sp.h"
#include "oc_api.h" #include "oc_api.h"
#include "oc_core_res.h" #include "oc_core_res.h"
...@@ -229,7 +228,4 @@ post_sp(oc_request_t *request, oc_interface_mask_t iface_mask, void *data) ...@@ -229,7 +228,4 @@ post_sp(oc_request_t *request, oc_interface_mask_t iface_mask, void *data)
} }
} }
#else /* OC_PKI */
typedef int dummy_declaration;
#endif /* !OC_PKI */
#endif /* OC_SECURITY */ #endif /* OC_SECURITY */
...@@ -57,10 +57,11 @@ oc_sec_create_svr(void) ...@@ -57,10 +57,11 @@ oc_sec_create_svr(void)
OC_IF_BASELINE, OC_DISCOVERABLE | OC_SECURE, OC_IF_BASELINE, OC_DISCOVERABLE | OC_SECURE,
get_cred, 0, post_cred, delete_cred, 1, get_cred, 0, post_cred, delete_cred, 1,
"oic.r.cred"); "oic.r.cred");
#ifdef OC_PKI
oc_core_populate_resource(OCF_SEC_SP, i, "/oic/sec/sp", OC_IF_BASELINE, oc_core_populate_resource(OCF_SEC_SP, i, "/oic/sec/sp", OC_IF_BASELINE,
OC_IF_BASELINE, OC_DISCOVERABLE | OC_SECURE, OC_IF_BASELINE, OC_DISCOVERABLE | OC_SECURE,
get_sp, 0, post_sp, 0, 1, "oic.r.sp"); 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_core_populate_resource(OCF_SEC_CSR, i, "/oic/sec/csr", OC_IF_BASELINE,
OC_IF_BASELINE, OC_DISCOVERABLE | OC_SECURE, OC_IF_BASELINE, OC_DISCOVERABLE | OC_SECURE,
get_csr, 0, 0, 0, 1, "oic.r.csr"); get_csr, 0, 0, 0, 1, "oic.r.csr");
......
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