Commit 5b9135c7 authored by Aleksey's avatar Aleksey

[IOT-3219][IOT-3220] Restore default handlers

Restore default TLS handlers immediatelly after PSK generation
in case of MFG OTM

Change-Id: Idfce0bf8e2b6741d0a64a8f0143e2eb955e7167e
Signed-off-by: Aleksey's avatarAleksey Volkov <a.volkov@samsung.com>
(cherry picked from commit 012b1e65)
parent 162c51b5
......@@ -66,6 +66,8 @@
#endif
#if defined(__WITH_DTLS__) || defined (__WITH_TLS__)
#include "pkix_interface.h"
#include <mbedtls/ssl_ciphersuites.h>
#include <mbedtls/pk.h>
#include <mbedtls/base64.h>
......@@ -2241,6 +2243,20 @@ static OCEntityHandlerResult HandleNewCredential(OCEntityHandlerRequest *ehReque
#endif // __WITH_DTLS__ or __WITH_TLS__
}
if(OIC_MANUFACTURER_CERTIFICATE== doxm->oxmSel)
{
#if defined(__WITH_DTLS__) || defined(__WITH_TLS__)
if(CA_STATUS_OK != CAregisterPkixInfoHandler(GetPkixInfo)
|| CA_STATUS_OK != CAregisterIdentityHandler(GetIdentityHandler)
|| CA_STATUS_OK != CAregisterGetCredentialTypesHandler(InitCipherSuiteList))
{
OIC_LOG(ERROR, TAG, "Failed to revert TLS default handlers.");
ret = OC_EH_ERROR;
break;
}
#endif // __WITH_DTLS__ or __WITH_TLS__
}
//Select cipher suite to use owner PSK
if(CA_STATUS_OK != CAEnableAnonECDHCipherSuite(false))
{
......
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