BLE - Cordio PAL SM: Fix force secure connection.

pull/6188/head
Vincent Coubard 2018-03-01 14:50:31 +00:00
parent cd7d9c551c
commit a057e5c0d2
1 changed files with 7 additions and 4 deletions

View File

@ -96,7 +96,13 @@ ble_error_t CordioSecurityManager::clear_resolving_list()
ble_error_t CordioSecurityManager::set_secure_connections_support(
bool enabled, bool secure_connections_only
) {
return BLE_ERROR_NOT_IMPLEMENTED;
// secure connection support is enabled automatically at the stack level.
if (secure_connections_only) {
pSmpCfg->auth |= SMP_AUTH_SC_FLAG;
} else {
pSmpCfg->auth &= ~SMP_AUTH_SC_FLAG;
}
return BLE_ERROR_NONE;
}
ble_error_t CordioSecurityManager::get_secure_connections_support(
@ -289,9 +295,6 @@ ble_error_t CordioSecurityManager::send_pairing_request(
KeyDistribution initiator_dist,
KeyDistribution responder_dist
) {
//FIXME: understand if this is required
pSmpCfg->auth = authentication_requirements.value();
DmSecPairReq(
connection,
oob_data_flag,