mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-03-29 13:20:39 +00:00
gap: only store link key for ssp if remote side has set bondable in io cap auth requirements as well
This commit is contained in:
parent
50d7398c74
commit
bec5f683aa
@ -31,7 +31,9 @@ A2DP Source: `ENABLE_A2DP_SOURCE_EXPLICIT_CONFIG` disables auto config. Requires
|
||||
### Fixed
|
||||
HCI: handle start inquiry failure
|
||||
AVRCP Target: fix notification changed event
|
||||
HFP: Emit Audio Connection Released on SLC Release, e.g. remote power off
|
||||
HFP: Emit Audio Connection Released on SLC Release, e.g. remote power off
|
||||
GAP: calculate IO Cap AuthReq Bondable Mode based on `gap_ssp_set_authentication_requirement` and `gap_set_bondable_mode`
|
||||
GAP: only store link key for ssp if remote side has set bondable in io cap auth requirements as well
|
||||
|
||||
### Changed
|
||||
HCI: config I2S for BCM Controllers if `ENABLE_SCO_OVER_PCM`, reduce bit clock to 256/512 kHz
|
||||
@ -58,8 +60,7 @@ u-blox SPP Service Server: use `GATTSERVICE_SUBEVENT_SPP_SERVICE_CONNECTED` and
|
||||
events instead of callback, and `RFCOMM_DATA_PACKET` for received data
|
||||
HSP AG: emit HSP_SUBEVENT_BUTTON_PRESSED instead of audio connection setup/release
|
||||
Examples: use `btstack_event.h` getters instead of direct array access, use enum to compare status codes
|
||||
GAP: calculate IO Cap AuthReq Bondable Mode based on `gap_ssp_set_authentication_requirement` and `gap_set_bondable_mode`
|
||||
|
||||
|
||||
## Release v1.3.2
|
||||
|
||||
### Added
|
||||
|
10
src/hci.c
10
src/hci.c
@ -2618,6 +2618,16 @@ static void event_handler(uint8_t *packet, uint16_t size){
|
||||
if (link_key_type != CHANGED_COMBINATION_KEY){
|
||||
conn->link_key_type = link_key_type;
|
||||
}
|
||||
// only store link key:
|
||||
// - if bondable enabled
|
||||
if (hci_stack->bondable == false) break;
|
||||
// - for SSP, also check if remote side requested bonding as well
|
||||
if (conn->link_key_type != COMBINATION_KEY){
|
||||
uint8_t auth_req_ignoring_mitm = conn->io_cap_response_auth_req & 0xfe;
|
||||
if (auth_req_ignoring_mitm == SSP_IO_AUTHREQ_MITM_PROTECTION_NOT_REQUIRED_NO_BONDING){
|
||||
break;
|
||||
}
|
||||
}
|
||||
gap_store_link_key_for_bd_addr(addr, &packet[8], conn->link_key_type);
|
||||
// still forward event to allow dismiss of pairing dialog
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user