extern "C" {
#endif //__cplusplus
-#include "caadapterutils.h"
-#include "cainterface.h"
+#include "cacommon.h"
+#include "casecurityinterface.h"
/**
- * Currently TLS supported adapters(2) WIFI and ETHENET for linux platform.
+ * Currently TLS supported adapters(3) WIFI, ETHENET and BLE for linux platform.
*/
-#define MAX_SUPPORTED_ADAPTERS 2
+#define MAX_SUPPORTED_ADAPTERS 3
-typedef void (*CAPacketReceivedCallback)(const CASecureEndpoint_t *sep,
- const void *data, uint32_t dataLength);
+typedef CAResult_t (*CAPacketReceivedCallback)(const CASecureEndpoint_t *sep,
+ const void *data, size_t dataLength);
-typedef void (*CAPacketSendCallback)(CAEndpoint_t *endpoint,
- const void *data, uint32_t dataLength);
+typedef ssize_t (*CAPacketSendCallback)(CAEndpoint_t *endpoint,
+ const void *data, size_t dataLength);
/**
* Select the cipher suite for dtls handshake
*
* @param[in] cipher cipher suite
- * 0xC018 : TLS_ECDH_anon_WITH_AES_128_CBC_SHA_256
- * 0xC0A8 : TLS_PSK_WITH_AES_128_CCM_8
- * 0xC0AE : TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8
+ * TLS_RSA_WITH_AES_256_CBC_SHA256 0x3D
+ * TLS_RSA_WITH_AES_128_GCM_SHA256 0x009C
+ * TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 0xC02B
+ * TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8 0xC0AE
+ * TLS_ECDHE_ECDSA_WITH_AES_128_CCM 0xC0AC
+ * TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 0xC023
+ * TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384 0xC024
+ * TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 0xC02C
+ * TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256 0xC037
+ * TLS_ECDH_anon_WITH_AES_128_CBC_SHA 0xC018
*
* @retval ::CA_STATUS_OK for success, otherwise some error value
*/
*/
CAResult_t CAcloseSslConnection(const CAEndpoint_t *endpoint);
+#ifdef __TIZEN__
+/**
+ * Close the DTLS session and free endpoint.
+ *
+ * @param[in] endpoint information of network address;
+ * CAcloseSslConnectionWrapper takes ownership of endpoint
+ *
+ * @retval ::CA_STATUS_OK Successful.
+ * @retval ::CA_STATUS_FAILED Operation failed.
+ */
+CAResult_t CAcloseSslConnectionFreeEndpoint(CAEndpoint_t *endpoint);
+#endif //__TIZEN__
+
/**
* initialize mbedTLS library and other necessary initialization.
*
const uint8_t* provServerDeviceId, const size_t provServerDeviceIdLen,
uint8_t* ownerPsk, const size_t ownerPskSize);
-#ifdef _ENABLE_MULTIPLE_OWNER_
+#ifdef MULTIPLE_OWNER
/**
* Gets CA secure endpoint info corresponding for endpoint.
*
const CASecureEndpoint_t *GetCASecureEndpointData(const CAEndpoint_t* peer);
#endif
+bool CAIsExistSslPeer(const CAEndpoint_t *peer);
+
#ifdef __cplusplus
}
#endif //__cplusplus