mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-03-26 02:37:41 +00:00
sm: set LinkKey flag if CTKD and SC are active
This commit is contained in:
parent
edc1ac20b6
commit
7ece0eaa04
@ -18,6 +18,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
||||
- AVRCP/AVCTP: report AVRCP 1.6 and AVCTP 1.4 in SDP record
|
||||
- AVDTP Source: buffer for SBC media codec information got discarded, leading to invalid Set Configuration command in second connection
|
||||
- SM: only trigger Cross-Transport Key Derivation (CTKD) when bonding is enabled
|
||||
- SM: set LinkKey flag to request CTKD if enabled
|
||||
- SM: store CTKD key with Public Identity Address
|
||||
- SM: only allow CTKD to overwrite existing link key if derived key has same or higher authentication
|
||||
- HFP HF: fix response to AG Codec Selection while waiting for OK of parallel command
|
||||
|
10
src/ble/sm.c
10
src/ble/sm.c
@ -60,8 +60,8 @@
|
||||
#error "LE Security Manager used, but neither ENABLE_LE_PERIPHERAL nor ENABLE_LE_CENTRAL defined. Please add at least one to btstack_config.h."
|
||||
#endif
|
||||
|
||||
#if defined(ENABLE_CROSS_TRANSPORT_KEY_DERIVATION) && !defined(ENABLE_CLASSIC)
|
||||
#error "Cross Transport Key Derivation requires BR/EDR (Classic) support"
|
||||
#if defined(ENABLE_CROSS_TRANSPORT_KEY_DERIVATION) && (!defined(ENABLE_CLASSIC) || !defined(ENABLE_LE_SECURE_CONNECTIONS))
|
||||
#error "Cross Transport Key Derivation requires support for LE Secure Connections and BR/EDR (Classic)"
|
||||
#endif
|
||||
|
||||
// assert SM Public Key can be sent/received
|
||||
@ -1051,6 +1051,12 @@ static int sm_key_distribution_flags_for_auth_req(void){
|
||||
flags |= SM_KEYDIST_ENC_KEY;
|
||||
#ifdef ENABLE_LE_SIGNED_WRITE
|
||||
flags |= SM_KEYDIST_SIGN;
|
||||
#endif
|
||||
#ifdef ENABLE_CROSS_TRANSPORT_KEY_DERIVATION
|
||||
// LinkKey for CTKD requires SC
|
||||
if (sm_auth_req & SM_AUTHREQ_SECURE_CONNECTION){
|
||||
flags |= SM_KEYDIST_LINK_KEY;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
return flags;
|
||||
|
Loading…
x
Reference in New Issue
Block a user