Skip to content

Commit 9b27a47

Browse files
sjancdkalowsk
authored andcommitted
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>
1 parent 812d33b commit 9b27a47

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
@@ -4491,7 +4491,7 @@ static uint8_t smp_public_key(struct bt_smp *smp, struct net_buf *buf)
44914491
}
44924492
} else if (!bt_pub_key_is_valid(smp->pkey)) {
44934493
LOG_WRN("Received invalid public key");
4494-
return BT_SMP_ERR_INVALID_PARAMS;
4494+
return BT_SMP_ERR_DHKEY_CHECK_FAILED;
44954495
}
44964496

44974497
if (IS_ENABLED(CONFIG_BT_CENTRAL) &&

0 commit comments

Comments
 (0)