mirror of https://github.com/ARMmbed/mbed-os.git
reanmed type as per review request
parent
4fd29630b3
commit
4010bade89
|
@ -349,7 +349,7 @@ typedef octet_type_t<16> oob_confirm_t; /**< secure connections oob confirmation
|
|||
|
||||
/** data to be encrypted */
|
||||
typedef octet_type_t<16> encryption_block_t;
|
||||
typedef octet_type_t<32> public_key_t;
|
||||
typedef octet_type_t<32> public_key_coord_t;
|
||||
typedef octet_type_t<32> dhkey_t;
|
||||
|
||||
/**
|
||||
|
|
|
@ -243,17 +243,17 @@ public:
|
|||
|
||||
/* public key */
|
||||
|
||||
virtual const public_key_t& get_public_key_x() {
|
||||
virtual const public_key_coord_t& get_public_key_x() {
|
||||
return _public_key_x;
|
||||
}
|
||||
|
||||
virtual const public_key_t& get_public_key_y() {
|
||||
virtual const public_key_coord_t& get_public_key_y() {
|
||||
return _public_key_y;
|
||||
}
|
||||
|
||||
virtual void set_public_key(
|
||||
const public_key_t &public_key_x,
|
||||
const public_key_t &public_key_y
|
||||
const public_key_coord_t &public_key_x,
|
||||
const public_key_coord_t &public_key_y
|
||||
) {
|
||||
_public_key_x = public_key_x;
|
||||
_public_key_y = public_key_y;
|
||||
|
@ -363,8 +363,8 @@ private:
|
|||
entry_t _entries[MAX_ENTRIES];
|
||||
SecurityEntryIdentity_t _local_identity;
|
||||
csrk_t _local_csrk;
|
||||
public_key_t _public_key_x;
|
||||
public_key_t _public_key_y;
|
||||
public_key_coord_t _public_key_x;
|
||||
public_key_coord_t _public_key_y;
|
||||
};
|
||||
|
||||
} /* namespace pal */
|
||||
|
|
|
@ -370,8 +370,8 @@ public:
|
|||
*/
|
||||
virtual void on_oob_data_verification_request(
|
||||
connection_handle_t connection,
|
||||
const public_key_t &peer_public_key_x,
|
||||
const public_key_t &peer_public_key_y
|
||||
const public_key_coord_t &peer_public_key_x,
|
||||
const public_key_coord_t &peer_public_key_y
|
||||
) = 0;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -385,8 +385,8 @@ public:
|
|||
* @param[in] public_key_y newly generated public key (y coordinate)
|
||||
*/
|
||||
virtual void on_public_key_generated(
|
||||
const public_key_t &public_key_x,
|
||||
const public_key_t &public_key_y
|
||||
const public_key_coord_t &public_key_x,
|
||||
const public_key_coord_t &public_key_y
|
||||
) = 0;
|
||||
|
||||
/**
|
||||
|
|
|
@ -277,14 +277,14 @@ public:
|
|||
*
|
||||
* @return ref to x component of public key
|
||||
*/
|
||||
virtual const public_key_t& get_public_key_x() = 0;
|
||||
virtual const public_key_coord_t& get_public_key_x() = 0;
|
||||
|
||||
/**
|
||||
* Return local public key.
|
||||
*
|
||||
* @return ref to y component of public key
|
||||
*/
|
||||
virtual const public_key_t& get_public_key_y() = 0;
|
||||
virtual const public_key_coord_t& get_public_key_y() = 0;
|
||||
|
||||
/**
|
||||
* Set local public key.
|
||||
|
@ -293,8 +293,8 @@ public:
|
|||
* @param[in] public_key_y new public key value of the y coordinate
|
||||
*/
|
||||
virtual void set_public_key(
|
||||
const public_key_t &public_key_x,
|
||||
const public_key_t &public_key_y
|
||||
const public_key_coord_t &public_key_x,
|
||||
const public_key_coord_t &public_key_y
|
||||
) = 0;
|
||||
|
||||
/* list management */
|
||||
|
|
|
@ -699,8 +699,8 @@ void GenericSecurityManager::update_oob_presence(connection_handle_t connection)
|
|||
|
||||
#if defined(MBEDTLS_CMAC_C)
|
||||
bool GenericSecurityManager::crypto_toolbox_f4(
|
||||
const public_key_t& U,
|
||||
const public_key_t& V,
|
||||
const public_key_coord_t& U,
|
||||
const public_key_coord_t& V,
|
||||
const oob_lesc_value_t& X,
|
||||
oob_confirm_t& confirm
|
||||
) {
|
||||
|
@ -975,8 +975,8 @@ void GenericSecurityManager::on_legacy_pairing_oob_request(connection_handle_t c
|
|||
|
||||
void GenericSecurityManager::on_oob_data_verification_request(
|
||||
connection_handle_t connection,
|
||||
const public_key_t &peer_public_key_x,
|
||||
const public_key_t &peer_public_key_y
|
||||
const public_key_coord_t &peer_public_key_x,
|
||||
const public_key_coord_t &peer_public_key_y
|
||||
) {
|
||||
#if defined(MBEDTLS_CMAC_C)
|
||||
ControlBlock_t *cb = get_control_block(connection);
|
||||
|
@ -1004,8 +1004,8 @@ void GenericSecurityManager::on_oob_data_verification_request(
|
|||
//
|
||||
|
||||
void GenericSecurityManager::on_public_key_generated(
|
||||
const public_key_t &public_key_x,
|
||||
const public_key_t &public_key_y
|
||||
const public_key_coord_t &public_key_x,
|
||||
const public_key_coord_t &public_key_y
|
||||
) {
|
||||
_db.set_public_key(public_key_x, public_key_y);
|
||||
_public_keys_generated = true;
|
||||
|
|
Loading…
Reference in New Issue