Need to set encrypt first flag to true when authentication algorithm is NULL when...
authorTinku Mannan <tmannan@ti.com>
Tue, 16 Oct 2012 14:29:00 +0000 (10:29 -0400)
committerTinku Mannan <tmannan@ti.com>
Tue, 16 Oct 2012 14:29:00 +0000 (10:29 -0400)
ti/runtime/netapi/src/netapi_sec.c

index 94578a4d96ebad9e172e901dd15886bfd871505e..6af56e562ac3d0660303e29130c0c58eb64745cc 100755 (executable)
@@ -192,6 +192,10 @@ nwalCreateSAParams_t    createParam =
         dmSaParam.dmSaParam.macSize=12;        /**todo: pass in or deduce */
         dmSaParam.dmSaParam.aadSize=0;        /**todo: pass in or deduce */
         dmSaParam.dmSaParam.enc1st =  (sa_info->dir ==NWAL_SA_DIR_OUTBOUND) ? nwal_TRUE : nwal_FALSE;  //encypt 1st for outbound
+       if  (sa_info->authMode == NWAL_SA_AALG_NULL)
+       {
+            dmSaParam.dmSaParam.enc1st = nwal_TRUE;
+       }
         //todo; allow app q for Sideband return
         memcpy(&dmSaParam.keyParam,key_params,sizeof(nwalSecKeyParams_t));
         retValue = nwal_setDMSecAssoc(((NETAPI_GLOBAL_T*) (n->global))->nwal_context.nwalInstHandle,