]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
WPS: Add GCMP-256 and CCMP-256 cipher options on Enrollee
authorJouni Malinen <jouni@qca.qualcomm.com>
Fri, 1 Dec 2017 23:42:50 +0000 (01:42 +0200)
committerJouni Malinen <j@w1.fi>
Sat, 2 Dec 2017 10:14:55 +0000 (12:14 +0200)
If a credential with encp type AES is received, add GCMP-256 and
CCMP-256 cipher options on station Enrollee based on local capabilities.
This is needed to allow connection with an AP using either of these
newer ciphers.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
wpa_supplicant/wps_supplicant.c

index 64edabf801bb25f961db48b9ddb68fe763f57a07..1a2677b8eea4237448212d424ed7d1d6a48cf5c5 100644 (file)
@@ -493,6 +493,16 @@ static int wpa_supplicant_wps_cred(void *ctx,
                        ssid->pairwise_cipher |= WPA_CIPHER_GCMP;
                        ssid->group_cipher |= WPA_CIPHER_GCMP;
                }
+               if (wpa_s->drv_capa_known &&
+                   (wpa_s->drv_enc & WPA_DRIVER_CAPA_ENC_GCMP_256)) {
+                       ssid->pairwise_cipher |= WPA_CIPHER_GCMP_256;
+                       ssid->group_cipher |= WPA_CIPHER_GCMP_256;
+               }
+               if (wpa_s->drv_capa_known &&
+                   (wpa_s->drv_enc & WPA_DRIVER_CAPA_ENC_CCMP_256)) {
+                       ssid->pairwise_cipher |= WPA_CIPHER_CCMP_256;
+                       ssid->group_cipher |= WPA_CIPHER_CCMP_256;
+               }
                break;
        }