iotivity: mbedtls: Avoid parsing error
iotivity: mbedtls: Avoid parsing error

This patch comes from ocf.patch of iotivity 1.3-rel branch.
The details are as follows.

Missing public key was already detected by checking for an
MBEDTLS_ERR_ASN1_UNEXPECTED_TAG error code. But, (p == end) also means
that the public key is missing.

Change-Id: I4c31d09623533c87bd50912aeeb2d4c6979236fc
Signed-off-by: Wonsang Ryou <bc48fb2bc21aa3a9d3ccd13729d9fc0f5ca913dd@samsung.com>

JunhwanPark/TizenRT,JunhwanPark/TizenRT,JunhwanPark/TizenRT,JunhwanPark/TizenRT,JunhwanPark/TizenRT,JunhwanPark/TizenRT