mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-01 19:54:32 +02: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:
@@ -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 */
|
sec_request to request the master to encrypt the link */
|
||||||
case BTM_BLE_SEC_ENCRYPT_NO_MITM:
|
case BTM_BLE_SEC_ENCRYPT_NO_MITM:
|
||||||
case BTM_BLE_SEC_ENCRYPT_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)
|
auth_req = (sec_act == BTM_BLE_SEC_ENCRYPT_NO_MITM)
|
||||||
? SMP_AUTH_GEN_BOND : (SMP_AUTH_GEN_BOND | SMP_AUTH_YN_BIT);
|
? SMP_AUTH_GEN_BOND : (SMP_AUTH_GEN_BOND | SMP_AUTH_YN_BIT);
|
||||||
btm_ble_link_sec_check (bd_addr, auth_req, &sec_req_act);
|
btm_ble_link_sec_check (bd_addr, auth_req, &sec_req_act);
|
||||||
|
Reference in New Issue
Block a user