From 0a54ca39d0c91befe1e884749b98a0708db2a813 Mon Sep 17 00:00:00 2001 From: paul-szczepanek-arm <33840200+paul-szczepanek-arm@users.noreply.github.com> Date: Thu, 8 Feb 2018 18:41:35 +0000 Subject: [PATCH] move pairing under its own heading to match other parts --- .../FEATURE_BLE/ble/pal/PalSecurityManager.h | 107 +++++++++--------- 1 file changed, 55 insertions(+), 52 deletions(-) diff --git a/features/FEATURE_BLE/ble/pal/PalSecurityManager.h b/features/FEATURE_BLE/ble/pal/PalSecurityManager.h index 77b2aa4903..04e28352b8 100644 --- a/features/FEATURE_BLE/ble/pal/PalSecurityManager.h +++ b/features/FEATURE_BLE/ble/pal/PalSecurityManager.h @@ -590,7 +590,6 @@ public: const irk_t peer_irk ) = 0; - /** * Add a device definition from the resolving list of the LE subsystem. * @@ -612,6 +611,61 @@ public: */ virtual ble_error_t clear_resolving_list() = 0; + //////////////////////////////////////////////////////////////////////////// + // Pairing + // + + /** + * Send a pairing request to a slave. + * + * @param[in] connection connection handle + * @param[in] oob_data_flag is oob data present + * @param[in] authentication_requirements authentication requirements + * @param[in] initiator_dist key distribution + * @param[in] responder_dist key distribution + * @see BLUETOOTH SPECIFICATION Version 5.0 | Vol 3, Part H - 3.5.1 + * @retval BLE_ERROR_NONE On success, else an error code indicating reason for failure + */ + virtual ble_error_t send_pairing_request( + connection_handle_t connection, + bool oob_data_flag, + AuthenticationMask authentication_requirements, + KeyDistribution initiator_dist, + KeyDistribution responder_dist + ); + + /** + * Send a pairing response to a master. + * + * @see BLUETOOTH SPECIFICATION Version 5.0 | Vol 3, Part H - 3.5.2* + * @param[in] connection connection handle + * @param[in] oob_data_flag is oob data present + * @param[in] authentication_requirements authentication requirements + * @param[in] initiator_dist key distribution + * @param[in] responder_dist key distribution + * @retval BLE_ERROR_NONE On success, else an error code indicating reason for failure + */ + virtual ble_error_t send_pairing_response( + connection_handle_t connection, + bool oob_data_flag, + AuthenticationMask authentication_requirements, + KeyDistribution initiator_dist, + KeyDistribution responder_dist + ) = 0; + + /** + * Cancel an ongoing pairing. + * + * @param[in] connection connection handle + * @param[in] reason pairing failure error + * @see BLUETOOTH SPECIFICATION Version 5.0 | Vol 3, Part H - 3.5.5 + * @retval BLE_ERROR_NONE On success, else an error code indicating reason for failure + */ + virtual ble_error_t cancel_pairing( + connection_handle_t connection, + pairing_failure_t reason + ) = 0; + //////////////////////////////////////////////////////////////////////////// // Feature support // @@ -804,57 +858,6 @@ public: // Authentication // - /** - * Send a pairing request to a slave. - * - * @param[in] connection connection handle - * @param[in] oob_data_flag is oob data present - * @param[in] authentication_requirements authentication requirements - * @param[in] initiator_dist key distribution - * @param[in] responder_dist key distribution - * @see BLUETOOTH SPECIFICATION Version 5.0 | Vol 3, Part H - 3.5.1 - * @retval BLE_ERROR_NONE On success, else an error code indicating reason for failure - */ - virtual ble_error_t send_pairing_request( - connection_handle_t connection, - bool oob_data_flag, - AuthenticationMask authentication_requirements, - KeyDistribution initiator_dist, - KeyDistribution responder_dist - ); - - /** - * Send a pairing response to a master. - * - * @see BLUETOOTH SPECIFICATION Version 5.0 | Vol 3, Part H - 3.5.2* - * @param[in] connection connection handle - * @param[in] oob_data_flag is oob data present - * @param[in] authentication_requirements authentication requirements - * @param[in] initiator_dist key distribution - * @param[in] responder_dist key distribution - * @retval BLE_ERROR_NONE On success, else an error code indicating reason for failure - */ - virtual ble_error_t send_pairing_response( - connection_handle_t connection, - bool oob_data_flag, - AuthenticationMask authentication_requirements, - KeyDistribution initiator_dist, - KeyDistribution responder_dist - ) = 0; - - /** - * Cancel an ongoing pairing. - * - * @param[in] connection connection handle - * @param[in] reason pairing failure error - * @see BLUETOOTH SPECIFICATION Version 5.0 | Vol 3, Part H - 3.5.5 - * @retval BLE_ERROR_NONE On success, else an error code indicating reason for failure - */ - virtual ble_error_t cancel_pairing( - connection_handle_t connection, - pairing_failure_t reason - ) = 0; - /** * Request authentication of the connection. This will trigger an appropriate reaction, * which might include encryption or pairing/re-pairing.