From 4aa7158c4b519a43e00fd8122d75e60ac633bb6f Mon Sep 17 00:00:00 2001 From: paul-szczepanek-arm <33840200+paul-szczepanek-arm@users.noreply.github.com> Date: Tue, 23 Jan 2018 10:47:16 +0000 Subject: [PATCH] temporary code for use during verification before we integrate with gap --- .../source/generic/GenericSecurityManager.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/features/FEATURE_BLE/source/generic/GenericSecurityManager.cpp b/features/FEATURE_BLE/source/generic/GenericSecurityManager.cpp index 816f379324..b7ec46ec0b 100644 --- a/features/FEATURE_BLE/source/generic/GenericSecurityManager.cpp +++ b/features/FEATURE_BLE/source/generic/GenericSecurityManager.cpp @@ -117,9 +117,15 @@ public: if (!entry) { return BLE_ERROR_INVALID_PARAM; } + + /* TODO: remove */ + db.get_entry(connection)->master = true; + /* end temp code */ + if (!legacy_pairing_allowed && !default_authentication.get_secure_connections()) { return BLE_ERROR_OPERATION_NOT_PERMITTED; } + AuthenticationMask link_authentication(default_authentication); link_authentication.set_mitm(entry->mitm_requested); @@ -622,10 +628,15 @@ public: KeyDistribution initiator_dist, KeyDistribution responder_dist ) { + /* TODO: remove */ + db.get_entry(connection)->master = false; + /* end temp code */ + /* cancel pairing if secure connection paring is not possible */ if (!legacy_pairing_allowed && !authentication.get_secure_connections()) { canceltPairingRequest(connection); } + set_mitm_performed(connection, false); if (pairing_authorisation_required) {