Mistake on this page?
Report an issue in GitHub or email us
Public Member Functions
SecurityManager::EventHandler Class Reference

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)
 Called when a pairing request is received. 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)
 Triggered by change of encryption state on a link. More...
 
virtual void passkeyDisplay (ble::connection_handle_t connectionHandle, const Passkey_t passkey)
 Triggered during pairing based on IO capabilities of devices. 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 using legacyPairingOobReceived(). 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 through another communication channel. 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...
 

Detailed Description

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.

Constructor & Destructor Documentation

~EventHandler ( )
default

Prevent polymorphic deletion and avoid unnecessary virtual destructor as the SecurityManager class will never delete the instance it contains.

Member Function Documentation

virtual void confirmationRequest ( ble::connection_handle_t  connectionHandle)
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.

Parameters
[in]connectionHandleconnection connectionHandle
See also
init()
setIoCapability()
confirmationEntered()

Definition at line 371 of file SecurityManager.h.

virtual void keypressNotification ( ble::connection_handle_t  connectionHandle,
ble::Keypress_t  keypress 
)
virtual

Notify the application that a key was pressed by the peer during passkey entry.

This is only informative to provide feedback to the user. These events will only be triggered if you call setKeypressNotification()

Parameters
[in]connectionHandleconnection connectionHandle
[in]keypresstype of keypress event
See also
setKeypressNotification()

Definition at line 401 of file SecurityManager.h.

virtual void legacyPairingOobGenerated ( const ble::address_t address,
const ble::oob_tk_t temporaryKey 
)
virtual

Indicate that the application needs to send legacy pairing OOB data to the peer through another communication channel.

Parameters
[in]addressaddress that will be used in the pairing
[in]temporaryKeytemporary key to be used in legacy pairing

Definition at line 426 of file SecurityManager.h.

virtual void legacyPairingOobRequest ( ble::connection_handle_t  connectionHandle)
virtual

Indicate to the application it needs to return legacy pairing OOB to the stack using legacyPairingOobReceived().

Parameters
[in]connectionHandleconnection connectionHandle
See also
legacyPairingOobReceived()

Definition at line 415 of file SecurityManager.h.

virtual void linkEncryptionResult ( ble::connection_handle_t  connectionHandle,
ble::link_encryption_t  result 
)
virtual

Triggered by change of encryption state on a link.

This change can be initiated locally or by the remote peer.

Parameters
[in]connectionHandleconnection connectionHandle
[in]resultencryption state of the link
See also
requestAuthentication()
setLinkEncryption()

Definition at line 330 of file SecurityManager.h.

virtual void oobGenerated ( const ble::address_t address,
const ble::oob_lesc_value_t random,
const ble::oob_confirm_t confirm 
)
virtual

Indicate that the application needs to send secure connections OOB data to the peer.

Parameters
[in]addressaddress that will be used in the pairing
[in]randomrandom number used to generate the confirmation
[in]confirmconfirmation value to be use for authentication in secure connections pairing
See also
generateOOB()

Definition at line 442 of file SecurityManager.h.

virtual void pairingRequest ( ble::connection_handle_t  connectionHandle)
virtual

Called when a pairing request is received.

Application should respond by calling the appropriate function: acceptPairingRequest() or cancelPairingRequest(). This event will only trigger if setPairingRequestAuthorisation() was called with true. Otherwise the stack will handle the requests.

Parameters
[in]connectionHandleconnection connectionHandle
See also
requestPairing()
requestAuthentication()
setLinkEncryption()
setPairingRequestAuthorisation()

Definition at line 264 of file SecurityManager.h.

virtual void pairingResult ( ble::connection_handle_t  connectionHandle,
SecurityCompletionStatus_t  result 
)
virtual

Indicate to the application that pairing has completed.

Parameters
[in]connectionHandleconnection connectionHandle
[in]resultresult of the pairing indicating success or reason for failure
See also
acceptPairingRequest()
requestPairing()

Definition at line 278 of file SecurityManager.h.

virtual void passkeyDisplay ( ble::connection_handle_t  connectionHandle,
const Passkey_t  passkey 
)
virtual

Triggered during pairing based on IO capabilities of devices.

Display the given passkey on the local device for user verification.

Parameters
[in]connectionHandleconnection connectionHandle
[in]passkey6 digit passkey to be displayed
See also
init()
setIoCapability()

Definition at line 352 of file SecurityManager.h.

virtual void passkeyRequest ( ble::connection_handle_t  connectionHandle)
virtual

Indicate to the application that a passkey is required.

The application should proceed by supplying the passkey through the passkeyEntered function.

Parameters
[in]connectionHandleconnection connectionHandle
See also
init()
setIoCapability()
passkeyEntered()

Definition at line 386 of file SecurityManager.h.

virtual void peerIdentity ( ble::connection_handle_t  connectionHandle,
const address_t peer_address,
bool  address_is_public 
)
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.

Parameters
[in]connectionHandleConnection handle.
[in]peer_addressPeer address that has been saved by the security database, NULL it not found.
[in]address_is_publicAddress type, true if public. Invalid if peer_address NULL.
See also
getPeerIdentity()

Definition at line 293 of file SecurityManager.h.

virtual void signingKey ( ble::connection_handle_t  connectionHandle,
const ble::csrk_t csrk,
bool  authenticated 
)
virtual

Deliver the signing key to the application.

Parameters
[in]connectionHandleconnection connectionHandle
[in]csrksigning key, pointer only valid during call
[in]authenticatedindicates if the signing key is authenticated
See also
getSigningKey()

Definition at line 464 of file SecurityManager.h.

virtual void whitelistFromBondTable ( ::ble::whitelist_t whitelist)
virtual

Deliver the requested whitelist to the application.

Parameters
[in]whitelistpointer to the whitelist filled with entries based on bonding information
See also
generateWhitelistFromBondTable()

Definition at line 312 of file SecurityManager.h.

Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.