BLE - Conditionally expose SecurityManager::enableSigning

pull/9790/head
Vincent Coubard 2019-02-28 13:27:16 +00:00
parent eeb14c5ce6
commit ca44ce3cd8
2 changed files with 4 additions and 0 deletions

View File

@ -644,6 +644,7 @@ public:
*/ */
ble_error_t setKeypressNotification(bool enabled = true); ble_error_t setKeypressNotification(bool enabled = true);
#if BLE_FEATURE_SIGNING
/** /**
* Request generation and exchange of signing keys so that packet signing can be utilised * Request generation and exchange of signing keys so that packet signing can be utilised
* on this connection. * on this connection.
@ -655,6 +656,7 @@ public:
* @return BLE_ERROR_NONE or appropriate error code indicating the failure reason. * @return BLE_ERROR_NONE or appropriate error code indicating the failure reason.
*/ */
ble_error_t enableSigning(ble::connection_handle_t connectionHandle, bool enabled = true); ble_error_t enableSigning(ble::connection_handle_t connectionHandle, bool enabled = true);
#endif // BLE_FEATURE_SIGNING
/** /**
* Give a hint to the stack that the master/slave role might change in the future. * Give a hint to the stack that the master/slave role might change in the future.

View File

@ -137,6 +137,7 @@ ble_error_t SecurityManager<Impl>::setKeypressNotification(bool enabled) {
return impl()->setKeypressNotification_(enabled); return impl()->setKeypressNotification_(enabled);
} }
#if BLE_FEATURE_SIGNING
template <class Impl> template <class Impl>
ble_error_t SecurityManager<Impl>::enableSigning( ble_error_t SecurityManager<Impl>::enableSigning(
ble::connection_handle_t connectionHandle, ble::connection_handle_t connectionHandle,
@ -144,6 +145,7 @@ ble_error_t SecurityManager<Impl>::enableSigning(
) { ) {
return impl()->enableSigning_(connectionHandle, enabled); return impl()->enableSigning_(connectionHandle, enabled);
} }
#endif // BLE_FEATURE_SIGNING
template <class Impl> template <class Impl>
ble_error_t SecurityManager<Impl>::setHintFutureRoleReversal(bool enable) { ble_error_t SecurityManager<Impl>::setHintFutureRoleReversal(bool enable) {