Bluetooth: Host: Fix SMP Pairing failed code on invalid Public Key
Core Specification 6.1 clarified exptected erro code in case peer sending invalid Public Key. In case pairing is aborted during or immediately after Public Key Exchange phase has completed (which is the case here) expected reason code is set to "DHKey Check Failed". This was affecting SM/CEN/KDU/BI-04-C and SM/PER/KDU/BI-04-C qualification test cases. Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
This commit is contained in:
parent
812d33b7ab
commit
9b27a472f4
1 changed files with 1 additions and 1 deletions
|
@ -4491,7 +4491,7 @@ static uint8_t smp_public_key(struct bt_smp *smp, struct net_buf *buf)
|
|||
}
|
||||
} else if (!bt_pub_key_is_valid(smp->pkey)) {
|
||||
LOG_WRN("Received invalid public key");
|
||||
return BT_SMP_ERR_INVALID_PARAMS;
|
||||
return BT_SMP_ERR_DHKEY_CHECK_FAILED;
|
||||
}
|
||||
|
||||
if (IS_ENABLED(CONFIG_BT_CENTRAL) &&
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue