Dependents:   sensomed

Committer:
switches
Date:
Tue Nov 08 18:27:11 2016 +0000
Revision:
0:0e018d759a2a
Initial commit

Who changed what in which revision?

UserRevisionLine numberNew contents of line
switches 0:0e018d759a2a 1 /* mbed Microcontroller Library
switches 0:0e018d759a2a 2 * Copyright (c) 2006-2015 ARM Limited
switches 0:0e018d759a2a 3 *
switches 0:0e018d759a2a 4 * Licensed under the Apache License, Version 2.0 (the "License");
switches 0:0e018d759a2a 5 * you may not use this file except in compliance with the License.
switches 0:0e018d759a2a 6 * You may obtain a copy of the License at
switches 0:0e018d759a2a 7 *
switches 0:0e018d759a2a 8 * http://www.apache.org/licenses/LICENSE-2.0
switches 0:0e018d759a2a 9 *
switches 0:0e018d759a2a 10 * Unless required by applicable law or agreed to in writing, software
switches 0:0e018d759a2a 11 * distributed under the License is distributed on an "AS IS" BASIS,
switches 0:0e018d759a2a 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
switches 0:0e018d759a2a 13 * See the License for the specific language governing permissions and
switches 0:0e018d759a2a 14 * limitations under the License.
switches 0:0e018d759a2a 15 */
switches 0:0e018d759a2a 16
switches 0:0e018d759a2a 17 #ifndef __SECURITY_MANAGER_H__
switches 0:0e018d759a2a 18 #define __SECURITY_MANAGER_H__
switches 0:0e018d759a2a 19
switches 0:0e018d759a2a 20 #include <stdint.h>
switches 0:0e018d759a2a 21
switches 0:0e018d759a2a 22 #include "Gap.h"
switches 0:0e018d759a2a 23 #include "CallChainOfFunctionPointersWithContext.h"
switches 0:0e018d759a2a 24
switches 0:0e018d759a2a 25 class SecurityManager {
switches 0:0e018d759a2a 26 public:
switches 0:0e018d759a2a 27 enum SecurityMode_t {
switches 0:0e018d759a2a 28 SECURITY_MODE_NO_ACCESS,
switches 0:0e018d759a2a 29 SECURITY_MODE_ENCRYPTION_OPEN_LINK, /**< Require no protection, open link. */
switches 0:0e018d759a2a 30 SECURITY_MODE_ENCRYPTION_NO_MITM, /**< Require encryption, but no MITM protection. */
switches 0:0e018d759a2a 31 SECURITY_MODE_ENCRYPTION_WITH_MITM, /**< Require encryption and MITM protection. */
switches 0:0e018d759a2a 32 SECURITY_MODE_SIGNED_NO_MITM, /**< Require signing or encryption, but no MITM protection. */
switches 0:0e018d759a2a 33 SECURITY_MODE_SIGNED_WITH_MITM, /**< Require signing or encryption, and MITM protection. */
switches 0:0e018d759a2a 34 };
switches 0:0e018d759a2a 35
switches 0:0e018d759a2a 36 /**
switches 0:0e018d759a2a 37 * @brief Defines possible security status or states.
switches 0:0e018d759a2a 38 *
switches 0:0e018d759a2a 39 * @details Defines possible security status or states of a link when requested by getLinkSecurity().
switches 0:0e018d759a2a 40 */
switches 0:0e018d759a2a 41 enum LinkSecurityStatus_t {
switches 0:0e018d759a2a 42 NOT_ENCRYPTED, /**< The link is not secured. */
switches 0:0e018d759a2a 43 ENCRYPTION_IN_PROGRESS, /**< Link security is being established.*/
switches 0:0e018d759a2a 44 ENCRYPTED /**< The link is secure.*/
switches 0:0e018d759a2a 45 };
switches 0:0e018d759a2a 46
switches 0:0e018d759a2a 47 enum SecurityIOCapabilities_t {
switches 0:0e018d759a2a 48 IO_CAPS_DISPLAY_ONLY = 0x00, /**< Display only. */
switches 0:0e018d759a2a 49 IO_CAPS_DISPLAY_YESNO = 0x01, /**< Display and yes/no entry. */
switches 0:0e018d759a2a 50 IO_CAPS_KEYBOARD_ONLY = 0x02, /**< Keyboard only. */
switches 0:0e018d759a2a 51 IO_CAPS_NONE = 0x03, /**< No I/O capabilities. */
switches 0:0e018d759a2a 52 IO_CAPS_KEYBOARD_DISPLAY = 0x04, /**< Keyboard and display. */
switches 0:0e018d759a2a 53 };
switches 0:0e018d759a2a 54
switches 0:0e018d759a2a 55 enum SecurityCompletionStatus_t {
switches 0:0e018d759a2a 56 SEC_STATUS_SUCCESS = 0x00, /**< Procedure completed with success. */
switches 0:0e018d759a2a 57 SEC_STATUS_TIMEOUT = 0x01, /**< Procedure timed out. */
switches 0:0e018d759a2a 58 SEC_STATUS_PDU_INVALID = 0x02, /**< Invalid PDU received. */
switches 0:0e018d759a2a 59 SEC_STATUS_PASSKEY_ENTRY_FAILED = 0x81, /**< Passkey entry failed (user canceled or other). */
switches 0:0e018d759a2a 60 SEC_STATUS_OOB_NOT_AVAILABLE = 0x82, /**< Out of Band Key not available. */
switches 0:0e018d759a2a 61 SEC_STATUS_AUTH_REQ = 0x83, /**< Authentication requirements not met. */
switches 0:0e018d759a2a 62 SEC_STATUS_CONFIRM_VALUE = 0x84, /**< Confirm value failed. */
switches 0:0e018d759a2a 63 SEC_STATUS_PAIRING_NOT_SUPP = 0x85, /**< Pairing not supported. */
switches 0:0e018d759a2a 64 SEC_STATUS_ENC_KEY_SIZE = 0x86, /**< Encryption key size. */
switches 0:0e018d759a2a 65 SEC_STATUS_SMP_CMD_UNSUPPORTED = 0x87, /**< Unsupported SMP command. */
switches 0:0e018d759a2a 66 SEC_STATUS_UNSPECIFIED = 0x88, /**< Unspecified reason. */
switches 0:0e018d759a2a 67 SEC_STATUS_REPEATED_ATTEMPTS = 0x89, /**< Too little time elapsed since last attempt. */
switches 0:0e018d759a2a 68 SEC_STATUS_INVALID_PARAMS = 0x8A, /**< Invalid parameters. */
switches 0:0e018d759a2a 69 };
switches 0:0e018d759a2a 70
switches 0:0e018d759a2a 71 /**
switches 0:0e018d759a2a 72 * Declaration of type containing a passkey to be used during pairing. This
switches 0:0e018d759a2a 73 * is passed into initializeSecurity() to specify a pre-programmed passkey
switches 0:0e018d759a2a 74 * for authentication instead of generating a random one.
switches 0:0e018d759a2a 75 */
switches 0:0e018d759a2a 76 static const unsigned PASSKEY_LEN = 6;
switches 0:0e018d759a2a 77 typedef uint8_t Passkey_t[PASSKEY_LEN]; /**< 6-digit passkey in ASCII ('0'-'9' digits only). */
switches 0:0e018d759a2a 78
switches 0:0e018d759a2a 79 public:
switches 0:0e018d759a2a 80 typedef void (*HandleSpecificEvent_t)(Gap::Handle_t handle);
switches 0:0e018d759a2a 81 typedef void (*SecuritySetupInitiatedCallback_t)(Gap::Handle_t, bool allowBonding, bool requireMITM, SecurityIOCapabilities_t iocaps);
switches 0:0e018d759a2a 82 typedef void (*SecuritySetupCompletedCallback_t)(Gap::Handle_t, SecurityCompletionStatus_t status);
switches 0:0e018d759a2a 83 typedef void (*LinkSecuredCallback_t)(Gap::Handle_t handle, SecurityMode_t securityMode);
switches 0:0e018d759a2a 84 typedef void (*PasskeyDisplayCallback_t)(Gap::Handle_t handle, const Passkey_t passkey);
switches 0:0e018d759a2a 85
switches 0:0e018d759a2a 86 typedef FunctionPointerWithContext<const SecurityManager *> SecurityManagerShutdownCallback_t;
switches 0:0e018d759a2a 87 typedef CallChainOfFunctionPointersWithContext<const SecurityManager *> SecurityManagerShutdownCallbackChain_t;
switches 0:0e018d759a2a 88
switches 0:0e018d759a2a 89 /*
switches 0:0e018d759a2a 90 * The following functions are meant to be overridden in the platform-specific sub-class.
switches 0:0e018d759a2a 91 */
switches 0:0e018d759a2a 92 public:
switches 0:0e018d759a2a 93 /**
switches 0:0e018d759a2a 94 * Enable the BLE stack's Security Manager. The Security Manager implements
switches 0:0e018d759a2a 95 * the actual cryptographic algorithms and protocol exchanges that allow two
switches 0:0e018d759a2a 96 * devices to securely exchange data and privately detect each other.
switches 0:0e018d759a2a 97 * Calling this API is a prerequisite for encryption and pairing (bonding).
switches 0:0e018d759a2a 98 *
switches 0:0e018d759a2a 99 * @param[in] enableBonding Allow for bonding.
switches 0:0e018d759a2a 100 * @param[in] requireMITM Require protection for man-in-the-middle attacks.
switches 0:0e018d759a2a 101 * @param[in] iocaps To specify the I/O capabilities of this peripheral,
switches 0:0e018d759a2a 102 * such as availability of a display or keyboard, to
switches 0:0e018d759a2a 103 * support out-of-band exchanges of security data.
switches 0:0e018d759a2a 104 * @param[in] passkey To specify a static passkey.
switches 0:0e018d759a2a 105 *
switches 0:0e018d759a2a 106 * @return BLE_ERROR_NONE on success.
switches 0:0e018d759a2a 107 */
switches 0:0e018d759a2a 108 virtual ble_error_t init(bool enableBonding = true,
switches 0:0e018d759a2a 109 bool requireMITM = true,
switches 0:0e018d759a2a 110 SecurityIOCapabilities_t iocaps = IO_CAPS_NONE,
switches 0:0e018d759a2a 111 const Passkey_t passkey = NULL) {
switches 0:0e018d759a2a 112 /* Avoid compiler warnings about unused variables. */
switches 0:0e018d759a2a 113 (void)enableBonding;
switches 0:0e018d759a2a 114 (void)requireMITM;
switches 0:0e018d759a2a 115 (void)iocaps;
switches 0:0e018d759a2a 116 (void)passkey;
switches 0:0e018d759a2a 117
switches 0:0e018d759a2a 118 return BLE_ERROR_NOT_IMPLEMENTED; /* Requesting action from porters: override this API if security is supported. */
switches 0:0e018d759a2a 119 }
switches 0:0e018d759a2a 120
switches 0:0e018d759a2a 121 /**
switches 0:0e018d759a2a 122 * Get the security status of a connection.
switches 0:0e018d759a2a 123 *
switches 0:0e018d759a2a 124 * @param[in] connectionHandle Handle to identify the connection.
switches 0:0e018d759a2a 125 * @param[out] securityStatusP Security status.
switches 0:0e018d759a2a 126 *
switches 0:0e018d759a2a 127 * @return BLE_ERROR_NONE or appropriate error code indicating the failure reason.
switches 0:0e018d759a2a 128 */
switches 0:0e018d759a2a 129 virtual ble_error_t getLinkSecurity(Gap::Handle_t connectionHandle, LinkSecurityStatus_t *securityStatusP) {
switches 0:0e018d759a2a 130 /* Avoid compiler warnings about unused variables. */
switches 0:0e018d759a2a 131 (void)connectionHandle;
switches 0:0e018d759a2a 132 (void)securityStatusP;
switches 0:0e018d759a2a 133
switches 0:0e018d759a2a 134 return BLE_ERROR_NOT_IMPLEMENTED; /* Requesting action from porters: override this API if security is supported. */
switches 0:0e018d759a2a 135 }
switches 0:0e018d759a2a 136
switches 0:0e018d759a2a 137 /**
switches 0:0e018d759a2a 138 * Set the security mode on a connection. Useful for elevating the security mode
switches 0:0e018d759a2a 139 * once certain conditions are met, e.g., a particular service is found.
switches 0:0e018d759a2a 140 *
switches 0:0e018d759a2a 141 * @param[in] connectionHandle Handle to identify the connection.
switches 0:0e018d759a2a 142 * @param[in] securityMode Requested security mode.
switches 0:0e018d759a2a 143 *
switches 0:0e018d759a2a 144 * @return BLE_ERROR_NONE or appropriate error code indicating the failure reason.
switches 0:0e018d759a2a 145 */
switches 0:0e018d759a2a 146 virtual ble_error_t setLinkSecurity(Gap::Handle_t connectionHandle, SecurityMode_t securityMode) {
switches 0:0e018d759a2a 147 /* Avoid compiler warnings about unused variables. */
switches 0:0e018d759a2a 148 (void)connectionHandle;
switches 0:0e018d759a2a 149 (void)securityMode;
switches 0:0e018d759a2a 150
switches 0:0e018d759a2a 151 return BLE_ERROR_NOT_IMPLEMENTED;
switches 0:0e018d759a2a 152 }
switches 0:0e018d759a2a 153
switches 0:0e018d759a2a 154 /**
switches 0:0e018d759a2a 155 * Delete all peer device context and all related bonding information from
switches 0:0e018d759a2a 156 * the database within the security manager.
switches 0:0e018d759a2a 157 *
switches 0:0e018d759a2a 158 * @retval BLE_ERROR_NONE On success, else an error code indicating reason for failure.
switches 0:0e018d759a2a 159 * @retval BLE_ERROR_INVALID_STATE If the API is called without module initialization or
switches 0:0e018d759a2a 160 * application registration.
switches 0:0e018d759a2a 161 */
switches 0:0e018d759a2a 162 virtual ble_error_t purgeAllBondingState(void) {
switches 0:0e018d759a2a 163 return BLE_ERROR_NOT_IMPLEMENTED; /* Requesting action from porters: override this API if security is supported. */
switches 0:0e018d759a2a 164 }
switches 0:0e018d759a2a 165
switches 0:0e018d759a2a 166 /**
switches 0:0e018d759a2a 167 * Get a list of addresses from all peers in the bond table.
switches 0:0e018d759a2a 168 *
switches 0:0e018d759a2a 169 * @param[in,out] addresses
switches 0:0e018d759a2a 170 * (on input) addresses.capacity contains the maximum
switches 0:0e018d759a2a 171 * number of addresses to be returned.
switches 0:0e018d759a2a 172 * (on output) The populated table with copies of the
switches 0:0e018d759a2a 173 * addresses in the implementation's whitelist.
switches 0:0e018d759a2a 174 *
switches 0:0e018d759a2a 175 * @retval BLE_ERROR_NONE On success, else an error code indicating reason for failure.
switches 0:0e018d759a2a 176 * @retval BLE_ERROR_INVALID_STATE If the API is called without module initialization or
switches 0:0e018d759a2a 177 * application registration.
switches 0:0e018d759a2a 178 *
switches 0:0e018d759a2a 179 * @experimental
switches 0:0e018d759a2a 180 */
switches 0:0e018d759a2a 181 virtual ble_error_t getAddressesFromBondTable(Gap::Whitelist_t &addresses) const {
switches 0:0e018d759a2a 182 /* Avoid compiler warnings about unused variables */
switches 0:0e018d759a2a 183 (void) addresses;
switches 0:0e018d759a2a 184
switches 0:0e018d759a2a 185 return BLE_ERROR_NOT_IMPLEMENTED; /* Requesting action from porters: override this API if security is supported. */
switches 0:0e018d759a2a 186 }
switches 0:0e018d759a2a 187
switches 0:0e018d759a2a 188 /* Event callback handlers. */
switches 0:0e018d759a2a 189 public:
switches 0:0e018d759a2a 190 /**
switches 0:0e018d759a2a 191 * Setup a callback to be invoked to notify the user application that the
switches 0:0e018d759a2a 192 * SecurityManager instance is about to shutdown (possibly as a result of a call
switches 0:0e018d759a2a 193 * to BLE::shutdown()).
switches 0:0e018d759a2a 194 *
switches 0:0e018d759a2a 195 * @note It is possible to chain together multiple onShutdown callbacks
switches 0:0e018d759a2a 196 * (potentially from different modules of an application) to be notified
switches 0:0e018d759a2a 197 * before the SecurityManager is shutdown.
switches 0:0e018d759a2a 198 *
switches 0:0e018d759a2a 199 * @note It is also possible to set up a callback into a member function of
switches 0:0e018d759a2a 200 * some object.
switches 0:0e018d759a2a 201 *
switches 0:0e018d759a2a 202 * @note It is possible to unregister a callback using onShutdown().detach(callback)
switches 0:0e018d759a2a 203 */
switches 0:0e018d759a2a 204 void onShutdown(const SecurityManagerShutdownCallback_t& callback) {
switches 0:0e018d759a2a 205 shutdownCallChain.add(callback);
switches 0:0e018d759a2a 206 }
switches 0:0e018d759a2a 207 template <typename T>
switches 0:0e018d759a2a 208 void onShutdown(T *objPtr, void (T::*memberPtr)(const SecurityManager *)) {
switches 0:0e018d759a2a 209 shutdownCallChain.add(objPtr, memberPtr);
switches 0:0e018d759a2a 210 }
switches 0:0e018d759a2a 211
switches 0:0e018d759a2a 212 /**
switches 0:0e018d759a2a 213 * @brief provide access to the callchain of shutdown event callbacks
switches 0:0e018d759a2a 214 * It is possible to register callbacks using onShutdown().add(callback);
switches 0:0e018d759a2a 215 * It is possible to unregister callbacks using onShutdown().detach(callback)
switches 0:0e018d759a2a 216 * @return The shutdown event callbacks chain
switches 0:0e018d759a2a 217 */
switches 0:0e018d759a2a 218 SecurityManagerShutdownCallbackChain_t& onShutdown() {
switches 0:0e018d759a2a 219 return shutdownCallChain;
switches 0:0e018d759a2a 220 }
switches 0:0e018d759a2a 221
switches 0:0e018d759a2a 222 /**
switches 0:0e018d759a2a 223 * To indicate that a security procedure for the link has started.
switches 0:0e018d759a2a 224 */
switches 0:0e018d759a2a 225 virtual void onSecuritySetupInitiated(SecuritySetupInitiatedCallback_t callback) {securitySetupInitiatedCallback = callback;}
switches 0:0e018d759a2a 226
switches 0:0e018d759a2a 227 /**
switches 0:0e018d759a2a 228 * To indicate that the security procedure for the link has completed.
switches 0:0e018d759a2a 229 */
switches 0:0e018d759a2a 230 virtual void onSecuritySetupCompleted(SecuritySetupCompletedCallback_t callback) {securitySetupCompletedCallback = callback;}
switches 0:0e018d759a2a 231
switches 0:0e018d759a2a 232 /**
switches 0:0e018d759a2a 233 * To indicate that the link with the peer is secured. For bonded devices,
switches 0:0e018d759a2a 234 * subsequent reconnections with a bonded peer will result only in this callback
switches 0:0e018d759a2a 235 * when the link is secured; setup procedures will not occur (unless the
switches 0:0e018d759a2a 236 * bonding information is either lost or deleted on either or both sides).
switches 0:0e018d759a2a 237 */
switches 0:0e018d759a2a 238 virtual void onLinkSecured(LinkSecuredCallback_t callback) {linkSecuredCallback = callback;}
switches 0:0e018d759a2a 239
switches 0:0e018d759a2a 240 /**
switches 0:0e018d759a2a 241 * To indicate that device context is stored persistently.
switches 0:0e018d759a2a 242 */
switches 0:0e018d759a2a 243 virtual void onSecurityContextStored(HandleSpecificEvent_t callback) {securityContextStoredCallback = callback;}
switches 0:0e018d759a2a 244
switches 0:0e018d759a2a 245 /**
switches 0:0e018d759a2a 246 * To set the callback for when the passkey needs to be displayed on a peripheral with DISPLAY capability.
switches 0:0e018d759a2a 247 */
switches 0:0e018d759a2a 248 virtual void onPasskeyDisplay(PasskeyDisplayCallback_t callback) {passkeyDisplayCallback = callback;}
switches 0:0e018d759a2a 249
switches 0:0e018d759a2a 250 /* Entry points for the underlying stack to report events back to the user. */
switches 0:0e018d759a2a 251 public:
switches 0:0e018d759a2a 252 void processSecuritySetupInitiatedEvent(Gap::Handle_t handle, bool allowBonding, bool requireMITM, SecurityIOCapabilities_t iocaps) {
switches 0:0e018d759a2a 253 if (securitySetupInitiatedCallback) {
switches 0:0e018d759a2a 254 securitySetupInitiatedCallback(handle, allowBonding, requireMITM, iocaps);
switches 0:0e018d759a2a 255 }
switches 0:0e018d759a2a 256 }
switches 0:0e018d759a2a 257
switches 0:0e018d759a2a 258 void processSecuritySetupCompletedEvent(Gap::Handle_t handle, SecurityCompletionStatus_t status) {
switches 0:0e018d759a2a 259 if (securitySetupCompletedCallback) {
switches 0:0e018d759a2a 260 securitySetupCompletedCallback(handle, status);
switches 0:0e018d759a2a 261 }
switches 0:0e018d759a2a 262 }
switches 0:0e018d759a2a 263
switches 0:0e018d759a2a 264 void processLinkSecuredEvent(Gap::Handle_t handle, SecurityMode_t securityMode) {
switches 0:0e018d759a2a 265 if (linkSecuredCallback) {
switches 0:0e018d759a2a 266 linkSecuredCallback(handle, securityMode);
switches 0:0e018d759a2a 267 }
switches 0:0e018d759a2a 268 }
switches 0:0e018d759a2a 269
switches 0:0e018d759a2a 270 void processSecurityContextStoredEvent(Gap::Handle_t handle) {
switches 0:0e018d759a2a 271 if (securityContextStoredCallback) {
switches 0:0e018d759a2a 272 securityContextStoredCallback(handle);
switches 0:0e018d759a2a 273 }
switches 0:0e018d759a2a 274 }
switches 0:0e018d759a2a 275
switches 0:0e018d759a2a 276 void processPasskeyDisplayEvent(Gap::Handle_t handle, const Passkey_t passkey) {
switches 0:0e018d759a2a 277 if (passkeyDisplayCallback) {
switches 0:0e018d759a2a 278 passkeyDisplayCallback(handle, passkey);
switches 0:0e018d759a2a 279 }
switches 0:0e018d759a2a 280 }
switches 0:0e018d759a2a 281
switches 0:0e018d759a2a 282 protected:
switches 0:0e018d759a2a 283 SecurityManager() :
switches 0:0e018d759a2a 284 securitySetupInitiatedCallback(),
switches 0:0e018d759a2a 285 securitySetupCompletedCallback(),
switches 0:0e018d759a2a 286 linkSecuredCallback(),
switches 0:0e018d759a2a 287 securityContextStoredCallback(),
switches 0:0e018d759a2a 288 passkeyDisplayCallback() {
switches 0:0e018d759a2a 289 /* empty */
switches 0:0e018d759a2a 290 }
switches 0:0e018d759a2a 291
switches 0:0e018d759a2a 292 public:
switches 0:0e018d759a2a 293 /**
switches 0:0e018d759a2a 294 * Notify all registered onShutdown callbacks that the SecurityManager is
switches 0:0e018d759a2a 295 * about to be shutdown and clear all SecurityManager state of the
switches 0:0e018d759a2a 296 * associated object.
switches 0:0e018d759a2a 297 *
switches 0:0e018d759a2a 298 * This function is meant to be overridden in the platform-specific
switches 0:0e018d759a2a 299 * sub-class. Nevertheless, the sub-class is only expected to reset its
switches 0:0e018d759a2a 300 * state and not the data held in SecurityManager members. This shall be
switches 0:0e018d759a2a 301 * achieved by a call to SecurityManager::reset() from the sub-class'
switches 0:0e018d759a2a 302 * reset() implementation.
switches 0:0e018d759a2a 303 *
switches 0:0e018d759a2a 304 * @return BLE_ERROR_NONE on success.
switches 0:0e018d759a2a 305 */
switches 0:0e018d759a2a 306 virtual ble_error_t reset(void) {
switches 0:0e018d759a2a 307 /* Notify that the instance is about to shutdown */
switches 0:0e018d759a2a 308 shutdownCallChain.call(this);
switches 0:0e018d759a2a 309 shutdownCallChain.clear();
switches 0:0e018d759a2a 310
switches 0:0e018d759a2a 311 securitySetupInitiatedCallback = NULL;
switches 0:0e018d759a2a 312 securitySetupCompletedCallback = NULL;
switches 0:0e018d759a2a 313 linkSecuredCallback = NULL;
switches 0:0e018d759a2a 314 securityContextStoredCallback = NULL;
switches 0:0e018d759a2a 315 passkeyDisplayCallback = NULL;
switches 0:0e018d759a2a 316
switches 0:0e018d759a2a 317 return BLE_ERROR_NONE;
switches 0:0e018d759a2a 318 }
switches 0:0e018d759a2a 319
switches 0:0e018d759a2a 320 protected:
switches 0:0e018d759a2a 321 SecuritySetupInitiatedCallback_t securitySetupInitiatedCallback;
switches 0:0e018d759a2a 322 SecuritySetupCompletedCallback_t securitySetupCompletedCallback;
switches 0:0e018d759a2a 323 LinkSecuredCallback_t linkSecuredCallback;
switches 0:0e018d759a2a 324 HandleSpecificEvent_t securityContextStoredCallback;
switches 0:0e018d759a2a 325 PasskeyDisplayCallback_t passkeyDisplayCallback;
switches 0:0e018d759a2a 326
switches 0:0e018d759a2a 327 private:
switches 0:0e018d759a2a 328 SecurityManagerShutdownCallbackChain_t shutdownCallChain;
switches 0:0e018d759a2a 329 };
switches 0:0e018d759a2a 330
switches 0:0e018d759a2a 331 #endif /*__SECURITY_MANAGER_H__*/