Go to the documentation of this file.
62 #define BLE_SEC_AUTH_NONE 0
63 #define BLE_SEC_AUTH_BOND (1 << 0)
64 #define BLE_SEC_AUTH_MITM (1 << 2)
65 #define BLE_SEC_AUTH_SEC_CON (1 << 3)
66 #define BLE_SEC_AUTH_KEY_PRESS_NOTIFY (1 << 4)
67 #define BLE_SEC_AUTH_ALL (BLE_SEC_AUTH_BOND | BLE_SEC_AUTH_MITM | BLE_SEC_AUTH_SEC_CON | BLE_SEC_AUTH_KEY_PRESS_NOTIFY)
73 #define BLE_SEC_KDIST_NONE 0
74 #define BLE_SEC_KDIST_ENCKEY (1 << 0)
75 #define BLE_SEC_KDIST_IDKEY (1 << 1)
76 #define BLE_SEC_KDIST_SIGNKEY (1 << 2)
77 #define BLE_SEC_KDIST_LINKKEY (1 << 3)
78 #define BLE_SEC_KDIST_ALL (BLE_SEC_KDIST_ENCKEY | BLE_SEC_KDIST_IDKEY | BLE_SEC_KDIST_SIGNKEY)
79 #define BLE_BT_SEC_KDIST_ALL (BLE_SEC_KDIST_ALL | BLE_SEC_KDIST_LINKKEY)
247 typedef void (*
oob_info_cb_t)(uint8_t *pub_key_x, uint8_t *pub_key_y, uint8_t *rand, uint8_t *confirm);
@ BLE_SEC_KEY_PRESS_COMPLETED
@ BLE_SEC_BOND_INFO_LOAD_FAILED
SEC number comparison value.
@ BLE_SEC_KEY_PRESS_CLEARED
@ BLE_SEC_KEY_PRESS_STARTED
bool ble_sec_check_bonded_by_addr(ble_gap_bdaddr_t *p_peer_iden_addr)
Check bonded state by peer address.
Key Press Notify event for BLE_SEC_EVT_KEY_PRESS_NTF.
ble_sec_enc_req_type_t req_type
void ble_sec_ccc_sc_oob_pair_init(oob_info_cb_t p_cb)
Init oob info for ccc sc pair.
The struct of broadcast address with broadcast type.
ble_sec_keypress_notify_t notify_type
Key Missing event for BLE_SEC_EVT_KEY_MISSING.
@ BLE_SEC_KEY_PRESS_ENTERED
Link Encrypted event for BLE_SEC_EVT_LINK_ENCRYPTED.
ble_sec_key_missing_reason_t reason
Link Encrypte Request event for BLE_SEC_EVT_LINK_ENC_REQUEST.
ble_sec_tk_type_t tk_type
ble_sec_cfm_enc_data_t data
SEC encryption request data.
File that contains error codes.
@ BLE_SEC_KEY_PRESS_ERASED
ble_sec_evt_enc_req_t enc_req
uint16_t ble_sec_enc_cfm(uint8_t conn_idx, const ble_sec_cfm_enc_t *p_cfm_enc)
Send the encrypt confirm information.
void(* oob_info_cb_t)(uint8_t *pub_key_x, uint8_t *pub_key_y, uint8_t *rand, uint8_t *confirm)
OOB info for CCC SC OOB pair.
@ BLE_SEC_IO_DISPLAY_ONLY
ble_sec_enc_req_type_t req_type
ble_sec_mode_level_t
SEC mode and level.
ble_sec_enc_req_data_t data
ble_sec_enc_req_type_t req_type
ble_sec_tk_type_t
SEC TK type.
@ BLE_SEC_IO_NO_INPUT_NO_OUTPUT
ble_sec_keypress_notify_t
SEC Key Press Notify.
uint16_t ble_sec_enc_start(uint8_t conn_idx)
Start security encryption, this interface is used by both slave and master.
ble_sec_key_missing_reason_t
Key missing reason.
@ BLE_SEC_IO_KEYBOARD_DISPLAY
@ BLE_SEC_LTK_VALID_MASK_ERR
ble_sec_enc_req_data_t data
SEC Confirm encryption data.
uint16_t ble_sec_get_pair_info_by_conn_idx(uint8_t conn_idx, uint8_t *p_iden_addr, uint8_t *p_iden_addr_type, uint8_t *p_irk, uint8_t *p_ltk)
Get the pair info by connection index.
@ BLE_SEC_IO_KEYBOARD_ONLY
ble_sec_evt_enc_ind_t enc_ind
@ BLE_SEC_IO_DISPLAY_YES_NO
uint16_t ble_sec_get_pair_info(uint8_t *p_iden_addr, uint8_t iden_addr_type, uint8_t *p_irk, uint8_t *p_ltk)
Get the pair info by peer identity address.
uint16_t ble_sec_params_set_with_role(ble_sec_param_t *p_sec_param, uint8_t role)
Set security parameter for specific role.
ble_sec_io_cap_t
SEC IO Capability.
@ BLE_SEC_EDIV_RAND_VALUE_ERR
ble_sec_evt_keypress_notify_t keypress_ntf
uint16_t ble_sec_params_set(ble_sec_param_t *p_sec_param)
Set security parameter.
bool ble_sec_check_bonded(uint8_t conn_idx)
Check bonded state by connection index.
BLE Security event structure.
ble_sec_enc_req_type_t
SEC Encryption Request Type.
ble_sec_evt_key_missing_t key_missing
ble_sec_mode_level_t level