[IOT-1957] Remove oic.r.acl Resource from IoTivity 1.3 85/19485/3
authorNathan Heldt-Sheller <nathan.heldt-sheller@intel.com>
Mon, 1 May 2017 06:38:57 +0000 (23:38 -0700)
committerNathan Heldt-Sheller <nathan.heldt-sheller@intel.com>
Tue, 2 May 2017 07:05:21 +0000 (07:05 +0000)
OCF 1.0 Security Spec requires Servers to expose only /oic/sec/acl2,
and not /oic/sec/acl.

Change-Id: I86550d160421f76bd89c72ee31864f029a83212b
Signed-off-by: Nathan Heldt-Sheller <nathan.heldt-sheller@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/19485
Reviewed-by: Kevin Kane <kkane@microsoft.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
resource/csdk/security/src/aclresource.c

index cca105e..5548a1c 100644 (file)
@@ -65,7 +65,6 @@ static const uint8_t ACE_ROLE_MAP_SIZE = 1;
 static const uint16_t CBOR_SIZE = 2048*8;
 
 static OicSecAcl_t *gAcl = NULL;
-static OCResourceHandle gAclHandle = NULL;
 static OCResourceHandle gAcl2Handle = NULL;
 
 void FreeRsrc(OicSecRsrc_t *rsrc)
@@ -2317,21 +2316,6 @@ static OCStackResult CreateACLResource()
 {
     OCStackResult ret;
 
-    ret = OCCreateResource(&gAclHandle,
-                           OIC_RSRC_TYPE_SEC_ACL,
-                           OC_RSRVD_INTERFACE_DEFAULT,
-                           OIC_RSRC_ACL_URI,
-                           ACLEntityHandler,
-                           NULL,
-                           OC_SECURE |
-                           OC_DISCOVERABLE);
-
-    if (OC_STACK_OK != ret)
-    {
-        OIC_LOG(FATAL, TAG, "Unable to instantiate ACL resource");
-        DeInitACLResource();
-    }
-
     ret = OCCreateResource(&gAcl2Handle,
                            OIC_RSRC_TYPE_SEC_ACL2,
                            OC_RSRVD_INTERFACE_DEFAULT,
@@ -2630,9 +2614,7 @@ exit:
 
 OCStackResult DeInitACLResource()
 {
-    OCStackResult ret =  OCDeleteResource(gAclHandle);
-    gAclHandle = NULL;
-    OCStackResult ret2 = OCDeleteResource(gAcl2Handle);
+    OCStackResult ret = OCDeleteResource(gAcl2Handle);
     gAcl2Handle = NULL;
 
     if (gAcl)
@@ -2640,7 +2622,7 @@ OCStackResult DeInitACLResource()
         DeleteACLList(gAcl);
         gAcl = NULL;
     }
-    return (OC_STACK_OK != ret) ? ret : ret2;
+    return ret;
 }
 
 const OicSecAce_t* GetACLResourceData(const OicUuid_t* subjectId, OicSecAce_t **savePtr)