Commit e8df8550 authored by Oleksii Beketov's avatar Oleksii Beketov

Reciprocal close_notify

Added mutual close_notify alert respond on receiving
close_notify alert according to RFC5246 p. 7.2.1.

Change-Id: I984db86939fc575e02e964a849cf5f7b9e7265c9
Signed-off-by: default avatarOleksii Beketov <ol.beketov@samsung.com>
parent f242aced
......@@ -2524,6 +2524,12 @@ CAResult_t CAdecryptSsl(const CASecureEndpoint_t *sep, uint8_t *data, size_t dat
g_closeSslConnectionCallback(peer->sep.identity.id, peer->sep.identity.id_length);
}
do
{
ret = mbedtls_ssl_close_notify(&peer->ssl);
}
while (MBEDTLS_ERR_SSL_WANT_WRITE == ret);
RemovePeerFromList(&peer->sep.endpoint);
oc_mutex_unlock(g_sslContextMutex);
return CA_STATUS_OK;
......
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