mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-03-25 16:43:28 +00:00
hci: on re-authentication, wait for encryption key refresh before emitting security level
This commit is contained in:
parent
c0fa965c75
commit
c24eef3424
@ -4293,11 +4293,11 @@ static void event_handler(uint8_t *packet, uint16_t size){
|
|||||||
// authenticated
|
// authenticated
|
||||||
conn->authentication_flags |= AUTH_FLAG_CONNECTION_AUTHENTICATED;
|
conn->authentication_flags |= AUTH_FLAG_CONNECTION_AUTHENTICATED;
|
||||||
|
|
||||||
// If not already encrypted, start encryption
|
// If not already encrypted, start encryption, otherwise, wait for reencryption complete
|
||||||
if ((conn->authentication_flags & AUTH_FLAG_CONNECTION_ENCRYPTED) == 0){
|
if ((conn->authentication_flags & AUTH_FLAG_CONNECTION_ENCRYPTED) == 0){
|
||||||
conn->bonding_flags |= BONDING_SEND_ENCRYPTION_REQUEST;
|
conn->bonding_flags |= BONDING_SEND_ENCRYPTION_REQUEST;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// emit updated security level (will be 0 if not authenticated)
|
// emit updated security level (will be 0 if not authenticated)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user