mirror of
https://github.com/espressif/esp-nimble.git
synced 2026-09-24 01:47:22 +00:00
host/mesh: logging public key in big endian
Local public key has been logged in little endian but remote public key in big endian. That has been changed. Both are logged in big endian to be able to compare in logs. This is port of 797c17436bd071e71fdc58584e6741d9d5ebb332
This commit is contained in:
committed by
Krzysztof Kopyściński
parent
804a6642fb
commit
2745cf4708
@@ -248,14 +248,14 @@ static void send_pub_key(void)
|
||||
return;
|
||||
}
|
||||
|
||||
BT_DBG("Local Public Key: %s", bt_hex(key, BT_PUB_KEY_LEN));
|
||||
|
||||
bt_mesh_prov_buf_init(buf, PROV_PUB_KEY);
|
||||
|
||||
/* Swap X and Y halves independently to big-endian */
|
||||
sys_memcpy_swap(net_buf_simple_add(buf, BT_PUB_KEY_COORD_LEN), key, BT_PUB_KEY_COORD_LEN);
|
||||
sys_memcpy_swap(net_buf_simple_add(buf, BT_PUB_KEY_COORD_LEN), &key[BT_PUB_KEY_COORD_LEN], 32);
|
||||
|
||||
BT_DBG("Local Public Key: %s", bt_hex(buf->om_data + 1, BT_PUB_KEY_LEN));
|
||||
|
||||
/* PublicKeyDevice */
|
||||
memcpy(bt_mesh_prov_link.conf_inputs.pub_key_device, &buf->om_data[1], PDU_LEN_PUB_KEY);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user