Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions nimble/host/src/ble_sm_sc.c
Original file line number Diff line number Diff line change
Expand Up @@ -612,13 +612,15 @@ ble_sm_sc_public_key_rx(uint16_t conn_handle, struct os_mbuf **om,
}

cmd = (struct ble_sm_public_key *)(*om)->om_data;
#if !MYNEWT_VAL(BLE_SM_SC_DEBUG_KEYS)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

even with debug keys enabled this should allow to have same public keys only if keys is debug

/* Check if the peer public key is same as our generated public key.
* Return fail if the public keys match. */
if (memcmp(cmd, ble_sm_sc_pub_key, 64) == 0) {
res->enc_cb = 1;
res->sm_err = BLE_SM_ERR_AUTHREQ;
return;
}
#endif

ble_hs_lock();
proc = ble_sm_proc_find(conn_handle, BLE_SM_PROC_STATE_PUBLIC_KEY, -1,
Expand Down
Loading