[IOT-2053] Discoverable & Secure SVRs 01/19201/2
authorNathan Heldt-Sheller <nathan.heldt-sheller@intel.com>
Fri, 21 Apr 2017 18:28:46 +0000 (11:28 -0700)
committerNathan Heldt-Sheller <nathan.heldt-sheller@intel.com>
Tue, 25 Apr 2017 04:28:18 +0000 (04:28 +0000)
Implements CR1616 which requires all SVRs to be marked "Discoverable",
and also to expose a Secure Endpoint.

Change-Id: I0cae25b0ac83ac194fd03ed45245bcb9afc98eeb
Signed-off-by: Nathan Heldt-Sheller <nathan.heldt-sheller@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/19201
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Kevin Kane <kkane@microsoft.com>
resource/csdk/security/src/aclresource.c
resource/csdk/security/src/amaclresource.c
resource/csdk/security/src/credresource.c
resource/csdk/security/src/crlresource.c
resource/csdk/security/src/csrresource.c

index 5b23380..cca105e 100644 (file)
@@ -2323,7 +2323,8 @@ static OCStackResult CreateACLResource()
                            OIC_RSRC_ACL_URI,
                            ACLEntityHandler,
                            NULL,
-                           OC_SECURE);
+                           OC_SECURE |
+                           OC_DISCOVERABLE);
 
     if (OC_STACK_OK != ret)
     {
@@ -2337,7 +2338,8 @@ static OCStackResult CreateACLResource()
                            OIC_RSRC_ACL2_URI,
                            ACL2EntityHandler,
                            NULL,
-                           OC_SECURE);
+                           OC_SECURE |
+                           OC_DISCOVERABLE);
 
     if (OC_STACK_OK != ret)
     {
index 8d2238f..883d88e 100644 (file)
@@ -467,7 +467,9 @@ static OCStackResult CreateAmaclResource()
                                          OIC_RSRC_AMACL_URI,
                                          AmaclEntityHandler,
                                          NULL,
-                                         OC_OBSERVABLE);
+                                         OC_OBSERVABLE |
+                                         OC_SECURE |
+                                         OC_DISCOVERABLE);
 
     if (OC_STACK_OK != ret)
     {
index 9044f22..2f5edc9 100644 (file)
@@ -2419,7 +2419,8 @@ OCStackResult CreateCredResource()
                                          OIC_RSRC_CRED_URI,
                                          CredEntityHandler,
                                          NULL,
-                                         OC_SECURE);
+                                         OC_SECURE |
+                                         OC_DISCOVERABLE);
 
     if (OC_STACK_OK != ret)
     {
index cef6b20..9848dcf 100644 (file)
@@ -577,7 +577,9 @@ static OCStackResult CreateCRLResource()
                                          OIC_RSRC_CRL_URI,
                                          CRLEntityHandler,
                                          NULL,
-                                         OC_OBSERVABLE);
+                                         OC_OBSERVABLE |
+                                         OC_SECURE |
+                                         OC_DISCOVERABLE);
 
     if (OC_STACK_OK != ret)
     {
index 0bee6ea..b2eeb41 100644 (file)
@@ -495,7 +495,8 @@ OCStackResult InitCSRResource()
         OIC_RSRC_CSR_URI,
         CredCsrEntityHandler,
         NULL,
-        OC_SECURE);
+        OC_SECURE |
+        OC_DISCOVERABLE);
 
     if (OC_STACK_OK != ret)
     {