diff options
author | Jouni Malinen <jouni@qca.qualcomm.com> | 2017-10-08 13:37:32 (GMT) |
---|---|---|
committer | Jouni Malinen <j@w1.fi> | 2017-10-08 14:12:35 (GMT) |
commit | 7a12edd163ff0e50b9c89ce0407577da500299af (patch) | |
tree | 8a71a75addbf41b80cfbab6def317c8e04e43b01 /src/ap/wpa_auth_glue.c | |
parent | 6c4726189c5844fe39e3be0d4f1206ba8b4c8c36 (diff) | |
download | hostap-7a12edd163ff0e50b9c89ce0407577da500299af.zip hostap-7a12edd163ff0e50b9c89ce0407577da500299af.tar.gz hostap-7a12edd163ff0e50b9c89ce0407577da500299af.tar.bz2 |
OWE: Support DH groups 20 (NIST P-384) and 21 (NIST P-521) in AP mode
This extends OWE support in hostapd to allow DH groups 20 and 21 to be
used in addition to the mandatory group 19 (NIST P-256).
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'src/ap/wpa_auth_glue.c')
-rw-r--r-- | src/ap/wpa_auth_glue.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/ap/wpa_auth_glue.c b/src/ap/wpa_auth_glue.c index 5a09fb3..a44fd90 100644 --- a/src/ap/wpa_auth_glue.c +++ b/src/ap/wpa_auth_glue.c @@ -238,12 +238,15 @@ static int hostapd_wpa_auth_get_eapol(void *ctx, const u8 *addr, static const u8 * hostapd_wpa_auth_get_psk(void *ctx, const u8 *addr, const u8 *p2p_dev_addr, - const u8 *prev_psk) + const u8 *prev_psk, size_t *psk_len) { struct hostapd_data *hapd = ctx; struct sta_info *sta = ap_get_sta(hapd, addr); const u8 *psk; + if (psk_len) + *psk_len = PMK_LEN; + #ifdef CONFIG_SAE if (sta && sta->auth_alg == WLAN_AUTH_SAE) { if (!sta->sae || prev_psk) @@ -259,8 +262,11 @@ static const u8 * hostapd_wpa_auth_get_psk(void *ctx, const u8 *addr, #ifdef CONFIG_OWE if ((hapd->conf->wpa_key_mgmt & WPA_KEY_MGMT_OWE) && - sta && sta->owe_pmk) + sta && sta->owe_pmk) { + if (psk_len) + *psk_len = sta->owe_pmk_len; return sta->owe_pmk; + } #endif /* CONFIG_OWE */ psk = hostapd_get_psk(hapd->conf, addr, p2p_dev_addr, prev_psk); |