Skip to content

Commit 58571f9

Browse files
sjancHaavardRei
authored andcommitted
[nrf fromtree] 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 <[email protected]> (cherry picked from commit 9b27a47) Signed-off-by: Håvard Reierstad <[email protected]>
1 parent 9957a9d commit 58571f9

File tree

1 file changed

+1
-1
lines changed
  • subsys/bluetooth/host

1 file changed

+1
-1
lines changed

subsys/bluetooth/host/smp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4499,7 +4499,7 @@ static uint8_t smp_public_key(struct bt_smp *smp, struct net_buf *buf)
44994499
}
45004500
} else if (!bt_pub_key_is_valid(smp->pkey)) {
45014501
LOG_WRN("Received invalid public key");
4502-
return BT_SMP_ERR_INVALID_PARAMS;
4502+
return BT_SMP_ERR_DHKEY_CHECK_FAILED;
45034503
}
45044504

45054505
if (IS_ENABLED(CONFIG_BT_CENTRAL) &&

0 commit comments

Comments
 (0)