security: Improve with more specific error core and log of it
security: Improve with more specific error core and log of it

This improvement has been suggested by Randeep Singh at :

 https://gerrit.iotivity.org/gerrit/#/c/9521/

Also reducing presence of "goto:" is always welcome ;)

Change-Id: I2ca21c37105c530c92e2cfd4b6ae9e3cfbc06231
Origin: https://gerrit.iotivity.org/gerrit/#/c/9543/
Signed-off-by: Philippe Coval <ff46fec9739d31cce915aabcc3a7a2c00eee4d6c@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/9543
Tested-by: jenkins-iotivity <09cb29e8a2b473a2c978382eec13ee06fa017bda@opendaylight.org>
Reviewed-by: Randeep Singh <46ce9385024397d3e4d9ed63be2e0a0d801e95b7@samsung.com>

rzr/iotivity,iotivity/iotivity,iotivity/iotivity,iotivity/iotivity,rzr/iotivity,iotivity/iotivity,rzr/iotivity,iotivity/iotivity,rzr/iotivity,rzr/iotivity,iotivity/iotivity,rzr/iotivity,iotivity/iotivity,rzr/iotivity,iotivity/iotivity