Update snapshot(2017-11-23) 34/161534/1 accepted/tizen/4.0/unified/20171124.063734 submit/tizen_4.0/20171124.022050
authorHongkuk, Son <hongkuk.son@samsung.com>
Fri, 24 Nov 2017 01:55:24 +0000 (10:55 +0900)
committerHongkuk, Son <hongkuk.son@samsung.com>
Fri, 24 Nov 2017 01:55:44 +0000 (10:55 +0900)
Signed-off-by: Hongkuk, Son <hongkuk.son@samsung.com>
Change-Id: I1f1159259819400edca8bc384bbc8c883168abbf

packaging/snapshot_history.txt
resource/csdk/connectivity/src/bt_le_adapter/tizen/caleserver.c
resource/csdk/connectivity/src/bt_le_adapter/tizen/caleserver_mcd.c
resource/csdk/connectivity/src/bt_le_adapter/tizen/caleserver_vd.c
resource/csdk/connectivity/src/camessagehandler.c
resource/csdk/connectivity/src/tcp_adapter/catcpserver.c
resource/csdk/security/src/pkix_interface.c

index 9b727a771b807289d4e14e9946a840edcb1e1007..51607b8f43c9caf6496d401421f2c47f2143275c 100755 (executable)
@@ -1,3 +1,9 @@
+http://suprem.sec.samsung.net/jira/browse/CONPRO-1142
+
+commit_info_2017-11-23.txt
+
+commit_id: 2cca3e2b4d8aad38e38cfa8c8081c0891d82f264
+----------------------------------------------------------------------------------------------------------------------------------
 http://suprem.sec.samsung.net/jira/browse/CONPRO-1131
 
 commit_info_2017-11-14.txt
index 09f36d4e4c04d316a579356402d6e1810619eb25..4b16e7053d85af2e29540d151d7bd05220a06de8 100644 (file)
  */
 #define TAG "OIC_CA_LE_SERVER"
 
-/**
- * Initial buffer size for Gatt Server.
- */
-#define CA_LE_INITIAL_BUF_SIZE 512
-
 /**
  * The handle of the OIC server.
  */
@@ -209,7 +204,7 @@ CAResult_t CAStartLEGattServer()
 
     // For Read Characteristics.
     ret = CAAddNewCharacteristicsToGattServer(g_gattSvcPath, charReadUUID, charReadValue,
-                                              CA_LE_INITIAL_BUF_SIZE, true);
+                                              sizeof(charReadValue), true);
     if (CA_STATUS_OK != ret)
     {
         OIC_LOG_V(ERROR, TAG, "CAAddNewCharacteristicsToGattServer failed[%d]", ret);
@@ -223,7 +218,7 @@ CAResult_t CAStartLEGattServer()
 
 
     ret = CAAddNewCharacteristicsToGattServer(g_gattSvcPath, charWriteUUID, charWriteValue,
-            CA_LE_INITIAL_BUF_SIZE, false); // For Write Characteristics.
+            sizeof(charWriteValue), false); // For Write Characteristics.
     if (CA_STATUS_OK != ret )
     {
         OIC_LOG_V(ERROR, TAG, "CAAddNewCharacteristicsToGattServer failed[%d]", ret);
index a7273e74f35ff9575b1832868c5238ecebd30281..6913289bc81da69e7a7e77178f2c0894b6c026d9 100644 (file)
  */
 //#define TAG "OIC_CA_LE_SERVER_MCD"
 #define TAG BLE_SERVER_MCD_TAG
-/**
- * Initial buffer size for Gatt Server.
- */
-#define CA_LE_INITIAL_BUF_SIZE 512
 
 /**
  * The handle of the OIC server.
@@ -278,7 +274,7 @@ CAResult_t CAStartLEGattServer()
 
     // For Read Characteristics.
     ret = CAAddNewCharacteristicsToGattServer(g_gattSvcPath, charReadUUID, charReadValue,
-                                              CA_LE_INITIAL_BUF_SIZE, true);
+                                              sizeof(charReadValue), true);
     if (CA_STATUS_OK != ret)
     {
         OIC_LOG_V(ERROR, TAG, "CAAddNewCharacteristicsToGattServer failed[%d]", ret);
@@ -292,7 +288,7 @@ CAResult_t CAStartLEGattServer()
 
 
     ret = CAAddNewCharacteristicsToGattServer(g_gattSvcPath, charWriteUUID, charWriteValue,
-            CA_LE_INITIAL_BUF_SIZE, false); // For Write Characteristics.
+            sizeof(charWriteValue), false); // For Write Characteristics.
     if (CA_STATUS_OK != ret )
     {
         OIC_LOG_V(ERROR, TAG, "CAAddNewCharacteristicsToGattServer failed[%d]", ret);
index ef3654bab00dc5b1e8a14824e7f59d0d4107e959..ab1f153dca5fadd02355ad941ce801c813cb43e9 100755 (executable)
  * Logging tag for module name
  */
 #define TAG "OIC_CA_LE_SERVER_VD"
-/**
- * Initial buffer size for Gatt Server.
- */
-#define CA_LE_INITIAL_BUF_SIZE 512
 
 /**
  * The handle of the OIC server.
@@ -228,7 +224,7 @@ CAResult_t CAStartLEGattServer()
 
     // For Read Characteristics.
     ret = CAAddNewCharacteristicsToGattServer(g_gattSvcPath, charReadUUID, charReadValue,
-                                              CA_LE_INITIAL_BUF_SIZE, true);
+                                              sizeof(charReadValue), true);
     if (CA_STATUS_OK != ret)
     {
         OIC_LOG_V(ERROR, TAG, "CAAddNewCharacteristicsToGattServer failed[%d]", ret);
@@ -242,7 +238,7 @@ CAResult_t CAStartLEGattServer()
 
 
     ret = CAAddNewCharacteristicsToGattServer(g_gattSvcPath, charWriteUUID, charWriteValue,
-            CA_LE_INITIAL_BUF_SIZE, false); // For Write Characteristics.
+            sizeof(charWriteValue), false); // For Write Characteristics.
     if (CA_STATUS_OK != ret )
     {
         OIC_LOG_V(ERROR, TAG, "CAAddNewCharacteristicsToGattServer failed[%d]", ret);
index bb9d829ccee6330fc230de6fd54a886b2a4d24e3..394a728b7e4b194ce79098aa5939cb0d1ed25cd5 100755 (executable)
@@ -201,7 +201,8 @@ static CAData_t* CAGenerateHandlerData(const CAEndpoint_t *endpoint,
             goto exit;
         }
 
-        if (CADropSecondMessage(&caglobals.ca.requestHistory, endpoint, reqInfo->info.messageId,
+        if ((reqInfo->info.type != CA_MSG_CONFIRM) &&
+            CADropSecondMessage(&caglobals.ca.requestHistory, endpoint, reqInfo->info.messageId,
                                 reqInfo->info.token, reqInfo->info.tokenLength))
         {
             OIC_LOG(INFO, TAG, "Second Request with same Token, Drop it");
index 2d7df005c5f38bc64f65e6c68ffb65f5433f3271..78b43bb72463bc7e0a3af489c9bd3fe88ae4c0d3 100644 (file)
@@ -616,6 +616,9 @@ static void CAReceiveMessage(int fd)
         {
             OIC_LOG(ERROR, TAG, "Failed to disconnect TCP session");
         }
+
+        CASearchAndDeleteTCPSession(&svritem->sep.endpoint);
+        return;
     }
 }
 
index dc807d3fbfff919d23435a54e91344a5f82f0448..5b1dc613b31752f76a2eb487a6c7332df2e342c8 100644 (file)
@@ -106,6 +106,10 @@ void CheckInvalidDERSignature(uint8_t *crtBuf, size_t *crtBufLen)
         return;
     }
 
+    OIC_LOG_V(INFO, TAG, "Cert Buf Length: %lu", *crtBufLen);
+    OIC_LOG(INFO, TAG, "[Cert Buf] : ");
+    OIC_LOG_BUFFER(INFO, TAG, crtBuf, *crtBufLen);
+
     mbedtls_x509_crt deviceCert;
     int ret = 0;
 
@@ -431,8 +435,13 @@ int SetHwPkixCallbacks(GetHwKeyContext getHwKeyContext,
 {
     OIC_LOG_V(INFO, TAG, "In %s", __func__);
 
-    if (NULL == getHwKeyContext || NULL == freeHwKeyContext
-        || NULL == getOwnCertCb || NULL == setupPkContextCb)
+    if (NULL == getHwKeyContext && NULL == freeHwKeyContext
+        && NULL == getOwnCertCb && NULL == setupPkContextCb)
+    {
+        OIC_LOG(INFO, TAG, "Unregistering callbacks");
+    }
+    else if (NULL == getHwKeyContext || NULL == freeHwKeyContext
+             || NULL == getOwnCertCb || NULL == setupPkContextCb)
     {
         OIC_LOG(ERROR, TAG, "NULL Passed");
         OIC_LOG(ERROR, TAG, "Callback function parameters can not be null");
@@ -444,7 +453,7 @@ int SetHwPkixCallbacks(GetHwKeyContext getHwKeyContext,
     gHwPkixCtx.getOwnCertCb = getOwnCertCb;
     gHwPkixCtx.setupPkContextCb = setupPkContextCb;
 
-    if (gHwPkixCtx.hwKeyCtx)
+    if (gHwPkixCtx.hwKeyCtx && NULL != freeHwKeyContext)
     {
         gHwPkixCtx.freeHwKeyContext(gHwPkixCtx.hwKeyCtx);
     }