mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-03-28 19:20:54 +00:00
sm: request signing key only when bonding and ENABLE_LE_SIGNED_WRITE
This commit is contained in:
parent
27ef8bc836
commit
bb09604f2e
@ -1146,10 +1146,14 @@ static void sm_done_for_handle(hci_con_handle_t con_handle){
|
||||
}
|
||||
|
||||
static int sm_key_distribution_flags_for_auth_req(void){
|
||||
int flags = SM_KEYDIST_ID_KEY | SM_KEYDIST_SIGN;
|
||||
|
||||
int flags = SM_KEYDIST_ID_KEY;
|
||||
if (sm_auth_req & SM_AUTHREQ_BONDING){
|
||||
// encryption information only if bonding requested
|
||||
// encryption and signing information only if bonding requested
|
||||
flags |= SM_KEYDIST_ENC_KEY;
|
||||
#ifdef ENABLE_LE_SIGNED_WRITE
|
||||
flags | = SM_KEYDIST_SIGN;
|
||||
#endif
|
||||
}
|
||||
return flags;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user