OIC_LOG_V(DEBUG, NET_SSL_TAG, "Out %s", __func__);
return NULL;
}
+
+#ifdef _ENABLE_MULTIPLE_OWNER_
+/**
+ * Gets CA secure endpoint info corresponding for endpoint.
+ *
+ * @param[in] peer remote address
+ *
+ * @return CASecureEndpoint or NULL
+ */
+const CASecureEndpoint_t *GetCASecureEndpointData(const CAEndpoint_t* peer)
+{
+ OIC_LOG_V(DEBUG, NET_SSL_TAG, "In %s", __func__);
+
+ // TODO: Added as workaround, need to debug
+ ca_mutex_unlock(g_sslContextMutex);
+
+ ca_mutex_lock(g_sslContextMutex);
+ if (NULL == g_caSslContext)
+ {
+ OIC_LOG(ERROR, NET_SSL_TAG, "Context is NULL");
+ ca_mutex_unlock(g_sslContextMutex);
+ return NULL;
+ }
+
+ SslEndPoint_t* sslPeer = GetSslPeer(peer);
+ if(sslPeer)
+ {
+ OIC_LOG_V(DEBUG, NET_SSL_TAG, "Out %s", __func__);
+ ca_mutex_unlock(g_sslContextMutex);
+ return &sslPeer->sep;
+ }
+
+ OIC_LOG(DEBUG, NET_SSL_TAG, "Return NULL");
+ OIC_LOG_V(DEBUG, NET_SSL_TAG, "Out %s", __func__);
+ ca_mutex_unlock(g_sslContextMutex);
+ return NULL;
+}
+#endif
+
/**
* Deletes cached message.
*
VERIFY_NON_NULL_RET(provServerDeviceId, NET_SSL_TAG, "provId is NULL", CA_STATUS_INVALID_PARAM);
VERIFY_NON_NULL_RET(ownerPsk, NET_SSL_TAG, "ownerPSK is NULL", CA_STATUS_INVALID_PARAM);
+ // TODO: Added as workaround, need to debug
+ ca_mutex_unlock(g_sslContextMutex);
+
ca_mutex_lock(g_sslContextMutex);
if (NULL == g_caSslContext)
{