legacy pairing support call in api

pull/6188/head
paul-szczepanek-arm 2018-01-16 14:48:08 +00:00
parent e02ae313ac
commit 83d582827d
2 changed files with 10 additions and 10 deletions

View File

@ -305,15 +305,13 @@ public:
// Feature support
//
virtual ble_error_t setSecureConnectionsSupport(bool enabled, bool secure_connections_only = false) {
(void) enabled;
(void) secure_connections_only;
virtual ble_error_t allowLegacyPairing(bool allow = true) {
(void) allow;
return BLE_ERROR_NOT_IMPLEMENTED; /* Requesting action from porters: override this API if security is supported. */
}
virtual ble_error_t getSecureConnectionsSupport(bool *enabled, bool *secure_connections_only) {
virtual ble_error_t getSecureConnectionsSupport(bool *enabled) {
(void) enabled;
(void) secure_connections_only;
return BLE_ERROR_NOT_IMPLEMENTED; /* Requesting action from porters: override this API if security is supported. */
}

View File

@ -42,11 +42,13 @@ static const uint8_t NUMBER_OFFSET = '0';
struct SecurityEntry_t {
connection_handle_t handle;
address_t identity_address;
uint8_t peer_address_is_public:1;
address_t peer_identity_address;
uint8_t peer_address_public:1;
uint8_t mitm_protection:1; /**< does the key provide mitm */
uint8_t is_authenticated:1; /**< have we authenticated during this connection */
uint8_t is_connected:1;
uint8_t connected:1;
uint8_t authenticated:1; /**< have we authenticated during this connection */
uint8_t sign_data:1;
uint8_t encrypt_data:1;
};
struct SecurityEntryKeys_t {
@ -232,7 +234,7 @@ public:
}
ble_error_t getEncryptionKeySize(Gap::Handle_t handle, uint8_t *size) {
return pal.get_encryption_key_size(handle, *size); //todo this needs event?
return pal.get_encryption_key_size(handle, *size);
}
////////////////////////////////////////////////////////////////////////////