mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-01-28 18:32:41 +00:00
don't send encryption command if authentication failed
This commit is contained in:
parent
df3354fc67
commit
b5cb6874c1
@ -711,7 +711,7 @@ static void event_handler(uint8_t *packet, int size){
|
|||||||
handle = READ_BT_16(packet, 3);
|
handle = READ_BT_16(packet, 3);
|
||||||
conn = hci_connection_for_handle(handle);
|
conn = hci_connection_for_handle(handle);
|
||||||
if (!conn) break;
|
if (!conn) break;
|
||||||
if (gap_security_level_for_link_key_type(conn->link_key_type) >= conn->requested_security_level){
|
if (packet[2] == 0 && gap_security_level_for_link_key_type(conn->link_key_type) >= conn->requested_security_level){
|
||||||
// link key sufficient for requested security
|
// link key sufficient for requested security
|
||||||
conn->bonding_flags |= BONDING_SEND_ENCRYPTION_REQUEST;
|
conn->bonding_flags |= BONDING_SEND_ENCRYPTION_REQUEST;
|
||||||
} else {
|
} else {
|
||||||
|
@ -287,7 +287,6 @@ static void l2cap_start_ertx(l2cap_channel_t * channel){
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int l2cap_security_level_0_allowed_for_PSM(uint16_t psm){
|
static int l2cap_security_level_0_allowed_for_PSM(uint16_t psm){
|
||||||
// return 0; // TESTING!
|
|
||||||
return psm != PSM_SDP;
|
return psm != PSM_SDP;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user