BLE - Cordio PAL SM: Forward local keys

pull/6188/head
Vincent Coubard 2018-03-01 14:55:45 +00:00
parent 18c93990b6
commit 628ffea6de
1 changed files with 9 additions and 15 deletions

View File

@ -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: