mirror of
https://github.com/espressif/esp-idf.git
synced 2026-09-22 13:01:16 +03:00
fix(bt/bluedroid): fixed CTKD link key authentication downgrade in SC-Only mode
This commit is contained in:
@@ -2315,11 +2315,8 @@ BOOLEAN smp_calculate_link_key_from_long_term_key(tSMP_CB *p_cb)
|
||||
SMP_TRACE_ERROR("%s failed", __func__);
|
||||
} else {
|
||||
UINT8 link_key_type;
|
||||
if (btm_cb.security_mode == BTM_SEC_MODE_SC) {
|
||||
/* Secure Connections Only Mode */
|
||||
link_key_type = BTM_LKEY_TYPE_AUTH_COMB_P_256;
|
||||
} else if (controller_get_interface()->supports_secure_connections()) {
|
||||
/* both transports are SC capable */
|
||||
if ((btm_cb.security_mode == BTM_SEC_MODE_SC) ||
|
||||
(controller_get_interface()->supports_secure_connections())) {
|
||||
if (p_cb->sec_level == SMP_SEC_AUTHENTICATED) {
|
||||
link_key_type = BTM_LKEY_TYPE_AUTH_COMB_P_256;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user