From patchwork Mon Aug 6 19:46:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathy Vanhoef X-Patchwork-Id: 954207 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=cs.kuleuven.be Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="bAPp00Uc"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=infradead.org header.i=@infradead.org header.b="SvOm5WWw"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41kpGR75hcz9ryt for ; Tue, 7 Aug 2018 05:52:47 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=OLrMweFpi4eZ1OQAFZUHflQ4pQd0/yYUz8VyJYa/PUw=; b=bAPp00UcSD0wV96pHhCce9Vxab KawfzRgvPoWMaJ8vDb7rjYm+4s/TkKkmwahNhNUFu8Oknwe1Eq2lXCFMCBO2wYfzV+Kn6ZRtkYxLO /+nE7hAVzMZO5LoGMm9s0WXdZvrQUc6Ka55Cv4saRDTsrbwaFiHgaRk3UEXAHAiycT9psQhYFv5we 4p45QM9q1Ubrhm0KpCH7pXanqSyBXJTaZlt2I/Fii3iiHuWGM3V0oQRPqWqAdwW1Tkvti4z9ehItf /vIjgKt4yO9k/hYTD9uIagcWss6938LPhMT5nl195h3t9F8JsJnayyKNWqfzXxbavanlbJM2E59X9 9rDLswNA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fmlYX-00043j-M4; Mon, 06 Aug 2018 19:52:41 +0000 Received: from merlin.infradead.org ([2001:8b0:10b:1231::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fmlY0-0002z5-8m for hostap@bombadil.infradead.org; Mon, 06 Aug 2018 19:52:08 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=WueMf0f43HnYgKCvld9chr3Hg1MK9QUbby4uFpXVP50=; b=SvOm5WWwtuUxek7UFpeqNNSq5 5MOUpycXj34KfMKI25Ehb4hF2AyIxD0JXfagFglU/edJ4eGKxB9Zckwzn05KZJ7WXFVC2PhbNebCW 5qP7oqticns+7T49eJs7/o0niVLv4onG0XF0gOywOB1jgHJqQ6HDlPZAaOQnCCmsgxb6WLdlMriKq JZOoV2GGQ/MLsoD+g3i+B/kj2HNJVRmqU6zI4FR+6BW1LzR4rQU0b0PbbAau4rZjb8PvsEBeKpdBg AXI7JodHnIAhRCZCsnVRMCenPzzAJ72MDl84VNdlGtMADWxcoyXRsaXy83wyZR64eRNj84yP87W26 FcH0VEutA==; Received: from vmailrelay1.cs.kuleuven.be ([2a02:2c40:0:a000::118] helo=hermes4.cs.kuleuven.be) by merlin.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fmlXx-0003YK-C6 for hostap@lists.infradead.org; Mon, 06 Aug 2018 19:52:06 +0000 Received: from dr-zook.cs.kuleuven.be. (vdr-zook1.cs.kuleuven.be [IPv6:2a02:2c40:500:a005::12c]) by hermes4.cs.kuleuven.be. with ESMTP id w76Jj43Q018539 for ; Mon, 6 Aug 2018 21:45:04 +0200 Received: from localhost (localhost [127.0.0.1]) by dr-zook.cs.kuleuven.be. (8.14.4/8.14.4/Debian-4.1ubuntu1) with ESMTP id w76JiGlH020726 for ; Mon, 6 Aug 2018 21:45:04 +0200 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on dr-zook.cs.kuleuven.be. X-Spam-Level: X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.0 X-Virus-Scanned: Debian amavisd-new at dr-zook.cs.kuleuven.be Received: from dr-zook.cs.kuleuven.be. ([127.0.0.1]) by localhost (dr-zook.cs.kuleuven.be [127.0.0.1]) (amavisd-new, port 10023) with LMTP id hsZI2oDcWyG2 for ; Mon, 6 Aug 2018 21:44:56 +0200 (CEST) Received: from oryx.cs.kuleuven.be. (mail4.cs.kuleuven.be [IPv6:2a02:2c40:0:a000::122]) by dr-zook.cs.kuleuven.be. (8.14.4/8.14.4/Debian-4.1ubuntu1) with ESMTP id w76Jiusa020827 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 6 Aug 2018 21:44:56 +0200 Received: from localhost.localdomain (ip-83-134-207-58.dsl.scarlet.be [83.134.207.58]) (authenticated bits=0) by oryx.cs.kuleuven.be. (A_Good_MTA/8.14.4/Debian-4.1ubuntu1) with ESMTP id w76Jhl94019837 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Mon, 6 Aug 2018 21:44:55 +0200 From: Maty Vanhoef To: hostap@lists.infradead.org Subject: [PATCH 21/25] OCV: Test OCI validation in the FT handshake Date: Mon, 6 Aug 2018 15:46:39 -0400 Message-Id: <20180806194643.1328-22-Mathy.Vanhoef@cs.kuleuven.be> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180806194643.1328-1-Mathy.Vanhoef@cs.kuleuven.be> References: <20180806194643.1328-1-Mathy.Vanhoef@cs.kuleuven.be> X-Scanned-By: MIMEDefang 2.73 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180806_155205_654667_FBB42D92 X-CRM114-Status: GOOD ( 10.47 ) X-Spam-Score: -0.0 (/) X-Spam-Report: SpamAssassin version 3.4.1 on merlin.infradead.org summary: Content analysis details: (-0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record X-BeenThere: hostap@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Maty Vanhoef MIME-Version: 1.0 Sender: "Hostap" Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Signed-off-by: Mathy Vanhoef --- tests/hwsim/test_ap_ft.py | 37 ++++++++++++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/tests/hwsim/test_ap_ft.py b/tests/hwsim/test_ap_ft.py index 1a3f337eb..95d963fde 100644 --- a/tests/hwsim/test_ap_ft.py +++ b/tests/hwsim/test_ap_ft.py @@ -128,7 +128,7 @@ def run_roams(dev, apdev, hapd0, hapd1, ssid, passphrase, over_ds=False, pairwise_cipher="CCMP", group_cipher="TKIP CCMP", ptk_rekey="0", test_connectivity=True, eap_identity="gpsk user", conndev=False, force_initial_conn_to_first_ap=False, sha384=False, - group_mgmt=None): + group_mgmt=None, ocv="0"): logger.info("Connect to first AP") copts = {} @@ -140,6 +140,7 @@ def run_roams(dev, apdev, hapd0, hapd1, ssid, passphrase, over_ds=False, copts["wpa_ptk_rekey"] = ptk_rekey if group_mgmt: copts["group_mgmt"] = group_mgmt + copts["ocv"] = ocv if eap: copts["key_mgmt"] = "FT-EAP-SHA384" if sha384 else "FT-EAP" copts["eap"] = "GPSK" @@ -430,6 +431,22 @@ def run_ap_ft_pmf_bip(dev, apdev, cipher): run_roams(dev[0], apdev, hapd0, hapd1, ssid, passphrase, group_mgmt=cipher) +def test_ap_ft_ocv(dev, apdev): + """WPA2-PSK-FT AP with OCV""" + ssid = "test-ft" + passphrase="12345678" + + params = ft_params1(ssid=ssid, passphrase=passphrase) + params["ieee80211w"] = "2" + params["ocv"] = "1" + hapd0 = hostapd.add_ap(apdev[0], params) + params = ft_params2(ssid=ssid, passphrase=passphrase) + params["ieee80211w"] = "2" + params["ocv"] = "1" + hapd1 = hostapd.add_ap(apdev[1], params) + + run_roams(dev[0], apdev, hapd0, hapd1, ssid, passphrase, ocv="1") + def test_ap_ft_over_ds(dev, apdev): """WPA2-PSK-FT AP over DS""" ssid = "test-ft" @@ -444,6 +461,24 @@ def test_ap_ft_over_ds(dev, apdev): check_mib(dev[0], [ ("dot11RSNAAuthenticationSuiteRequested", "00-0f-ac-4"), ("dot11RSNAAuthenticationSuiteSelected", "00-0f-ac-4") ]) +def test_ap_ft_over_ds_ocv(dev, apdev): + """WPA2-PSK-FT AP over DS""" + ssid = "test-ft" + passphrase="12345678" + + params = ft_params1(ssid=ssid, passphrase=passphrase) + params["ieee80211w"] = "2" + params["ocv"] = "1" + hapd0 = hostapd.add_ap(apdev[0], params) + params = ft_params2(ssid=ssid, passphrase=passphrase) + params["ieee80211w"] = "2" + params["ocv"] = "1" + hapd1 = hostapd.add_ap(apdev[1], params) + + run_roams(dev[0], apdev, hapd0, hapd1, ssid, passphrase, over_ds=True, ocv="1") + check_mib(dev[0], [ ("dot11RSNAAuthenticationSuiteRequested", "00-0f-ac-4"), + ("dot11RSNAAuthenticationSuiteSelected", "00-0f-ac-4") ]) + def test_ap_ft_over_ds_disabled(dev, apdev): """WPA2-PSK-FT AP over DS disabled""" ssid = "test-ft"