From patchwork Thu Dec 7 13:48:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Prestwood X-Patchwork-Id: 13483319 Received: from mail-qv1-f50.google.com (mail-qv1-f50.google.com [209.85.219.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 487413D0D4 for ; Thu, 7 Dec 2023 13:48:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="VM/EhwLK" Received: by mail-qv1-f50.google.com with SMTP id 6a1803df08f44-67adac40221so6081106d6.2 for ; Thu, 07 Dec 2023 05:48:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701956908; x=1702561708; darn=lists.linux.dev; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=F3GWSRK6t4Zwb1f5hIoO2a4ez1XYNJe9ar6hpMqUBI4=; b=VM/EhwLKYrXG1ATeWsfP4LO4TtKrVf+CI/oogwGXg4ISC8zkXw2p88EbS4sPJ29DCm GERVoDGsGNRBaNqhTwKvZFnx2MFGnqtwZRZH4FxQB01BjBtJ+vb+HkPpYzbE0KTMejUU 4UcpKZ2x07kPQzdMjk1d+2pBfMcGrXmeihPhnp3ADJYJCcZqWVkFU63gFriGCbAs1IHk IeEk5BCBpc2KzN7hSxPoT89ZcrsobRkLMEaST3tcf0Xy6bw10/XZ95U/SVdfp65YjnAZ pdMOvqSCasqgRRADVi9RITV+hXD43kc+ek1+XhGoM4+8/GY9+Wrtgo4Y4F7g++o0G0B7 05aQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701956908; x=1702561708; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=F3GWSRK6t4Zwb1f5hIoO2a4ez1XYNJe9ar6hpMqUBI4=; b=YI83aef9ShUjirdZsACpChe8btqAqqg+Jp5DhgnbILIwCHlCSlotcOc6/wg9nWAAjg zYi+qsFo1jvTSXzbQ4YyeUIoYgbpwHg3nha56mBuPPiA4J4Kdjp+WjBr3ZSqHRBeasK3 qv5iF4hIPubnWkP+ML8/MS84JFYNuVVh1bVF8ekogBY9dnuy89Zh2+/Flp8rd6/U0Uve TyrWli2DozjDU8a91Pmvu1pro5G7lf5yB0mj0o9V2/R0mqwx2muEH7cqZc0JIbyYzE3H Esyb5UYMTluHgDR2jbhfbmFbPaU4k57BBcve0XYZdqrljsnkOjuI1vTbOTV/fUg6+4Ko wgUA== X-Gm-Message-State: AOJu0Yz+4O/wac45e6KJTD8ZV9uP/Nj+EyAWqneJD+G+FspzdiDwMJb0 NJEfaJvXtBykvu/zOExiIvM402zGDOw= X-Google-Smtp-Source: AGHT+IFkXEgyDpFVOyzmh5EnzrajhvH7I+UDU4QR4Q839DbBjG5w7LBfRsESYsjrRKi+Se0hIzylHA== X-Received: by 2002:ad4:4e06:0:b0:67a:e40d:316d with SMTP id dl6-20020ad44e06000000b0067ae40d316dmr2794688qvb.101.1701956908611; Thu, 07 Dec 2023 05:48:28 -0800 (PST) Received: from LOCLAP699.rst-02.locus ([208.195.13.130]) by smtp.gmail.com with ESMTPSA id w18-20020a0cef92000000b0067a27108513sm496494qvr.67.2023.12.07.05.48.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 05:48:28 -0800 (PST) From: James Prestwood To: iwd@lists.linux.dev Cc: James Prestwood Subject: [PATCH v2 1/4] network: add support for SAE password identifiers Date: Thu, 7 Dec 2023 05:48:19 -0800 Message-Id: <20231207134822.2458827-1-prestwoj@gmail.com> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: iwd@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Adds a new network profile setting [Security].PasswordIdentifier. When set (and the BSS enables SAE password identifiers) the network and handshake object will read this and use it for the SAE exchange. Loading the PSK will fail if there is no password identifier set and the BSS sets the "exclusive" bit. If a password identifier is set and the BSS doesn't indicate support the setting will be ignored (with a debug print). --- src/network.c | 49 ++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 48 insertions(+), 1 deletion(-) diff --git a/src/network.c b/src/network.c index 79f964b2..70a5434b 100644 --- a/src/network.c +++ b/src/network.c @@ -70,6 +70,7 @@ struct network { struct network_info *info; unsigned char *psk; char *passphrase; + char *password_identifier; struct l_ecc_point *sae_pt_19; /* SAE PT for Group 19 */ struct l_ecc_point *sae_pt_20; /* SAE PT for Group 20 */ unsigned int agent_request; @@ -124,6 +125,13 @@ static void network_reset_passphrase(struct network *network) network->passphrase = NULL; } + if (network->password_identifier) { + explicit_bzero(network->password_identifier, + strlen(network->password_identifier)); + l_free(network->password_identifier); + network->password_identifier = NULL; + } + if (network->sae_pt_19) { l_ecc_point_free(network->sae_pt_19); network->sae_pt_19 = NULL; @@ -317,7 +325,8 @@ static struct l_ecc_point *network_generate_sae_pt(struct network *network, l_debug("Generating PT for Group %u", group); pt = crypto_derive_sae_pt_ecc(group, network->ssid, - network->passphrase, NULL); + network->passphrase, + network->password_identifier); if (!pt) l_warn("SAE PT generation for Group %u failed", group); @@ -462,6 +471,10 @@ static int network_set_handshake_secrets_psk(struct network *network, handshake_state_set_passphrase(hs, network->passphrase); + if (network->password_identifier) + handshake_state_set_password_identifier(hs, + network->password_identifier); + if (ie_rsnxe_capable(hs->authenticator_rsnxe, IE_RSNX_SAE_H2E)) { l_debug("Authenticator is SAE H2E capable"); @@ -631,6 +644,9 @@ static int network_load_psk(struct network *network, struct scan_bss *bss) _auto_(l_free) char *passphrase = l_settings_get_string(network->settings, "Security", "Passphrase"); + _auto_(l_free) char *password_id = + l_settings_get_string(network->settings, "Security", + "PasswordIdentifier"); _auto_(l_free) char *path = storage_get_network_file_path(security, ssid); @@ -641,6 +657,31 @@ static int network_load_psk(struct network *network, struct scan_bss *bss) psk_len = 0; } + if (is_sae) { + /* + * Fail if: + * - the BSS exclusively uses password IDs and the profile + * does not have one set. + * - the BSS does not use password IDs and the profile has + * one set. + * + * In theory you could have a network with a mix of BSS's that + * use IDs and those that don't, but this is a strange + * configuration (arguably broken). + */ + if (bss->sae_pw_id_exclusive && !password_id) { + l_error("[Security].PasswordIdentifier is not set but " + "BSS requires SAE password identifiers"); + return -ENOKEY; + } + + if (!bss->sae_pw_id_used && password_id) { + l_debug("[Security].PasswordIdentifier set but BSS " + "does not not use password identifiers"); + return -ENOKEY; + } + } + /* PSK can be generated from the passphrase but not the other way */ if (!psk || is_sae) { if (!passphrase) @@ -655,6 +696,7 @@ static int network_load_psk(struct network *network, struct scan_bss *bss) network_reset_passphrase(network); network_reset_psk(network); network->passphrase = l_steal_ptr(passphrase); + network->password_identifier = l_steal_ptr(password_id); if (network_settings_load_pt_ecc(network, path, 19, &network->sae_pt_19) > 0) @@ -726,6 +768,11 @@ static void network_settings_save(struct network *network, l_settings_set_string(settings, "Security", "Passphrase", network->passphrase); + if (network->password_identifier) + l_settings_set_string(settings, "Security", + "PasswordIdentifier", + network->password_identifier); + if (network->sae_pt_19) network_settings_save_sae_pt_ecc(settings, network->sae_pt_19); From patchwork Thu Dec 7 13:48:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Prestwood X-Patchwork-Id: 13483318 Received: from mail-yb1-f181.google.com (mail-yb1-f181.google.com [209.85.219.181]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 68464405DD for ; Thu, 7 Dec 2023 13:48:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="GsMNPLWT" Received: by mail-yb1-f181.google.com with SMTP id 3f1490d57ef6-db54611b920so949825276.3 for ; Thu, 07 Dec 2023 05:48:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701956910; x=1702561710; darn=lists.linux.dev; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=LSxwELDo2cZzRWz6CJL7kDZoymdNmGBPXvNerdokW04=; b=GsMNPLWTft1SLaDPN0q6Xq11qt0/Gkjs3eiL6OuYMLOZikoGPIJVSylD7mJANfmWRm Jt5t+K+zkG08QcDJZmPg9Vu7TNylaNRkhL5hPsa0N5gpj03u26KNtWN5ZpYe2n0a5j7o hAiiuvOg9q0lcX//xdIi82FF+a1mBLw2vN0pXuFGlX4G0SiHENGfKKR6j53WTki4RQg/ hQCngBClaCvZ76oboRFFtSnKRk6YzcVeww2SrztXyl13r3bYSK0ykSLLNgPX/3bQrvEs bk0ITLc3hYzIKbFvttWxsIHuTV3IDd7wS9EZMZxofLm9aKVjJ7GPzbZGl1COIW9oWIiL ckhQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701956910; x=1702561710; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=LSxwELDo2cZzRWz6CJL7kDZoymdNmGBPXvNerdokW04=; b=Amh6tqeqAqNwwaAFHTLbS5i3I+Gehxbd0J3do/Mdw5veGqp6vUjdDCBbVvilIpns+Z d/UP4g1B+pSuraT4H3t+6QzJrSLrjnmnh2RVVoEMEEGo3W5ksw+a9UxsjdRXSqftUl1n 5/VRbDL/6mjDZ0npbImnwuuR7ZSKekii1Q9Oe5mo143A0Gna9Yh+EJHzS21pTFEgZwi4 0kQe7qTHFJaUMYOXw/ua7z1UnAcgnRqhBMPpDu3r6Ly7CqmCfl+1G0nfUdM29fgTRk9C XNZYGumwNYHo4hxdGDr7xYIOlayk3bzhjfXTG/uTIE3zssOAqMZYjapRoMlkNpmFy5ab kdIQ== X-Gm-Message-State: AOJu0Yz9tAAar2D8fH5vhiTS3MO0AglVsF0CQAH34ckMaVxoxeNhFAhm WB/D4wwIH5u/Dfo+UlcTREFM+OcKc0Y= X-Google-Smtp-Source: AGHT+IF4pJeEyzwyNpHh9igz6bHtmWyFfAacZB5nXkCfiWIvH6tgak43uF6C9846cs0dIDc7gkyHMw== X-Received: by 2002:a05:6902:52b:b0:db7:dacf:2f1b with SMTP id y11-20020a056902052b00b00db7dacf2f1bmr2308173ybs.98.1701956909644; Thu, 07 Dec 2023 05:48:29 -0800 (PST) Received: from LOCLAP699.rst-02.locus ([208.195.13.130]) by smtp.gmail.com with ESMTPSA id w18-20020a0cef92000000b0067a27108513sm496494qvr.67.2023.12.07.05.48.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 05:48:29 -0800 (PST) From: James Prestwood To: iwd@lists.linux.dev Cc: James Prestwood Subject: [PATCH v2 2/4] doc: document [Security].PasswordIdentifier Date: Thu, 7 Dec 2023 05:48:20 -0800 Message-Id: <20231207134822.2458827-2-prestwoj@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231207134822.2458827-1-prestwoj@gmail.com> References: <20231207134822.2458827-1-prestwoj@gmail.com> Precedence: bulk X-Mailing-List: iwd@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 --- src/iwd.network.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/iwd.network.rst b/src/iwd.network.rst index 719853fa..734dcfa1 100644 --- a/src/iwd.network.rst +++ b/src/iwd.network.rst @@ -199,6 +199,12 @@ connect to that network. required if the *PreSharedKey* is not provided. If not provided in settings, the agent will be asked for the passphrase at connection time. + * - PasswordIdentifier + - string + + An identifer string to be used with the passphrase. This is used for + WPA3-Personal (SAE) networks if the security has enabled password + identifiers for clients. * - PreSharedKey - 64 character hex string From patchwork Thu Dec 7 13:48:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Prestwood X-Patchwork-Id: 13483320 Received: from mail-qv1-f43.google.com (mail-qv1-f43.google.com [209.85.219.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E2B1740BFE for ; Thu, 7 Dec 2023 13:48:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="kMKDvyn3" Received: by mail-qv1-f43.google.com with SMTP id 6a1803df08f44-67ad277a06bso5399706d6.1 for ; Thu, 07 Dec 2023 05:48:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701956910; x=1702561710; darn=lists.linux.dev; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=MchMnUEFHg8V+CfcUQwkcGFR/Y4dtyM6OUBpfJFWAUs=; b=kMKDvyn3VNSqJXEiPc+2mDs2B7i6qqvlkg+ivcK+7FZYQyyjc5eqeGKPKqQB5LULfV lhCliV+UOJoIyfTEzQd9oNPNhu5hA2ct+9ulvLxkVpA5A7zJJvhcdQhqTF4AWw7XEDXA K9dQstYbdweiiHHCz0AmHcwGOg26rj9NALzTpz5kUUeWgI/Apa4nEdjP0tmmMKQR9jch Ga+V2aU9vBaj51oToTOFApEVY6y+lanw4+fe93GM6zaWyI6ETYbIQSB4Rkl5y4F9HtR9 tcOicxdTkywxTL4PoY3xRUsXbzjAFDxtTiS28xz5gVLPnmJe6guGpaqcIxLBpAwJBkvJ gSXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701956910; x=1702561710; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=MchMnUEFHg8V+CfcUQwkcGFR/Y4dtyM6OUBpfJFWAUs=; b=ggd3v21E70q7RRkdMC+vVdM8aSH0NXuuf1PPIiGMJfDJ4fmNLUFO4pxm/NwBNApSH5 RDwBedtTeXySVCbpc7kAm+Xtt5EpnaH6UvSCi8jCxoDtgGTlpd2HNYL15OmBz1VxfEqS JQ5PlqODboNmfnEAOY+eJHqvEvhvYsMoj7o8S9uPnEpZmHaWuzBZMEIOEgnzAuPIWuej zdMur3KevAN3Pt41wWPCECdaUPffK3D303Zj9Og0dANiD2RZwIb4s0IAb/H4A5kYrOG8 CAIGRGTH/FD6whsL23Uli7wywTZ13AE5CsFIm0+Mp7CEYxZ+yliTXwoGxL8uJrnpJClg gxgw== X-Gm-Message-State: AOJu0YydXNbhM5bo75xqmN2Ywj3BcQis+TRr1Ks3qItIgssdfSJEbGWy gQJUcpeDbuEMIOXcJ/9dUmUHl97I0Kw= X-Google-Smtp-Source: AGHT+IGI/nbByczHuEe9ueHEqm49gSoF3fgu4ybsmfif45hCEFj9L3BRPb5ZAS0omLRZ5V6wqOzUPA== X-Received: by 2002:a05:6214:5482:b0:67c:1818:7966 with SMTP id lg2-20020a056214548200b0067c18187966mr2282647qvb.46.1701956910555; Thu, 07 Dec 2023 05:48:30 -0800 (PST) Received: from LOCLAP699.rst-02.locus ([208.195.13.130]) by smtp.gmail.com with ESMTPSA id w18-20020a0cef92000000b0067a27108513sm496494qvr.67.2023.12.07.05.48.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 05:48:30 -0800 (PST) From: James Prestwood To: iwd@lists.linux.dev Cc: James Prestwood Subject: [PATCH v2 3/4] auto-t: add H2E password identifier test Date: Thu, 7 Dec 2023 05:48:21 -0800 Message-Id: <20231207134822.2458827-3-prestwoj@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231207134822.2458827-1-prestwoj@gmail.com> References: <20231207134822.2458827-1-prestwoj@gmail.com> Precedence: bulk X-Mailing-List: iwd@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 In order to support identifiers the test profiles needed to be reworked due to hostapd allowing multiple password entires. You cannot just call set_value() with a new entry as the old ones still exist. Instead use a unique password for the identifier and non-identifier use cases. After adding this test the failure_test started failing due to hostapd not starting up. This was due to the group being unsupported but oddly only when hostapd was reloaded (running the test individually worked). To fix this the group number was changed to 21 which hostapd does support but IWD does not. --- autotests/testSAE/autoconnect_test.py | 20 +++++++++++++------ autotests/testSAE/failure_test.py | 2 +- autotests/testSAE/ssidSAE.conf | 3 ++- .../{ssidSAE.psk => ssidSAE.psk.default} | 0 autotests/testSAE/ssidSAE.psk.identifier | 3 +++ 5 files changed, 20 insertions(+), 8 deletions(-) rename autotests/testSAE/{ssidSAE.psk => ssidSAE.psk.default} (100%) create mode 100644 autotests/testSAE/ssidSAE.psk.identifier diff --git a/autotests/testSAE/autoconnect_test.py b/autotests/testSAE/autoconnect_test.py index cba59274..4ce3b845 100644 --- a/autotests/testSAE/autoconnect_test.py +++ b/autotests/testSAE/autoconnect_test.py @@ -35,12 +35,23 @@ class Test(unittest.TestCase): wd.wait_for_object_condition(ordered_network.network_object, condition) def test_SAE(self): + IWD.copy_to_storage("ssidSAE.psk.default", name="ssidSAE.psk") self.hostapd.wait_for_event("AP-ENABLED") wd = IWD(True) self.validate_connection(wd) def test_SAE_H2E(self): + IWD.copy_to_storage("ssidSAE.psk.default", name="ssidSAE.psk") + self.hostapd.set_value('sae_pwe', '1') + self.hostapd.set_value('sae_groups', '20') + self.hostapd.reload() + self.hostapd.wait_for_event("AP-ENABLED") + wd = IWD(True) + self.validate_connection(wd) + + def test_SAE_H2E_password_identifier(self): + IWD.copy_to_storage("ssidSAE.psk.identifier", name="ssidSAE.psk") self.hostapd.set_value('sae_pwe', '1') self.hostapd.set_value('sae_groups', '20') self.hostapd.reload() @@ -51,15 +62,12 @@ class Test(unittest.TestCase): def setUp(self): self.hostapd.default() + def tearDown(self): + IWD.clear_storage() + @classmethod def setUpClass(cls): cls.hostapd = HostapdCLI(config='ssidSAE.conf') - IWD.copy_to_storage('ssidSAE.psk') - pass - - @classmethod - def tearDownClass(cls): - IWD.clear_storage() if __name__ == '__main__': unittest.main(exit=True) diff --git a/autotests/testSAE/failure_test.py b/autotests/testSAE/failure_test.py index 2aac3a07..aa4d14b9 100644 --- a/autotests/testSAE/failure_test.py +++ b/autotests/testSAE/failure_test.py @@ -37,7 +37,7 @@ class Test(unittest.TestCase): self.validate_connection(wd, 'InvalidSecret') def test_no_supported_groups(self): - self.hostapd.set_value('sae_groups', '1') + self.hostapd.set_value('sae_groups', '21') self.hostapd.reload() wd = IWD(True) diff --git a/autotests/testSAE/ssidSAE.conf b/autotests/testSAE/ssidSAE.conf index 41f46cad..f5ce537d 100644 --- a/autotests/testSAE/ssidSAE.conf +++ b/autotests/testSAE/ssidSAE.conf @@ -5,7 +5,8 @@ ssid=ssidSAE wpa=2 wpa_key_mgmt=SAE wpa_pairwise=CCMP -sae_password=secret123|mac=ff:ff:ff:ff:ff:ff +sae_password=secret123 +sae_password=withidentifier|id=myidentifier sae_groups=19 ieee80211w=2 sae_pwe=0 diff --git a/autotests/testSAE/ssidSAE.psk b/autotests/testSAE/ssidSAE.psk.default similarity index 100% rename from autotests/testSAE/ssidSAE.psk rename to autotests/testSAE/ssidSAE.psk.default diff --git a/autotests/testSAE/ssidSAE.psk.identifier b/autotests/testSAE/ssidSAE.psk.identifier new file mode 100644 index 00000000..3664063a --- /dev/null +++ b/autotests/testSAE/ssidSAE.psk.identifier @@ -0,0 +1,3 @@ +[Security] +Passphrase=withidentifier +PasswordIdentifier=myidentifier From patchwork Thu Dec 7 13:48:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Prestwood X-Patchwork-Id: 13483321 Received: from mail-qk1-f179.google.com (mail-qk1-f179.google.com [209.85.222.179]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0967F40BFF for ; Thu, 7 Dec 2023 13:48:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="g/una7Jx" Received: by mail-qk1-f179.google.com with SMTP id af79cd13be357-77f3b4394fdso31872085a.0 for ; Thu, 07 Dec 2023 05:48:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701956911; x=1702561711; darn=lists.linux.dev; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=NXnYUofkCp1atA9uXGJyCH9I7mrbJ+/QubCgFZHo8jc=; b=g/una7JxTRbzrcDuaAy7jiuyTrUUM02es6gqcFiXFjBoPnPsIxZJzvvP/qn3JburwW PoseOEhNzNDLpERwNhZZkLjcC/41LVbzAYtmejmLqOlPKuHoLM77IKDeA29IKSVZe6y7 eC6dl6+vitBs0AF4i1qwLKPw0q7lC414/Yw6jbp9oa8W8KBNII5i8+vF701FDeJxORvW EQA+hYHcGXbg1PewMKsY2TemCk7VcjuNLAf5f6PovGaiSl3lEjfrxcFSAaBZR8nj8Pit sCebMoeGTQ602USfiaIY+bVWBDxjCNsnR3VdMmfbnb9R74K7CDubfxJ4bACk74U6KPKY Bqkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701956911; x=1702561711; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=NXnYUofkCp1atA9uXGJyCH9I7mrbJ+/QubCgFZHo8jc=; b=MNuRHv8BVI6U7LhICS+MmfRFBznPaLc8LqHQqH8y05S2K7c6qw+VF1+pCYtSGs135a ukxhNtnzasOVt89D/a5CoRi+PrqdBIVKGIa5VDR9MhWuER73xIsqp7xWqcyX/6Vw6CRD 7ep1iDtLqNwp3J2T+1w25g2CbnIBD8gtqOfK6I2+9+AkioPQejBMf/IpHDfrGYNzSMS6 B122v12o5u9QutrWO5atKskHD15GYdf6hKqLM26Dpsbyd9E1eKczDRHpiPs6yJ9J+Ne2 qdTMUXUtcsaPscJA2+eoZ76qX/YsHR2G8bjkt34E1ZznpeEa+qcebFs2eGbB+i8lXkqI zOlA== X-Gm-Message-State: AOJu0Yy1f33z+hnVHCHTbZ04bf+becsk06EBcbl0C/7kw3U1JEUf6FnD MshygapwU505qvEnPPCJGoqH3qkDMGU= X-Google-Smtp-Source: AGHT+IEFT+bOdrJ8LWJbGGseaU/Z8Qgq6pn6crDt7Ds5fMfYYqjc1NiMB2mvRH/fwhqappxnhxVnUg== X-Received: by 2002:a05:6214:304:b0:67a:a721:82e9 with SMTP id i4-20020a056214030400b0067aa72182e9mr2188380qvu.67.1701956911596; Thu, 07 Dec 2023 05:48:31 -0800 (PST) Received: from LOCLAP699.rst-02.locus ([208.195.13.130]) by smtp.gmail.com with ESMTPSA id w18-20020a0cef92000000b0067a27108513sm496494qvr.67.2023.12.07.05.48.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 05:48:31 -0800 (PST) From: James Prestwood To: iwd@lists.linux.dev Cc: James Prestwood Subject: [PATCH v2 4/4] auto-t: throw exception if executable is missing Date: Thu, 7 Dec 2023 05:48:22 -0800 Message-Id: <20231207134822.2458827-4-prestwoj@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231207134822.2458827-1-prestwoj@gmail.com> References: <20231207134822.2458827-1-prestwoj@gmail.com> Precedence: bulk X-Mailing-List: iwd@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Certain tests may require external processes to work (e.g. testNetconfig) and if missing the test will just hang until the maximum test timeout. Check in start_process if the exe actually exists and if not throw an exception. --- tools/utils.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/utils.py b/tools/utils.py index a07c3183..8219542e 100644 --- a/tools/utils.py +++ b/tools/utils.py @@ -34,6 +34,9 @@ class Process(subprocess.Popen): logfile = args[0] + if not shutil.which(args[0]): + raise Exception("%s is not found on system" % args[0]) + if Process.is_verbose(args[0], log=False): self.verbose = True