Update snapshot(2018-01-31)
[platform/upstream/iotivity.git] / resource / csdk / connectivity / inc / catcpadapter.h
index caeb8d4..d1e7d20 100644 (file)
@@ -36,6 +36,8 @@ extern "C"
 {
 #endif
 
+// TLS data max size (rfc5246: TLSCiphertext max (2^14+2048+5))
+#define TLS_DATA_MAX_SIZE 18437
 
 typedef enum CAProtocol
 {
@@ -65,7 +67,7 @@ typedef struct
     size_t len;                         /**< received data length */
     size_t totalLen;                    /**< total coap data length required to receive */
     size_t bufLen;                      /**< Buffer length. Buffer will be grown dynamically with respect to data received. */
-    unsigned char tlsdata[18437];       /**< tls data(rfc5246: TLSCiphertext max (2^14+2048+5)) */
+    unsigned char *tlsdata;             /**< tls data(rfc5246: TLSCiphertext max (2^14+2048+5)) */
     size_t tlsLen;                      /**< received tls data length */
     CAProtocol_t protocol;              /**< application-level protocol */
     CATCPConnectionState_t state;       /**< current tcp session state */