sm: use provided authentication requirements in slave security request

This commit is contained in:
Matthias Ringwald 2019-03-06 16:14:27 +01:00
parent 8410e1c2a6
commit 28cb1f14b8
2 changed files with 2 additions and 1 deletions

View File

@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
### Fixed
- Crypto: fix lockup when stack is shutdown while waiting for result of HCI Command, e.g. LE Read Local P256 Public Key
- SM: Avoid SM_EVENT_PAIRING_COMPLETE with ERROR_CODE_REMOTE_USER_TERMINATED_CONNECTION after successful pairing in responder role
- SM: Use provided authentication requirements in slave security request
### Added
- SM: Track if connection encryption is based on LE Secure Connection pairing

View File

@ -2033,7 +2033,7 @@ static void sm_run(void){
case SM_RESPONDER_SEND_SECURITY_REQUEST:
// send packet if possible,
if (l2cap_can_send_fixed_channel_packet_now(sm_connection->sm_handle, L2CAP_CID_SECURITY_MANAGER_PROTOCOL)){
const uint8_t buffer[2] = { SM_CODE_SECURITY_REQUEST, SM_AUTHREQ_BONDING};
const uint8_t buffer[2] = { SM_CODE_SECURITY_REQUEST, sm_auth_req};
sm_connection->sm_engine_state = SM_RESPONDER_PH1_W4_PAIRING_REQUEST;
l2cap_send_connectionless(sm_connection->sm_handle, L2CAP_CID_SECURITY_MANAGER_PROTOCOL, (uint8_t*) buffer, sizeof(buffer));
} else {