From 2fd8984b05a5edc1ec9a08f07f946e64ee916561 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Fri, 5 Oct 2018 21:02:29 +0300 Subject: [PATCH] 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 --- hs20/client/osu_client.c | 4 ++++ 1 file changed, 4 insertions(+) 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;