The stack will use these functions to signal events to the application, subclass to override handlers. More...
#include <SecurityManager.h>
Public Member Functions | |
virtual void | pairingRequest (ble::connection_handle_t connectionHandle) |
Request application to accept or reject pairing. More... | |
virtual void | pairingResult (ble::connection_handle_t connectionHandle, SecurityCompletionStatus_t result) |
Indicate to the application that pairing has completed. More... | |
virtual void | peerIdentity (ble::connection_handle_t connectionHandle, const address_t *peer_address, bool address_is_public) |
Indicate that a peer address has been saved by the security manager or if we are bonded to the peer the identity has been retrieved from the database on connection. More... | |
virtual void | whitelistFromBondTable (::ble::whitelist_t *whitelist) |
Deliver the requested whitelist to the application. More... | |
virtual void | linkEncryptionResult (ble::connection_handle_t connectionHandle, ble::link_encryption_t result) |
Inform the device of the encryption state of a given link. More... | |
virtual void | passkeyDisplay (ble::connection_handle_t connectionHandle, const Passkey_t passkey) |
Display the given passkey on the local device. More... | |
virtual void | confirmationRequest (ble::connection_handle_t connectionHandle) |
Indicate to the application that a confirmation is required. More... | |
virtual void | passkeyRequest (ble::connection_handle_t connectionHandle) |
Indicate to the application that a passkey is required. More... | |
virtual void | keypressNotification (ble::connection_handle_t connectionHandle, ble::Keypress_t keypress) |
Notify the application that a key was pressed by the peer during passkey entry. More... | |
virtual void | legacyPairingOobRequest (ble::connection_handle_t connectionHandle) |
Indicate to the application it needs to return legacy pairing OOB to the stack. More... | |
virtual void | legacyPairingOobGenerated (const ble::address_t *address, const ble::oob_tk_t *temporaryKey) |
Indicate that the application needs to send legacy pairing OOB data to the peer. More... | |
virtual void | oobGenerated (const ble::address_t *address, const ble::oob_lesc_value_t *random, const ble::oob_confirm_t *confirm) |
Indicate that the application needs to send secure connections OOB data to the peer. More... | |
virtual void | signingKey (ble::connection_handle_t connectionHandle, const ble::csrk_t *csrk, bool authenticated) |
Deliver the signing key to the application. More... | |
~EventHandler ()=default | |
Prevent polymorphic deletion and avoid unnecessary virtual destructor as the SecurityManager class will never delete the instance it contains. More... | |
The stack will use these functions to signal events to the application, subclass to override handlers.
Use SecurityManager::setSecurityManagerEventHandler to set the interface implementation to be used.
Definition at line 244 of file SecurityManager.h.
|
default |
Prevent polymorphic deletion and avoid unnecessary virtual destructor as the SecurityManager class will never delete the instance it contains.
|
virtual |
Indicate to the application that a confirmation is required.
This is used when the device does not have a keyboard but has a yes/no button. The device displays numbers on its display in response to passkeyDisplay and the user checks if they are the same on both devices. The application should proceed by supplying the confirmation using the confirmationEntered function.
[in] | connectionHandle | connection connectionHandle |
Definition at line 345 of file SecurityManager.h.
|
virtual |
Notify the application that a key was pressed by the peer during passkey entry.
[in] | connectionHandle | connection connectionHandle |
[in] | keypress | type of keypress event |
Definition at line 367 of file SecurityManager.h.
|
virtual |
Indicate that the application needs to send legacy pairing OOB data to the peer.
[in] | address | address that will be used in the pairing |
[in] | temporaryKey | temporary key to be used in legacy pairing |
Definition at line 388 of file SecurityManager.h.
|
virtual |
Indicate to the application it needs to return legacy pairing OOB to the stack.
[in] | connectionHandle | connection connectionHandle |
Definition at line 378 of file SecurityManager.h.
|
virtual |
Inform the device of the encryption state of a given link.
[in] | connectionHandle | connection connectionHandle |
[in] | result | encryption state of the link |
Definition at line 312 of file SecurityManager.h.
|
virtual |
Indicate that the application needs to send secure connections OOB data to the peer.
[in] | address | address that will be used in the pairing |
[in] | random | random number used to generate the confirmation |
[in] | confirm | confirmation value to be use for authentication in secure connections pairing |
Definition at line 402 of file SecurityManager.h.
|
virtual |
Request application to accept or reject pairing.
Application should respond by calling the appropriate function: acceptPairingRequest or cancelPairingRequest
[in] | connectionHandle | connection connectionHandle |
Definition at line 257 of file SecurityManager.h.
|
virtual |
Indicate to the application that pairing has completed.
[in] | connectionHandle | connection connectionHandle |
[in] | result | result of the pairing indicating success or reason for failure |
Definition at line 268 of file SecurityManager.h.
|
virtual |
Display the given passkey on the local device.
[in] | connectionHandle | connection connectionHandle |
[in] | passkey | 6 digit passkey to be displayed |
Definition at line 330 of file SecurityManager.h.
|
virtual |
Indicate to the application that a passkey is required.
The application should proceed by supplying the passkey through the passkeyEntered function.
[in] | connectionHandle | connection connectionHandle |
Definition at line 356 of file SecurityManager.h.
|
virtual |
Indicate that a peer address has been saved by the security manager or if we are bonded to the peer the identity has been retrieved from the database on connection.
[in] | connectionHandle | Connection handle. |
[in] | peer_address | Peer address that has been saved by the security database, NULL it not found. |
[in] | address_is_public | Address type, true if public. Invalid if peer_address NULL. |
Definition at line 281 of file SecurityManager.h.
|
virtual |
Deliver the signing key to the application.
[in] | connectionHandle | connection connectionHandle |
[in] | csrk | signing key, pointer only valid during call |
[in] | authenticated | indicates if the signing key is authenticated |
Definition at line 422 of file SecurityManager.h.
|
virtual |
Deliver the requested whitelist to the application.
[in] | whitelist | pointer to the whitelist filled with entries based on bonding information |
Definition at line 298 of file SecurityManager.h.