From 454ff9867e1f64fd928aa6f6a6756551407ebffd Mon Sep 17 00:00:00 2001 From: Sudha Bheemanna Date: Mon, 12 Sep 2016 12:46:44 +0530 Subject: [PATCH] Bluetooth: Store the key if auth type is P192 This patch allows to store the key after authentication if auth type is "HCI_LK_AUTH_COMBINATION_P192" Change-Id: I8d90830af296e718857d73cbdd1de61b8c7a37f1 Signed-off-by: Sudha Bheemanna Signed-off-by: Amit Purwar Signed-off-by: Wootak Jung Signed-off-by: Jaehoon Chung --- net/bluetooth/hci_core.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c index df0025a..663af3f 100644 --- a/net/bluetooth/hci_core.c +++ b/net/bluetooth/hci_core.c @@ -1242,6 +1242,14 @@ static bool hci_persistent_key(struct hci_dev *hdev, struct hci_conn *conn, if (conn->remote_auth == 0x02 || conn->remote_auth == 0x03) return true; +#ifdef TIZEN_BT + /* In case of auth_type '0x01', it is authenticated by MITM. + * So store it. + */ + if (key_type == HCI_LK_AUTH_COMBINATION_P192) + return true; +#endif + /* If none of the above criteria match, then don't store the key * persistently */ return false; -- 2.7.4