Bluetooth: BR/EDR: Check security on SSP authentication
Rejects by negative reply to authentication request if HIGH security is required on local and both devices IO Capability values disallow to interact with user. Change-Id: Ia670d0b3c5c66a27175f4f5f38cd56e845e393b0 Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
This commit is contained in:
parent
7b2799da1c
commit
029820c926
1 changed files with 11 additions and 0 deletions
|
@ -858,6 +858,17 @@ void bt_conn_ssp_auth(struct bt_conn *conn, uint32_t passkey)
|
|||
{
|
||||
conn->br.ssp_method = ssp_pair_method(conn);
|
||||
|
||||
/*
|
||||
* If local required security is HIGH then MITM is mandatory.
|
||||
* MITM protection is no achievable when SSP 'justworks' is applied.
|
||||
*/
|
||||
if (conn->required_sec_level > BT_SECURITY_MEDIUM &&
|
||||
conn->br.ssp_method == JUST_WORKS) {
|
||||
BT_DBG("MITM protection infeasible for required security");
|
||||
ssp_confirm_neg_reply(conn);
|
||||
return;
|
||||
}
|
||||
|
||||
/* TODO: As pairing acceptor call user pairing consent API callback. */
|
||||
|
||||
/* Start interactive authentication if valid, default to justworks. */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue