aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAleksey Volkov <a.volkov@samsung.com>2018-10-24 15:10:12 +0300
committerNathan Heldt-Sheller <nathan.heldt-sheller@intel.com>2018-11-05 19:19:06 +0000
commit67cb0bb45ea980c5c27cee5eaddaac8cdb528386 (patch)
tree957f3e3195844153768279767222619de8c1c1e3
parent012b1e653c069c3cc0b0aab663c1559689f3598b (diff)
[IOT-3219] Prevent Iotivity crash at OTM
Change-Id: Ia3436b8ea9da299084b770c4cd048f626a5d7d5a Signed-off-by: Aleksey Volkov <a.volkov@samsung.com>
-rw-r--r--resource/csdk/connectivity/src/adapter_util/ca_adapter_net_ssl.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/resource/csdk/connectivity/src/adapter_util/ca_adapter_net_ssl.c b/resource/csdk/connectivity/src/adapter_util/ca_adapter_net_ssl.c
index dc798d7..c9df6cd 100644
--- a/resource/csdk/connectivity/src/adapter_util/ca_adapter_net_ssl.c
+++ b/resource/csdk/connectivity/src/adapter_util/ca_adapter_net_ssl.c
@@ -1388,6 +1388,10 @@ static int verifyIdentity( void *data, mbedtls_x509_crt *crt, int depth, uint32_
OC_UNUSED(data); // no need to pass extra data
OC_UNUSED(flags); // we do not remove any flags
static UuidContext_t ctx = { NULL };
+ if (NULL == g_getIdentityCallback)
+ {
+ return MBEDTLS_ERR_X509_FEATURE_UNAVAILABLE;
+ }
g_getIdentityCallback(&ctx, crt->raw.p, crt->raw.len);
if (0 == depth) // leaf certificate
{