From 7d4d868236fe0213ae5aaea1df3c3298b01efb43 Mon Sep 17 00:00:00 2001 From: James Prestwood Date: Wed, 2 Nov 2022 15:51:09 -0700 Subject: [PATCH] p2p: limit ciphers to CCMP The limitation of cipher selection in ap.c was done so to allow p2p to work. Now with the ability to specify ciphers in the AP config put the burden on p2p to limit ciphers as it needs which is only CCMP according to the spec. --- src/p2p.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/p2p.c b/src/p2p.c index cfd8560a..5d96e682 100644 --- a/src/p2p.c +++ b/src/p2p.c @@ -1273,6 +1273,9 @@ static void p2p_group_start(struct p2p_device *dev) /* Enable netconfig, set maximum usable DHCP lease time */ l_settings_set_uint(config, "IPv4", "LeaseTime", 0x7fffffff); + l_settings_set_string(config, "Security", "PairwiseCiphers", "CCMP"); + l_settings_set_string(config, "Security", "GroupCipher", "CCMP"); + dev->capability.group_caps |= P2P_GROUP_CAP_GO; dev->capability.group_caps |= P2P_GROUP_CAP_GROUP_FORMATION; dev->capability.group_caps |= P2P_GROUP_CAP_IP_ALLOCATION;