OTM should be able to use PSK ciphersuite
even if there is no credentials in SVR DB
Change-Id: Icfde495b61f5f726cab2604fd5fc0f5e9e88fff9
Signed-off-by: Dmitriy Zhuravlev <d.zhuravlev@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18929
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Greg Zaverucha <gregz@microsoft.com>
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!");
}