Bluetooth: BR/EDR: Track 16 digits PIN code

As a pairing acceptor starts tracking 16 octets PIN entered by user
when pairing devices working in Security Mode 3. Based on PIN tracker
state, the generated link key is saved in keys database as combination of
un/authenticated and legacy key type.

Change-Id: I4cbb20942fb38697d952971df807aec8b16c74e4
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
This commit is contained in:
Arkadiusz Lichwa 2016-01-20 13:00:58 +01:00 committed by Gerrit Code Review
commit 998d72a986
3 changed files with 15 additions and 0 deletions

View file

@ -1126,6 +1126,10 @@ int bt_conn_auth_pincode_entry(struct bt_conn *conn, const char *pin)
return -EPERM;
}
if (len == 16) {
atomic_set_bit(conn->flags, BT_CONN_BR_LEGACY_SECURE);
}
return pin_code_reply(conn, pin, len);
}