Loading system/stack/btm/btm_ble.cc +28 −5 Original line number Diff line number Diff line Loading @@ -62,6 +62,22 @@ extern void gatt_notify_phy_updated(tGATT_STATUS status, uint16_t handle, #define PROPERTY_BLE_PRIVACY_ENABLED "bluetooth.core.gap.le.privacy.enabled" #endif // Pairing parameters defined in Vol 3, Part H, Chapter 3.5.1 - 3.5.2 // All present in the exact decimal values, not hex // Ex: bluetooth.core.smp.le.ctkd.initiator_key_distribution 15(0x0f) static const char kPropertyCtkdAuthRequest[] = "bluetooth.core.smp.le.ctkd.auth_request"; static const char kPropertyCtkdIoCapabilities[] = "bluetooth.core.smp.le.ctkd.io_capabilities"; // Vol 3, Part H, Chapter 3.6.1, Figure 3.11 // |EncKey(1)|IdKey(1)|SignKey(1)|LinkKey(1)|Reserved(4)| static const char kPropertyCtkdInitiatorKeyDistribution[] = "bluetooth.core.smp.le.ctkd.initiator_key_distribution"; static const char kPropertyCtkdResponderKeyDistribution[] = "bluetooth.core.smp.le.ctkd.responder_key_distribution"; static const char kPropertyCtkdMaxKeySize[] = "bluetooth.core.smp.le.ctkd.max_key_size"; /******************************************************************************/ /* External Function to be called by other modules */ /******************************************************************************/ Loading Loading @@ -1731,11 +1747,18 @@ uint8_t btm_ble_br_keys_req(tBTM_SEC_DEV_REC* p_dev_rec, tBTM_LE_IO_REQ* p_data) { uint8_t callback_rc = BTM_SUCCESS; BTM_TRACE_DEBUG("%s", __func__); if (btm_cb.api.p_le_callback) { /* the callback function implementation may change the IO capability... */ callback_rc = (*btm_cb.api.p_le_callback)( BTM_LE_IO_REQ_EVT, p_dev_rec->bd_addr, (tBTM_LE_EVT_DATA*)p_data); } p_data->io_cap = osi_property_get_int32(kPropertyCtkdIoCapabilities, BTM_IO_CAP_UNKNOWN); p_data->auth_req = osi_property_get_int32(kPropertyCtkdAuthRequest, BTM_LE_AUTH_REQ_SC_MITM_BOND); p_data->init_keys = osi_property_get_int32( kPropertyCtkdInitiatorKeyDistribution, SMP_BR_SEC_DEFAULT_KEY); p_data->resp_keys = osi_property_get_int32( kPropertyCtkdResponderKeyDistribution, SMP_BR_SEC_DEFAULT_KEY); p_data->max_key_size = osi_property_get_int32(kPropertyCtkdMaxKeySize, BTM_BLE_MAX_KEY_SIZE); // No OOB data for BR/EDR p_data->oob_data = false; return callback_rc; } Loading Loading
system/stack/btm/btm_ble.cc +28 −5 Original line number Diff line number Diff line Loading @@ -62,6 +62,22 @@ extern void gatt_notify_phy_updated(tGATT_STATUS status, uint16_t handle, #define PROPERTY_BLE_PRIVACY_ENABLED "bluetooth.core.gap.le.privacy.enabled" #endif // Pairing parameters defined in Vol 3, Part H, Chapter 3.5.1 - 3.5.2 // All present in the exact decimal values, not hex // Ex: bluetooth.core.smp.le.ctkd.initiator_key_distribution 15(0x0f) static const char kPropertyCtkdAuthRequest[] = "bluetooth.core.smp.le.ctkd.auth_request"; static const char kPropertyCtkdIoCapabilities[] = "bluetooth.core.smp.le.ctkd.io_capabilities"; // Vol 3, Part H, Chapter 3.6.1, Figure 3.11 // |EncKey(1)|IdKey(1)|SignKey(1)|LinkKey(1)|Reserved(4)| static const char kPropertyCtkdInitiatorKeyDistribution[] = "bluetooth.core.smp.le.ctkd.initiator_key_distribution"; static const char kPropertyCtkdResponderKeyDistribution[] = "bluetooth.core.smp.le.ctkd.responder_key_distribution"; static const char kPropertyCtkdMaxKeySize[] = "bluetooth.core.smp.le.ctkd.max_key_size"; /******************************************************************************/ /* External Function to be called by other modules */ /******************************************************************************/ Loading Loading @@ -1731,11 +1747,18 @@ uint8_t btm_ble_br_keys_req(tBTM_SEC_DEV_REC* p_dev_rec, tBTM_LE_IO_REQ* p_data) { uint8_t callback_rc = BTM_SUCCESS; BTM_TRACE_DEBUG("%s", __func__); if (btm_cb.api.p_le_callback) { /* the callback function implementation may change the IO capability... */ callback_rc = (*btm_cb.api.p_le_callback)( BTM_LE_IO_REQ_EVT, p_dev_rec->bd_addr, (tBTM_LE_EVT_DATA*)p_data); } p_data->io_cap = osi_property_get_int32(kPropertyCtkdIoCapabilities, BTM_IO_CAP_UNKNOWN); p_data->auth_req = osi_property_get_int32(kPropertyCtkdAuthRequest, BTM_LE_AUTH_REQ_SC_MITM_BOND); p_data->init_keys = osi_property_get_int32( kPropertyCtkdInitiatorKeyDistribution, SMP_BR_SEC_DEFAULT_KEY); p_data->resp_keys = osi_property_get_int32( kPropertyCtkdResponderKeyDistribution, SMP_BR_SEC_DEFAULT_KEY); p_data->max_key_size = osi_property_get_int32(kPropertyCtkdMaxKeySize, BTM_BLE_MAX_KEY_SIZE); // No OOB data for BR/EDR p_data->oob_data = false; return callback_rc; } Loading