oc_tls: fix auth using identity certificates
oc_tls: fix auth using identity certificates

This change fixes and enhances the authentication flow using identity
certificate chains and corrects the authoritzation checks during the
handshake which requires the presence of a trustca credential entry
with a subjectuuid that either matches that of the peer, or the
wildcard subject *.

Change-Id: Iab6f4439110f689577d67b62e8390f118e55d14d
Signed-off-by: Kishen Maloor <c62ddea3cd661a9268bff15f07fc2229cdc9ac02@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/27823

iotivity/iotivity-constrained,iotivity/iotivity-constrained,iotivity/iotivity-constrained,iotivity/iotivity-constrained