aboutsummaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2014-03-09 15:19:17 -0400
committerJohan Hedberg <johan.hedberg@intel.com>2014-03-09 15:39:50 -0400
commit7ee4ea3692f20b87b0e0d3884d5b2d22ec1a2df0 (patch)
tree8e3cb5d8a34f9daeb19a97b7d6147d3955b501b1 /include/net
parent0753c182ef11e27f8f3dea2dc9ca4bcf40019eb5 (diff)
Bluetooth: Add support for handling signature resolving keys
The connection signature resolving key (CSRK) is used for attribute protocol signed write procedures. This change generates a new local key during pairing and requests the peer key as well. Newly generated key and received key will be provided to userspace using the New Signature Resolving Key management event. The Master CSRK can be used for verification of remote signed write PDUs and the Slave CSRK can be used for sending signed write PDUs to the remote device. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/bluetooth/hci_core.h8
-rw-r--r--include/net/bluetooth/mgmt.h12
2 files changed, 20 insertions, 0 deletions
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h
index dbb788e4f265..e869884fbfa9 100644
--- a/include/net/bluetooth/hci_core.h
+++ b/include/net/bluetooth/hci_core.h
@@ -91,6 +91,13 @@ struct bt_uuid {
91 u8 svc_hint; 91 u8 svc_hint;
92}; 92};
93 93
94struct smp_csrk {
95 bdaddr_t bdaddr;
96 u8 bdaddr_type;
97 u8 master;
98 u8 val[16];
99};
100
94struct smp_ltk { 101struct smp_ltk {
95 struct list_head list; 102 struct list_head list;
96 bdaddr_t bdaddr; 103 bdaddr_t bdaddr;
@@ -1265,6 +1272,7 @@ int mgmt_device_blocked(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 type);
1265int mgmt_device_unblocked(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 type); 1272int mgmt_device_unblocked(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 type);
1266void mgmt_new_ltk(struct hci_dev *hdev, struct smp_ltk *key); 1273void mgmt_new_ltk(struct hci_dev *hdev, struct smp_ltk *key);
1267void mgmt_new_irk(struct hci_dev *hdev, struct smp_irk *irk); 1274void mgmt_new_irk(struct hci_dev *hdev, struct smp_irk *irk);
1275void mgmt_new_csrk(struct hci_dev *hdev, struct smp_csrk *csrk);
1268void mgmt_reenable_advertising(struct hci_dev *hdev); 1276void mgmt_reenable_advertising(struct hci_dev *hdev);
1269void mgmt_smp_complete(struct hci_conn *conn, bool complete); 1277void mgmt_smp_complete(struct hci_conn *conn, bool complete);
1270 1278
diff --git a/include/net/bluetooth/mgmt.h b/include/net/bluetooth/mgmt.h
index 0326648fd799..d4b571c2f9fd 100644
--- a/include/net/bluetooth/mgmt.h
+++ b/include/net/bluetooth/mgmt.h
@@ -551,3 +551,15 @@ struct mgmt_ev_new_irk {
551 bdaddr_t rpa; 551 bdaddr_t rpa;
552 struct mgmt_irk_info irk; 552 struct mgmt_irk_info irk;
553} __packed; 553} __packed;
554
555struct mgmt_csrk_info {
556 struct mgmt_addr_info addr;
557 __u8 master;
558 __u8 val[16];
559} __packed;
560
561#define MGMT_EV_NEW_CSRK 0x0019
562struct mgmt_ev_new_csrk {
563 __u8 store_hint;
564 struct mgmt_csrk_info key;
565} __packed;