Commit 982096ad authored by Dmitriy Zhuravlev's avatar Dmitriy Zhuravlev Committed by Greg Zaverucha

[IOT-2045] Fix PIN based OTM

OTM should be able to use PSK ciphersuite
even if there is no credentials in SVR DB

Change-Id: Icfde495b61f5f726cab2604fd5fc0f5e9e88fff9
Signed-off-by: default avatarDmitriy Zhuravlev <>
Reviewed-on: default avatarjenkins-iotivity <>
Reviewed-by: default avatarGreg Zaverucha <>
(cherry picked from commit e133089b)
Reviewed-on: default avatarAndrii Shtompel <>
Reviewed-by: default avatarKevin Kane <>
parent 179c9625
......@@ -1299,8 +1299,9 @@ static void SetupCipher(mbedtls_ssl_config * config, CATransportAdapter_t adapte
g_getCredentialTypesCallback(g_caSslContext->cipherFlag, deviceId);
// Retrieve the PSK credential from SRM
if (true == g_caSslContext->cipherFlag[0] && 0 != InitPskIdentity(config))
// Retrieve the PSK credential from SRM or use PIN based generation
if ((SSL_ECDHE_PSK_WITH_AES_128_CBC_SHA256 == g_caSslContext->cipher ||
true == g_caSslContext->cipherFlag[0]) && 0 != InitPskIdentity(config))
OIC_LOG(ERROR, NET_SSL_TAG, "PSK identity initialization 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