Trait nrf_softdevice::ble::security::SecurityHandler   
source · pub trait SecurityHandler {
    // Provided methods
    fn io_capabilities(&self) -> IoCapabilities { ... }
    fn can_recv_out_of_band(&self, _conn: &Connection) -> bool { ... }
    fn can_bond(&self, _conn: &Connection) -> bool { ... }
    fn display_passkey(&self, _passkey: &[u8; 6]) { ... }
    fn enter_passkey(&self, _reply: PasskeyReply) { ... }
    fn recv_out_of_band(&self, _reply: OutOfBandReply) { ... }
    fn on_security_update(&self, _conn: &Connection, _security_mode: SecurityMode) { ... }
    fn on_bonded(
        &self,
        _conn: &Connection,
        _master_id: MasterId,
        _key: EncryptionInfo,
        _peer_id: IdentityKey
    ) { ... }
    fn get_key(
        &self,
        _conn: &Connection,
        _master_id: MasterId
    ) -> Option<EncryptionInfo> { ... }
    fn save_sys_attrs(&self, _conn: &Connection) { ... }
    fn load_sys_attrs(&self, conn: &Connection) { ... }
}Provided Methods§
fn io_capabilities(&self) -> IoCapabilities
sourcefn can_recv_out_of_band(&self, _conn: &Connection) -> bool
 
fn can_recv_out_of_band(&self, _conn: &Connection) -> bool
Returns true if the device can receive out-of-band authentication data.
sourcefn can_bond(&self, _conn: &Connection) -> bool
 
fn can_bond(&self, _conn: &Connection) -> bool
Returns true if the device can save bonding keys for _conn
sourcefn display_passkey(&self, _passkey: &[u8; 6])
 
fn display_passkey(&self, _passkey: &[u8; 6])
Display passkey to the user for confirmation on the remote device.
Must be implemented if io_capabilities() is one of DisplayOnly, DisplayYesNo, or KeyboardDisplay.
sourcefn enter_passkey(&self, _reply: PasskeyReply)
 
fn enter_passkey(&self, _reply: PasskeyReply)
Allow the user to enter a passkey displayed on the remote device.
Must be implemented if io_capabilities() is one of KeyboardOnly or KeyboardDisplay.
sourcefn recv_out_of_band(&self, _reply: OutOfBandReply)
 
fn recv_out_of_band(&self, _reply: OutOfBandReply)
Receive out-of-band authentication data.
Must be implemented if can_recv_out_of_band() ever returns true.
sourcefn on_security_update(&self, _conn: &Connection, _security_mode: SecurityMode)
 
fn on_security_update(&self, _conn: &Connection, _security_mode: SecurityMode)
Called when the SecurityMode of a Connection has changed.
sourcefn on_bonded(
    &self,
    _conn: &Connection,
    _master_id: MasterId,
    _key: EncryptionInfo,
    _peer_id: IdentityKey
)
 
fn on_bonded(
    &self,
    _conn: &Connection,
    _master_id: MasterId,
    _key: EncryptionInfo,
    _peer_id: IdentityKey
)
The connection has been bonded and its encryption keys should now be stored.
Must be implemented if can_bond ever returns true.
sourcefn get_key(
    &self,
    _conn: &Connection,
    _master_id: MasterId
) -> Option<EncryptionInfo>
 
fn get_key(
    &self,
    _conn: &Connection,
    _master_id: MasterId
) -> Option<EncryptionInfo>
Search the store for a known peer identified by master_id and return its LTK.
sourcefn save_sys_attrs(&self, _conn: &Connection)
 
fn save_sys_attrs(&self, _conn: &Connection)
Store the GATTS system attributes for conn if a bond exists
sourcefn load_sys_attrs(&self, conn: &Connection)
 
fn load_sys_attrs(&self, conn: &Connection)
Load the GATTS system attributes for the bond associated with conn
If no system attributes have been stored for this peer, you should call
set_sys_attrs with a sys_attrs parameter of None.