Commit 34ed55ce authored by Aleksey's avatar Aleksey

[IOT-3229] Reset mbedtls verify callback

Reset X509 verify callback in the global
mbedtls context in case if the identity
callback isn't set.

Change-Id: Ib1abfa00753b971d4eda85cfc18ebcc3a7b0707d
Signed-off-by: Aleksey's avatarAleksey Volkov <a.volkov@samsung.com>
parent 2d036285
......@@ -1421,10 +1421,8 @@ static SslEndPoint_t * NewSslEndPoint(const CAEndpoint_t * endpoint, mbedtls_ssl
tep->sep.endpoint = *endpoint;
tep->sep.endpoint.flags = (CATransportFlags_t)(tep->sep.endpoint.flags | CA_SECURE);
if (g_getIdentityCallback != NULL)
{
mbedtls_ssl_conf_verify(config, verifyIdentity, NULL);
}
mbedtls_ssl_conf_verify(config, g_getIdentityCallback ? verifyIdentity : NULL, NULL);
if(0 != mbedtls_ssl_setup(&tep->ssl, config))
{
OIC_LOG(ERROR, NET_SSL_TAG, "Setup failed");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment