mirror of https://github.com/ARMmbed/mbed-os.git
BLE Cordio: Enable handling of security.
parent
818ec8c8ec
commit
a849f7f433
|
@ -35,6 +35,7 @@
|
||||||
#include "mbed_assert.h"
|
#include "mbed_assert.h"
|
||||||
|
|
||||||
#include "CordioPalAttClient.h"
|
#include "CordioPalAttClient.h"
|
||||||
|
#include "CordioPalSecurityManager.h"
|
||||||
|
|
||||||
/*! WSF handler ID */
|
/*! WSF handler ID */
|
||||||
wsfHandlerId_t stack_handler_id;
|
wsfHandlerId_t stack_handler_id;
|
||||||
|
@ -238,6 +239,10 @@ void BLE::processEvents()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (ble::pal::vendor::cordio::CordioSecurityManager::get_security_manager().sm_handler(msg)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
switch(msg->event) {
|
switch(msg->event) {
|
||||||
case DM_RESET_CMPL_IND: {
|
case DM_RESET_CMPL_IND: {
|
||||||
::BLE::InitializationCompleteCallbackContext context = {
|
::BLE::InitializationCompleteCallbackContext context = {
|
||||||
|
@ -362,11 +367,10 @@ void BLE::stack_setup()
|
||||||
SecInit();
|
SecInit();
|
||||||
|
|
||||||
// Note: enable once security is supported
|
// Note: enable once security is supported
|
||||||
#if 0
|
SecRandInit();
|
||||||
SecAesInit();
|
SecAesInit();
|
||||||
SecCmacInit();
|
SecCmacInit();
|
||||||
SecEccInit();
|
SecEccInit();
|
||||||
#endif
|
|
||||||
|
|
||||||
handlerId = WsfOsSetNextHandler(HciHandler);
|
handlerId = WsfOsSetNextHandler(HciHandler);
|
||||||
HciHandlerInit(handlerId);
|
HciHandlerInit(handlerId);
|
||||||
|
@ -400,8 +404,10 @@ void BLE::stack_setup()
|
||||||
|
|
||||||
handlerId = WsfOsSetNextHandler(SmpHandler);
|
handlerId = WsfOsSetNextHandler(SmpHandler);
|
||||||
SmpHandlerInit(handlerId);
|
SmpHandlerInit(handlerId);
|
||||||
|
SmprInit();
|
||||||
SmprScInit();
|
SmprScInit();
|
||||||
SmpiInit();
|
SmpiInit();
|
||||||
|
SmpiScInit();
|
||||||
|
|
||||||
stack_handler_id = WsfOsSetNextHandler(&BLE::stack_handler);
|
stack_handler_id = WsfOsSetNextHandler(&BLE::stack_handler);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue