Add GCMP-256 as a pairwise cipher based on PASN type during pairing.
Signed-off-by: Shivani Baranwal <quic_shivbara@quicinc.com>
}
p2p->ssid_set = 0;
+ params->cipher = WPA_CIPHER_CCMP;
+ if (p2p->cfg->pairing_config.pasn_type & 0xc)
+ params->cipher |= WPA_CIPHER_GCMP_256;
+
p2p_random(params->passphrase, p2p->cfg->passphrase_len);
params->passphrase[p2p->cfg->passphrase_len] = '\0';
return 0;
if (peer->p2p2 && peer->pasn) {
res.p2p2 = peer->p2p2;
res.akmp = peer->pasn->akmp;
+ res.cipher = peer->pasn->cipher;
if (res.akmp == WPA_KEY_MGMT_PASN) {
if (go) {
*/
int akmp;
+ /**
+ * cipher - Pairwise cipher(s) for the group for P2P2
+ */
+ int cipher;
+
/**
* pmkid - PMKID for P2P2 when PMK is derived as part of pairing
*/
ssid->key_mgmt = WPA_KEY_MGMT_SAE;
ssid->pairwise_cipher = WPA_CIPHER_CCMP;
ssid->group_cipher = WPA_CIPHER_CCMP;
+ if (res->cipher)
+ ssid->pairwise_cipher |= res->cipher;
ssid->sae_pwe = SAE_PWE_HASH_TO_ELEMENT;
ssid->ieee80211w = MGMT_FRAME_PROTECTION_REQUIRED;
ssid->disabled = 0;
ssid->sae_password = os_strdup(params->sae_password);
ssid->ieee80211w = MGMT_FRAME_PROTECTION_REQUIRED;
ssid->sae_pwe = SAE_PWE_HASH_TO_ELEMENT;
+ if (params->cipher)
+ ssid->pairwise_cipher |= params->cipher;
}
wpa_s->ap_configured_cb = p2p_go_configured;