mirror of https://github.com/ARMmbed/mbed-os.git
BLE - Cordio PAL SM: Forward local keys
parent
18c93990b6
commit
628ffea6de
|
@ -503,22 +503,16 @@ bool CordioSecurityManager::sm_handler(const wsfMsgHdr_t* msg) {
|
||||||
|
|
||||||
switch(evt->type) {
|
switch(evt->type) {
|
||||||
case DM_KEY_LOCAL_LTK:
|
case DM_KEY_LOCAL_LTK:
|
||||||
// FIXME: forward local ltk
|
handler->on_keys_distributed_local_ltk(
|
||||||
#if 0
|
connection,
|
||||||
printf("local ltk: ");
|
ltk_t(reinterpret_cast<uint8_t*>(evt->keyData.ltk.key))
|
||||||
for (size_t i = 0; i < sizeof(ltk_t); ++i) {
|
);
|
||||||
printf("%02X ", evt->keyData.ltk.key[i]);
|
|
||||||
}
|
|
||||||
printf("\r\n");
|
|
||||||
|
|
||||||
printf("local ediv: %04X\r\n", evt->keyData.ltk.ediv);
|
handler->on_keys_distributed_local_ediv_rand(
|
||||||
printf("local rand: ");
|
connection,
|
||||||
for (size_t i = 0; i < sizeof(rand_t); ++i) {
|
ediv_t(reinterpret_cast<uint8_t*>(&(evt->keyData.ltk.ediv))),
|
||||||
printf("%02X ", evt->keyData.ltk.rand[i]);
|
evt->keyData.ltk.rand
|
||||||
}
|
);
|
||||||
printf("\r\n");
|
|
||||||
memcpy(local_ltk, evt->keyData.ltk.key, sizeof(local_ltk));
|
|
||||||
#endif
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case DM_KEY_PEER_LTK:
|
case DM_KEY_PEER_LTK:
|
||||||
|
|
Loading…
Reference in New Issue