zephyr/net/bluetooth
Szymon Janc 341f81bd81 Bluetooth: SMP: Refactor keys handling
This refactor the way stored keys are handled to avoid overwriting
existing keys with new keys in case of pairing failed. Main goal is
to delay update of keys (including type and encryption size) until
link is succesfully encrypted with new key (legacy STK or LE SC LTK).

To fix this properly, TK is used to store STK or LE SC LTK and updates
of keys properties are done only on successfull encryption. This makes
code less error prone since update is done only in one place in code.
Also quering SMP code for current key makes sure that correct keys is
used in case of re-pairing.

Change-Id: I6b9e3d8229de522143e0d1fbfe0bd8223dad2a56
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-02-05 20:24:52 -05:00
..
Kconfig Bluetooth: Kconfig: Be consistent with terminology 2016-02-05 20:24:49 -05:00
Makefile Bluetooth: Always compile in UUID support 2016-02-05 20:24:40 -05:00
att.c Bluetooth: Fix checking response len in read by type 2016-02-05 20:24:51 -05:00
att.h Bluetooth: Make Kconfig buffer sizes follow MTU sizes 2016-02-05 20:24:45 -05:00
conn.c Bluetooth: BR/EDR: Use correct ACL Tx MTU and semaphore 2016-02-05 20:24:51 -05:00
conn_internal.h Bluetooth: Cleanup LE ACL Tx semaphore 2016-02-05 20:24:51 -05:00
gatt.c Bluetooth: gatt: Fix missing return and assignment to invalid type 2016-02-05 20:24:47 -05:00
gatt_internal.h Change BSD-3 licenses to Apache 2 2016-02-05 20:24:29 -05:00
hci_core.c Bluetooth: SMP: Refactor keys handling 2016-02-05 20:24:52 -05:00
hci_core.h Bluetooth: Cleanup LE ACL Tx semaphore 2016-02-05 20:24:51 -05:00
keys.c Change BSD-3 licenses to Apache 2 2016-02-05 20:24:29 -05:00
keys.h Bluetooth: Add support for LE Secure Connections LTK 2016-02-05 20:24:49 -05:00
l2cap.c Bluetooth: L2CAP: Implement segmentation for incoming packets 2016-02-05 20:24:51 -05:00
l2cap_internal.h Bluetooth: Move BT_L2CAP_BUF_SIZE to a more appropriate place 2016-02-05 20:24:45 -05:00
smp.c Bluetooth: SMP: Refactor keys handling 2016-02-05 20:24:52 -05:00
smp.h Bluetooth: SMP: Refactor keys handling 2016-02-05 20:24:52 -05:00
smp_null.c Bluetooth: L2CAP: Unref buffer after calling recv callback 2016-02-05 20:24:41 -05:00
stack.h Change BSD-3 licenses to Apache 2 2016-02-05 20:24:29 -05:00
uuid.c Bluetooth: Make bt_uuid_str parameter const 2016-02-05 20:24:38 -05:00