mirror of https://github.com/ARMmbed/mbed-os.git
typos, style and other review fixes
parent
c1e2e07241
commit
cbf80e9da5
|
@ -526,7 +526,7 @@ public:
|
||||||
connection_handle_t connection
|
connection_handle_t connection
|
||||||
);
|
);
|
||||||
|
|
||||||
/** @copydoc ble::pal::SecurityManager::on_invalid_mic
|
/** @copydoc ble::pal::SecurityManager::on_signature_verification_failure
|
||||||
*/
|
*/
|
||||||
virtual void on_signature_verification_failure(
|
virtual void on_signature_verification_failure(
|
||||||
connection_handle_t connection
|
connection_handle_t connection
|
||||||
|
|
|
@ -40,6 +40,11 @@ using ble::pal::AttHandleValueIndication;
|
||||||
using ble::pal::AttHandleValueNotification;
|
using ble::pal::AttHandleValueNotification;
|
||||||
using ble::pal::AttFindInformationResponse;
|
using ble::pal::AttFindInformationResponse;
|
||||||
|
|
||||||
|
#define PREPARE_WRITE_HEADER_LENGTH 5
|
||||||
|
#define WRITE_HEADER_LENGTH 3
|
||||||
|
#define CMAC_LENGTH 8
|
||||||
|
#define MAC_COUNTER_LENGTH 4
|
||||||
|
|
||||||
namespace ble {
|
namespace ble {
|
||||||
namespace generic {
|
namespace generic {
|
||||||
|
|
||||||
|
@ -1064,11 +1069,6 @@ ble_error_t GenericGattClient::read(
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define PREPARE_WRITE_HEADER_LENGTH 5
|
|
||||||
#define WRITE_HEADER_LENGTH 3
|
|
||||||
#define CMAC_LENGTH 8
|
|
||||||
#define MAC_COUNTER_LENGTH 4
|
|
||||||
|
|
||||||
ble_error_t GenericGattClient::write(
|
ble_error_t GenericGattClient::write(
|
||||||
GattClient::WriteOp_t cmd,
|
GattClient::WriteOp_t cmd,
|
||||||
Gap::Handle_t connection_handle,
|
Gap::Handle_t connection_handle,
|
||||||
|
|
|
@ -319,7 +319,7 @@ ble_error_t GenericSecurityManager::enableSigning(
|
||||||
cb->db_entry
|
cb->db_entry
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
/* crate keys if needed and exchange them */
|
/* create keys if needed and exchange them */
|
||||||
init_signing();
|
init_signing();
|
||||||
if (cb->is_master) {
|
if (cb->is_master) {
|
||||||
return requestPairing(connection);
|
return requestPairing(connection);
|
||||||
|
@ -745,7 +745,8 @@ void GenericSecurityManager::set_peer_csrk_cb(
|
||||||
_pal.set_peer_csrk(
|
_pal.set_peer_csrk(
|
||||||
cb->connection,
|
cb->connection,
|
||||||
*csrk,
|
*csrk,
|
||||||
cb->csrk_mitm_protected);
|
cb->csrk_mitm_protected
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GenericSecurityManager::return_csrk_cb(
|
void GenericSecurityManager::return_csrk_cb(
|
||||||
|
@ -829,8 +830,8 @@ void GenericSecurityManager::on_connected(
|
||||||
}
|
}
|
||||||
|
|
||||||
const bool signing = cb->signing_override_default ?
|
const bool signing = cb->signing_override_default ?
|
||||||
cb->signing_requested
|
cb->signing_requested :
|
||||||
: _default_key_distribution.get_signing();
|
_default_key_distribution.get_signing();
|
||||||
|
|
||||||
if (signing && cb->csrk_stored) {
|
if (signing && cb->csrk_stored) {
|
||||||
_db.get_entry_peer_csrk(
|
_db.get_entry_peer_csrk(
|
||||||
|
@ -951,8 +952,8 @@ void GenericSecurityManager::on_signature_verification_failure(
|
||||||
}
|
}
|
||||||
|
|
||||||
const bool signing = cb->signing_override_default ?
|
const bool signing = cb->signing_override_default ?
|
||||||
cb->signing_requested
|
cb->signing_requested :
|
||||||
: _default_key_distribution.get_signing();
|
_default_key_distribution.get_signing();
|
||||||
|
|
||||||
if (signing) {
|
if (signing) {
|
||||||
cb->csrk_failures++;
|
cb->csrk_failures++;
|
||||||
|
|
Loading…
Reference in New Issue