Commit e133089b 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 <d.zhuravlev@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18929Tested-by: default avatarjenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: default avatarGreg Zaverucha <gregz@microsoft.com>
parent 932638ed
...@@ -1330,8 +1330,9 @@ static void SetupCipher(mbedtls_ssl_config * config, CATransportAdapter_t adapte ...@@ -1330,8 +1330,9 @@ static void SetupCipher(mbedtls_ssl_config * config, CATransportAdapter_t adapte
g_getCredentialTypesCallback(g_caSslContext->cipherFlag, deviceId); g_getCredentialTypesCallback(g_caSslContext->cipherFlag, deviceId);
// Retrieve the PSK credential from SRM // Retrieve the PSK credential from SRM or use PIN based generation
if (true == g_caSslContext->cipherFlag[0] && 0 != InitPskIdentity(config)) 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!"); 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