@@ -255,6 +255,7 @@ ble_error_t CordioSecurityManager::set_csrk(const csrk_t& csrk)
255
255
256
256
ble_error_t CordioSecurityManager::generate_public_key ()
257
257
{
258
+ // FIXME
258
259
return BLE_ERROR_NOT_IMPLEMENTED;
259
260
}
260
261
@@ -356,7 +357,7 @@ ble_error_t CordioSecurityManager::passkey_request_reply(
356
357
) {
357
358
DmSecAuthRsp (
358
359
connection,
359
- 3 ,
360
+ /* datalength */ 3 ,
360
361
reinterpret_cast <uint8_t *>(&passkey)
361
362
);
362
363
@@ -369,7 +370,7 @@ ble_error_t CordioSecurityManager::legacy_pairing_oob_data_request_reply(
369
370
) {
370
371
DmSecAuthRsp (
371
372
connection,
372
- 16 ,
373
+ /* data length */ 16 ,
373
374
const_cast <uint8_t *>(oob_data.data ())
374
375
);
375
376
@@ -379,6 +380,7 @@ ble_error_t CordioSecurityManager::legacy_pairing_oob_data_request_reply(
379
380
ble_error_t CordioSecurityManager::confirmation_entered (
380
381
connection_handle_t connection, bool confirmation
381
382
) {
383
+ // FIXME:
382
384
return BLE_ERROR_NOT_IMPLEMENTED;
383
385
}
384
386
@@ -397,6 +399,7 @@ ble_error_t CordioSecurityManager::oob_data_verified(
397
399
const oob_lesc_value_t &local_random,
398
400
const oob_lesc_value_t &peer_random
399
401
) {
402
+ // FIXME:
400
403
return BLE_ERROR_NOT_IMPLEMENTED;
401
404
}
402
405
@@ -454,6 +457,7 @@ bool CordioSecurityManager::sm_handler(const wsfMsgHdr_t* msg) {
454
457
dmSecEncryptIndEvt_t* evt = (dmSecEncryptIndEvt_t*) msg;
455
458
// note: the field usingLtk of the message indicates if an LTK was
456
459
// used to encrypt the link
460
+ // FIXME: How to indicate the level of encryption ?
457
461
handler->on_link_encryption_result (evt->hdr .param , link_encryption_t ::ENCRYPTED);
458
462
return true ;
459
463
}
@@ -498,6 +502,7 @@ bool CordioSecurityManager::sm_handler(const wsfMsgHdr_t* msg) {
498
502
}
499
503
500
504
case DM_SEC_KEY_IND: {
505
+ // NOTE: also report security level and encryption key len
501
506
dmSecKeyIndEvt_t* evt = (dmSecKeyIndEvt_t*) msg;
502
507
connection_handle_t connection = evt->hdr .param ;
503
508
@@ -520,6 +525,7 @@ bool CordioSecurityManager::sm_handler(const wsfMsgHdr_t* msg) {
520
525
connection,
521
526
ltk_t (reinterpret_cast <uint8_t *>(evt->keyData .ltk .key ))
522
527
);
528
+
523
529
handler->on_keys_distributed_ediv_rand (
524
530
connection,
525
531
ediv_t (reinterpret_cast <uint8_t *>(&(evt->keyData .ltk .ediv ))),
@@ -533,6 +539,7 @@ bool CordioSecurityManager::sm_handler(const wsfMsgHdr_t* msg) {
533
539
(advertising_peer_address_type_t ::type) evt->keyData .irk .addrType ,
534
540
evt->keyData .irk .bdAddr
535
541
);
542
+
536
543
handler->on_keys_distributed_irk (
537
544
connection,
538
545
irk_t (reinterpret_cast <uint8_t *>(evt->keyData .irk .key ))
@@ -546,8 +553,6 @@ bool CordioSecurityManager::sm_handler(const wsfMsgHdr_t* msg) {
546
553
break ;
547
554
}
548
555
549
- // TODO: what to do with the security level and encryption key len ???
550
-
551
556
return true ;
552
557
}
553
558
0 commit comments