Bluetooth: BR/EDR: Enable cancel Passkey Notify authentication
From now on user/app has possibility to dismiss Passkey Notify authentication on acceptor side even with DisplayOnly interface. The action on 'Cancel' API in this case is disconnection. Change-Id: I4be198482c23c0ccaeb0112b72ff269037e03583 Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
This commit is contained in:
parent
7b4ddaf73d
commit
7420276282
1 changed files with 6 additions and 0 deletions
|
@ -878,6 +878,7 @@ void bt_conn_ssp_auth(struct bt_conn *conn, uint32_t passkey)
|
|||
bt_auth->passkey_confirm(conn, passkey);
|
||||
break;
|
||||
case PASSKEY_DISPLAY:
|
||||
atomic_set_bit(conn->flags, BT_CONN_USER);
|
||||
bt_auth->passkey_display(conn, passkey);
|
||||
break;
|
||||
case PASSKEY_INPUT:
|
||||
|
@ -1507,6 +1508,11 @@ int bt_conn_auth_cancel(struct bt_conn *conn)
|
|||
return ssp_passkey_neg_reply(conn);
|
||||
}
|
||||
|
||||
if (conn->br.ssp_method == PASSKEY_DISPLAY) {
|
||||
return bt_conn_disconnect(conn,
|
||||
BT_HCI_ERR_AUTHENTICATION_FAIL);
|
||||
}
|
||||
|
||||
return pin_code_neg_reply(&conn->br.dst);
|
||||
}
|
||||
#endif /* CONFIG_BLUETOOTH_BREDR */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue