mirror of https://github.com/ARMmbed/mbed-os.git
ble - Generic Security Manager: set signing unconditionnal to role reversal.
A peripheral can act as a GATT client whether it is in the peripheral role or the central role therefore it doesn't make sense to enable signing only if roles will be reversed latter.pull/6932/head
parent
9880db7543
commit
1ac95e105b
|
@ -139,14 +139,16 @@ ble_error_t GenericSecurityManager::requestPairing(connection_handle_t connectio
|
||||||
_default_key_distribution.get_link()
|
_default_key_distribution.get_link()
|
||||||
);
|
);
|
||||||
|
|
||||||
|
initiator_distribution.set_signing(
|
||||||
|
cb->signing_override_default ?
|
||||||
|
cb->signing_requested :
|
||||||
|
_default_key_distribution.get_signing()
|
||||||
|
);
|
||||||
|
|
||||||
/* if requested the initiator may send all the default keys for later
|
/* if requested the initiator may send all the default keys for later
|
||||||
* use when roles are changed */
|
* use when roles are changed */
|
||||||
if (_master_sends_keys) {
|
if (_master_sends_keys) {
|
||||||
initiator_distribution = _default_key_distribution;
|
initiator_distribution = _default_key_distribution;
|
||||||
/* override default if requested */
|
|
||||||
if (cb->signing_override_default) {
|
|
||||||
initiator_distribution.set_signing(cb->signing_requested);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
KeyDistribution responder_distribution(_default_key_distribution);
|
KeyDistribution responder_distribution(_default_key_distribution);
|
||||||
|
|
Loading…
Reference in New Issue