From: Jouni Malinen Date: Fri, 5 Oct 2018 18:02:29 +0000 (+0300) Subject: HS 2.0: Reject OSU connection for Single SSID case without OSU_NAI X-Git-Tag: hostap_2_7~156 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2fd8984b05a5edc1ec9a08f07f946e64ee916561;p=thirdparty%2Fhostap.git HS 2.0: Reject OSU connection for Single SSID case without OSU_NAI The Single SSID case can only use OSEN, so reject the case where OSU_NAI is not set and open OSU connection would be used since that connection cannot succeed. Signed-off-by: Jouni Malinen --- diff --git a/hs20/client/osu_client.c b/hs20/client/osu_client.c index 02bde2f8a..17c5ba1b5 100644 --- a/hs20/client/osu_client.c +++ b/hs20/client/osu_client.c @@ -2193,6 +2193,10 @@ static int osu_connect(struct hs20_osu_client *ctx, const char *bssid, set_network_quoted(ifname, id, "identity", osu_nai) < 0 || set_network_quoted(ifname, id, "ca_cert", fname) < 0) return -1; + } else if (ssid2) { + wpa_printf(MSG_INFO, "No OSU_NAI set for RSN[OSEN]"); + write_summary(ctx, "No OSU_NAI set for RSN[OSEN]"); + return -1; } else { if (set_network(ifname, id, "key_mgmt", "NONE") < 0) return -1;