125 Commits

Author SHA1 Message Date
Matthias Ringwald
71b2c14530 generalize context argument for aes128 and random number generation 2015-07-31 15:55:31 +02:00
Matthias Ringwald
341d229cfc fix list of expected keys in master role, trigger sm_run on sm_authorization_request 2015-07-30 23:28:46 +02:00
Milanka Ringwald
c4350632cc annotate/update api, handle multiline function def 2015-07-01 17:04:51 +02:00
Matthias Ringwald
45c102fdda add helper hci_le_advertisements_set_params function to avoid call to sm from hci, gap ddvertisement control complete 2015-06-12 19:28:46 +02:00
Matthias Ringwald
9cc64000ad provide getter for random address mode 2015-06-11 23:12:25 +02:00
Matthias Ringwald
f243b7dfe2 fix compile error from last commit 2015-05-21 15:48:14 +02:00
Matthias Ringwald
4fdd1cade1 handle call to sm_send_security_request before hci le connection complete was handled in sm 2015-05-21 15:45:55 +02:00
Matthias Ringwald
71de195ed3 fix c99 warnings for missing argument of functions with no arguments, fix more warnings 2015-05-13 10:30:46 +02:00
Sean Wilson
6da48142ef Fix C99 warnings. 2015-04-28 10:31:53 -04:00
Matthias Ringwald
ea35cda86d fix sending of security request by le responder 2015-04-24 12:12:37 +02:00
Pete Blois
a2366dc9d3 Setting correct length for BTSTACK_EVENT_STATE event.
The second byte of the data is the length of the remaining data (in this case the HCI_STATE_WORKING byte). This was passing 0 indicating that there was no data when in fact there was.
2015-03-30 13:17:10 -07:00
matthias.ringwald@gmail.com
c1899d25d0 pass sign counter into CMAC calculation functions 2015-03-05 14:42:26 +00:00
matthias.ringwald@gmail.com
5c52231480 added sm_le_device_index for use by gatt client/server 2015-03-05 10:48:26 +00:00
matthias.ringwald@gmail.com
85cacb82ec sm starts encryption using ltk/ediv/rand from previous bonding 2015-03-03 22:17:47 +00:00
matthias.ringwald@gmail.com
9ec080fd8e new states for re-establishing secure connection 2015-03-03 21:38:29 +00:00
matthias.ringwald@gmail.com
b9b968bb23 rename central_device_db_index into le_device_db_index 2015-03-02 21:44:16 +00:00
matthias.ringwald@gmail.com
3a3e1c9119 renamed central_device_db* files into le_device_db* 2015-03-02 21:40:56 +00:00
matthias.ringwald@gmail.com
c5d3944d90 rename central_device_db into le_device_db 2015-03-02 21:30:12 +00:00
matthias.ringwald@gmail.com
d2d764240d add encryption info to central db 2015-03-02 21:12:29 +00:00
matthias.ringwald@gmail.com
2e77e513be Stop using pointer to array for bd_addr_t and link_key_t 2015-03-01 20:51:08 +00:00
matthias.ringwald@gmail.com
24b0319d94 refactored stk setup 2015-02-27 19:56:00 +00:00
matthias.ringwald@gmail.com
334856fa1b move code to start timer on pairing request 2015-02-27 19:14:15 +00:00
matthias.ringwald@gmail.com
abace5deec extracted sm_initiator_setup2 2015-02-27 16:53:54 +00:00
matthias.ringwald@gmail.com
bf214029e8 remove peer_csrk from setup 2015-02-27 16:06:07 +00:00
matthias.ringwald@gmail.com
6811cadec6 removed dead code 2015-02-27 16:02:56 +00:00
matthias.ringwald@gmail.com
dc438c837d fix LTK setup using ediv and rand 2015-02-27 15:53:53 +00:00
matthias.ringwald@gmail.com
d19b56e8be use single timer for SM, stop timer on sm_done_for_handle 2015-02-27 14:17:45 +00:00
matthias.ringwald@gmail.com
6189a1c676 Security Manager extended for multiple LE connections 2015-02-27 10:52:33 +00:00
matthias.ringwald@gmail.com
477200f2ef use sm_active_connection as mutex for setup context struct 2015-02-26 21:32:16 +00:00
matthias.ringwald@gmail.com
a911672806 track if sm_setup is used 2015-02-26 16:11:09 +00:00
matthias.ringwald@gmail.com
362481ca52 sort sm_init_setup, fix compile 2015-02-26 15:31:52 +00:00
matthias.ringwald@gmail.com
3143670f4d call sm_init_setup from sm_run() 2015-02-26 15:07:24 +00:00
matthias.ringwald@gmail.com
6731b28f11 extracted sm_init_setup 2015-02-26 15:02:59 +00:00
matthias.ringwald@gmail.com
fe9e7f880a fix regression in r3160 that broke security manager 2015-02-26 14:30:51 +00:00
matthias.ringwald@gmail.com
3e58ab5fb0 finish removal of global sm_connection_t * connection. 2015-02-12 23:04:15 +00:00
matthias.ringwald@gmail.com
befc8792ad pass in sm_connection_t to sm_central_start_lookup, reset CSRK state when done now 2015-02-12 21:36:06 +00:00
matthias.ringwald@gmail.com
ed70b3cf11 pass sm_connection into aes128 and random generation, correct fake sm_connection lookup for API functions 2015-02-12 16:16:42 +00:00
matthias.ringwald@gmail.com
256355c709 pass in sm_connection_t to more functions 2015-02-12 15:37:01 +00:00
matthias.ringwald@gmail.com
eab62d1026 pass in sm_connection_t to timer funtions 2015-02-12 15:27:54 +00:00
matthias.ringwald@gmail.com
95d04d447f move Security Manager sm_connection_t struct into hci.h for integration into hci_connection_t 2015-02-12 14:50:29 +00:00
mila@ringwald.ch
a0c35809ae streamline copyright headers 2015-02-06 16:19:27 +00:00
matthias.ringwald@gmail.com
254e71e6e7 update FSM state before sending an HCI command or L2CAP packet to avoid theoretical race-condition of response arriving before state was updated 2014-10-16 15:02:48 +00:00
matthias.ringwald@gmail.com
b832792a22 use IO_CAPABILITY_NO_INPUT_NO_OUTPUT as default for LE (same as for Classic now) 2014-10-16 13:56:25 +00:00
matthias.ringwald@gmail.com
22f6379b3a set state before notifying user 2014-09-05 14:59:16 +00:00
matthias.ringwald@gmail.com
756ca330b0 don't call sm_run before event handler, avoids warning. don't check for l2cap_can_send_now if no connection 2014-08-28 07:50:13 +00:00
matthias.ringwald
b1bb02c964 move check for acl packets after state machines for CMAC, key generation, random address generation 2014-08-27 12:52:20 +00:00
matthias.ringwald
d37bc63c22 use READ_BT_32 to avoid crash beacuse of non-aligned data access 2014-08-27 12:50:09 +00:00
mila@ringwald.ch
9da54300b6 use log_info instead of printf, remove trailing newline from log calls 2014-08-15 21:26:50 +00:00
matthias.ringwald@gmail.com
97e8ef4a90 fix warnings 2014-08-11 22:09:43 +00:00
matthias.ringwald@gmail.com
d27c46f584 fix compile 2014-08-11 22:00:51 +00:00