Commit 0e4d4dcc authored by Christian Eggers's avatar Christian Eggers Committed by Luiz Augusto von Dentz
Browse files

Bluetooth: SMP: make SM/PER/KDU/BI-04-C happy



The last test step ("Test with Invalid public key X and Y, all set to
0") expects to get an "DHKEY check failed" instead of "unspecified".

Fixes: 6d19628f ("Bluetooth: SMP: Fail if remote and local public keys are identical")
Signed-off-by: default avatarChristian Eggers <ceggers@arri.de>
Signed-off-by: default avatarLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
parent b6a2bf43
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2743,7 +2743,7 @@ static int smp_cmd_public_key(struct l2cap_conn *conn, struct sk_buff *skb)
	if (!test_bit(SMP_FLAG_DEBUG_KEY, &smp->flags) &&
	    !crypto_memneq(key, smp->local_pk, 64)) {
		bt_dev_err(hdev, "Remote and local public keys are identical");
		return SMP_UNSPECIFIED;
		return SMP_DHKEY_CHECK_FAILED;
	}

	memcpy(smp->remote_pk, key, 64);