throw ESException("Not found owned devices.");
}
- if(!cloudUuid.empty()
- && performACLProvisioningForCloudServer(ownedDevice, cloudUuid) != ESResult::ES_OK)
+ if(cloudUuid.empty())
+ {
+ OIC_LOG(DEBUG, ENROLEE_SECURITY_TAG,
+ "ACL provisioning is skipped due to empty UUID of cloud server");
+ }
+ else if(performACLProvisioningForCloudServer(ownedDevice, cloudUuid) != ESResult::ES_OK)
{
OIC_LOG(DEBUG, ENROLEE_SECURITY_TAG, "error performACLProvisioningForCloudServer");
throw ESException("error performACLProvisioningForCloudServer");
}
- if(credId != -1
- && performCertProvisioningForCloudServer(ownedDevice, credId) != ESResult::ES_OK)
+ if(credId < 1)
+ {
+ OIC_LOG(DEBUG, ENROLEE_SECURITY_TAG,
+ "Cert. provisioning is skipped due to wrong cred ID (<1)");
+ }
+ else if(performCertProvisioningForCloudServer(ownedDevice, credId) != ESResult::ES_OK)
{
OIC_LOG(DEBUG, ENROLEE_SECURITY_TAG, "error performCertProvisioningForCloudServer");
throw ESException("error performCertProvisioningForCloudServer");
#if defined(__WITH_DTLS__) && defined(__WITH_TLS__)
try
{
- if(!(cloudProp.getCloudID().empty() && cloudProp.getCredID() == -1))
+ if(!(cloudProp.getCloudID().empty() && cloudProp.getCredID() <= 0))
{
m_enrolleeSecurity = std::make_shared <EnrolleeSecurity> (m_ocResource, "");
m_enrolleeSecurity->provisionSecurityForCloudServer(cloudProp.getCloudID(),
cloudProp.getCredID());
}
+ else
+ {
+ OIC_LOG(DEBUG, ES_REMOTE_ENROLLEE_TAG, "ACL and Cert. provisioning are skipped.");
+ }
}
catch (const std::exception& e)