mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-04-01 04:20:33 +00:00
prototype gap security level API
This commit is contained in:
parent
afd4e962dc
commit
cb230b9da5
28
src/gap.h
28
src/gap.h
@ -40,6 +40,34 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef enum {
|
||||
|
||||
// MITM protection not required
|
||||
// No encryption required
|
||||
// No user interaction required
|
||||
LEVEL_0 = 0,
|
||||
|
||||
// MITM protection not required
|
||||
// No encryption required
|
||||
// Minimal user interaction desired
|
||||
LEVEL_1,
|
||||
|
||||
// MITM protection not required
|
||||
// Encryption required
|
||||
LEVEL_2,
|
||||
|
||||
// MITM protection required
|
||||
// Encryption required
|
||||
// User interaction acceptable
|
||||
LEVEL_3,
|
||||
|
||||
// MITM protection required
|
||||
// Encryption required
|
||||
// 128-bit equivalent strength for link and encryption keys required
|
||||
// User interaction acceptable
|
||||
LEVEL_4,
|
||||
} gap_security_level_t;
|
||||
|
||||
/**
|
||||
* @bbrief enable/disable bonding. default is enabled
|
||||
* @praram enabled
|
||||
|
14
src/hci.c
14
src/hci.c
@ -1691,3 +1691,17 @@ void hci_emit_discoverable_enabled(uint8_t enabled){
|
||||
void gap_set_bondable_mode(int enable){
|
||||
hci_stack.bondable = enable ? 1 : 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief get current security level
|
||||
*/
|
||||
gap_security_level_t gap_security_level(hci_con_handle_t con_handle){
|
||||
return LEVEL_0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief request connection to device to
|
||||
* @result GAP_AUTHENTICATION_RESULT
|
||||
*/
|
||||
void gap_request_security_level(hci_con_handle_t con_handle, gap_security_level_t level){
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user