BLE Cordio: Enable handling of security.

pull/6188/head
Vincent Coubard 2018-01-19 18:42:59 +00:00
parent 818ec8c8ec
commit a849f7f433
1 changed files with 8 additions and 2 deletions

View File

@ -35,6 +35,7 @@
#include "mbed_assert.h"
#include "CordioPalAttClient.h"
#include "CordioPalSecurityManager.h"
/*! WSF handler ID */
wsfHandlerId_t stack_handler_id;
@ -238,6 +239,10 @@ void BLE::processEvents()
return;
}
if (ble::pal::vendor::cordio::CordioSecurityManager::get_security_manager().sm_handler(msg)) {
return;
}
switch(msg->event) {
case DM_RESET_CMPL_IND: {
::BLE::InitializationCompleteCallbackContext context = {
@ -362,11 +367,10 @@ void BLE::stack_setup()
SecInit();
// Note: enable once security is supported
#if 0
SecRandInit();
SecAesInit();
SecCmacInit();
SecEccInit();
#endif
handlerId = WsfOsSetNextHandler(HciHandler);
HciHandlerInit(handlerId);
@ -400,8 +404,10 @@ void BLE::stack_setup()
handlerId = WsfOsSetNextHandler(SmpHandler);
SmpHandlerInit(handlerId);
SmprInit();
SmprScInit();
SmpiInit();
SmpiScInit();
stack_handler_id = WsfOsSetNextHandler(&BLE::stack_handler);