mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
component/bt: Added the sec_act != BTM_BLE_SEC_ENCRYPT check in the btm_ble_set_encryption function when the sec_act is BTM_BLE_SEC_ENCRYPT_NO_MITM or BTM_BLE_SEC_ENCRYPT_MITM.
This commit is contained in:
parent
da32fbce7a
commit
a9a423a025
@ -1422,7 +1422,7 @@ tBTM_STATUS btm_ble_set_encryption (BD_ADDR bd_addr, void *p_ref_data, UINT8 lin
|
||||
sec_request to request the master to encrypt the link */
|
||||
case BTM_BLE_SEC_ENCRYPT_NO_MITM:
|
||||
case BTM_BLE_SEC_ENCRYPT_MITM:
|
||||
if (link_role == BTM_ROLE_MASTER) {
|
||||
if ((link_role == BTM_ROLE_MASTER) && (sec_act != BTM_BLE_SEC_ENCRYPT)) {
|
||||
auth_req = (sec_act == BTM_BLE_SEC_ENCRYPT_NO_MITM)
|
||||
? SMP_AUTH_GEN_BOND : (SMP_AUTH_GEN_BOND | SMP_AUTH_YN_BIT);
|
||||
btm_ble_link_sec_check (bd_addr, auth_req, &sec_req_act);
|
||||
|
Loading…
Reference in New Issue
Block a user