diff --git a/features/FEATURE_BLE/ble/generic/GenericSecurityDb.h b/features/FEATURE_BLE/ble/generic/GenericSecurityDb.h index 328f6f55c2..8735a35509 100644 --- a/features/FEATURE_BLE/ble/generic/GenericSecurityDb.h +++ b/features/FEATURE_BLE/ble/generic/GenericSecurityDb.h @@ -25,13 +25,7 @@ namespace ble { namespace generic { -using ble::address_t; -using ble::irk_t; -using ble::csrk_t; -using ble::ltk_t; -using ble::ediv_t; -using ble::rand_t; -using ble::pal::connection_peer_address_type_t; +using pal::connection_peer_address_type_t; /* separate structs for keys to allow db implementation * to minimise memory usage, only holding live connection diff --git a/features/FEATURE_BLE/ble/generic/GenericSecurityManager.h b/features/FEATURE_BLE/ble/generic/GenericSecurityManager.h index fa82bd1083..b34b515661 100644 --- a/features/FEATURE_BLE/ble/generic/GenericSecurityManager.h +++ b/features/FEATURE_BLE/ble/generic/GenericSecurityManager.h @@ -26,27 +26,17 @@ namespace ble { namespace generic { -using ble::pal::advertising_peer_address_type_t; -using ble::pal::AuthenticationMask; -using ble::pal::KeyDistribution; -using ble::pal::connection_peer_address_type_t; - -using ble::address_t; -using ble::irk_t; -using ble::csrk_t; -using ble::ltk_t; -using ble::ediv_t; -using ble::rand_t; -using ble::pairing_failure_t; -using ble::PasskeyAscii; -using ble::passkey_num_t; +using pal::advertising_peer_address_type_t; +using pal::AuthenticationMask; +using pal::KeyDistribution; +using pal::connection_peer_address_type_t; typedef SecurityManager::SecurityIOCapabilities_t SecurityIOCapabilities_t; class GenericSecurityManagerEventHandler; class GenericSecurityManager : public SecurityManager, - public ble::pal::SecurityManagerEventHandler { + public pal::SecurityManagerEventHandler { public: /* implements SecurityManager */ @@ -251,7 +241,6 @@ protected: _legacy_pairing_allowed(true), _master_sends_keys(false), _public_keys_generated(false) { - _app_event_handler = &defaultEventHandler; _pal.set_event_handler(this); } @@ -650,10 +639,6 @@ public: ); /* end implements ble::pal::SecurityManagerEventHandler */ - -private: - /* handler is always a valid pointer */ - ::SecurityManager::SecurityManagerEventHandler *_app_event_handler; }; diff --git a/features/FEATURE_BLE/ble/pal/PalSecurityManager.h b/features/FEATURE_BLE/ble/pal/PalSecurityManager.h index 0021dbd92b..280cb3fa30 100644 --- a/features/FEATURE_BLE/ble/pal/PalSecurityManager.h +++ b/features/FEATURE_BLE/ble/pal/PalSecurityManager.h @@ -348,7 +348,7 @@ public: */ virtual void on_keypress_notification( connection_handle_t connection, - SecurityManager::Keypress_t keypress + Keypress_t keypress ) = 0; /** diff --git a/features/FEATURE_BLE/source/generic/GenericSecurityManager.cpp b/features/FEATURE_BLE/source/generic/GenericSecurityManager.cpp index c67c22bb83..019391280b 100644 --- a/features/FEATURE_BLE/source/generic/GenericSecurityManager.cpp +++ b/features/FEATURE_BLE/source/generic/GenericSecurityManager.cpp @@ -659,7 +659,7 @@ void GenericSecurityManager::generate_secure_connections_oob( confirm ); - _app_event_handler->oobGenerated( + eventHandler->oobGenerated( &entry->local_address, &random, &confirm