From patchwork Thu Dec 7 14:00:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Prestwood X-Patchwork-Id: 13483328 Received: from mail-qk1-f180.google.com (mail-qk1-f180.google.com [209.85.222.180]) (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 321503DB99 for ; Thu, 7 Dec 2023 14:00:53 +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="OMJQnEQ9" Received: by mail-qk1-f180.google.com with SMTP id af79cd13be357-77f408d123bso19883785a.0 for ; Thu, 07 Dec 2023 06:00:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701957653; x=1702562453; 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=dgoD/V9gLxLUEDqt89OTfPLqaSugrC/C2RFfB3sN3bc=; b=OMJQnEQ9JIDgK9Yq8hQM0P0ChZqFU51q9hAeT0YbDYkSJZVZAIpuonsjl8X3qMOo79 rNEowUc2QQAhYmOxty18IEql9fljX7xOOz5XUH+mwNG10fKBKySSmaBHK73eOze15d5k S8O/3ycfIBDtszD/eUfNNYRFfzAU9VTHzrW5RJ7LEZWly2C7P4wccATVFkkv5jIcTQiE +etmrfqfYbEd969ypbIX4xor5RO5YPtyi35Uy0Ef+ClftbD5ZYPrdWqRROClN0PJuv/0 XE549re6m0Afo56Ukk3ahSxN19XocilOar5DM7U5WlfzMFnxLTv63Soqqs0zaUHca/vp uqrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701957653; x=1702562453; 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=dgoD/V9gLxLUEDqt89OTfPLqaSugrC/C2RFfB3sN3bc=; b=g48wuZbkWX2esByjIAIAgN7Op/pRHg/8pot+ejltzAZBSndjeBUradlzm2HhsaS3hW r/+MzHRIDm8FzZU/YpddhMK9b8eOQVH1iEDxqoF0fHZZ1aMr/xtfhRcaoks/3hdeZXIK scbe89+kxgkK/7dpM/EN3nHYLBbXL9eaalLg41GAKr9xQ2jeCbzC/bP+IBOjzhwagaic U1nNRCxhEW5j5ikITFq4yp1X8JxHIuhR5BuPmIS/iMSaWxQEnT/P+0UVN9nlI++q36iE gUSUOyMlquRVtr2AVSbraz1pFlXpRcdHmWO12oM5ltxOLwFiDhkdFscVBfpdeXT1ocVQ CX7g== X-Gm-Message-State: AOJu0YwCTadzaZZW5FmmY3s3AHnH471wz2tzXMSFpqQ+AGGoQmoJlb8K uaV+TxWbNv60guWKscZev3VzHSsPcuc= X-Google-Smtp-Source: AGHT+IHWzVu6DaKAhfN4ofopIWHyAc3hmrCMeKYHrkYBlc8mDNKMRcJXL+VpV5XozISHRp4/e3x1bw== X-Received: by 2002:a05:620a:5589:b0:77d:7630:2073 with SMTP id vq9-20020a05620a558900b0077d76302073mr904226qkn.73.1701957652685; Thu, 07 Dec 2023 06:00:52 -0800 (PST) Received: from LOCLAP699.rst-02.locus ([208.195.13.130]) by smtp.gmail.com with ESMTPSA id px24-20020a05620a871800b0077dc1476413sm407699qkn.131.2023.12.07.06.00.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 06:00:52 -0800 (PST) From: James Prestwood To: iwd@lists.linux.dev Cc: James Prestwood Subject: [PATCH v3 1/4] network: add support for SAE password identifiers Date: Thu, 7 Dec 2023 06:00:46 -0800 Message-Id: <20231207140049.2614514-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. - there is a password identifier set and the BSS does not set the "in-use" bit. --- src/network.c | 49 ++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 48 insertions(+), 1 deletion(-) v3: * fix outdated commit description 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 14:00:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Prestwood X-Patchwork-Id: 13483329 Received: from mail-qk1-f170.google.com (mail-qk1-f170.google.com [209.85.222.170]) (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 39BA740C03 for ; Thu, 7 Dec 2023 14:00:54 +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="YSAKADyu" Received: by mail-qk1-f170.google.com with SMTP id af79cd13be357-77f42ee9370so17264985a.2 for ; Thu, 07 Dec 2023 06:00:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701957654; x=1702562454; 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=YSAKADyuGzJvsf1PZo+l+IXIOQpsGVl+1IW1eByjr4Fjfb4obA5tDK1c2yZK6nN3La 5akEjMFAOkvY1zI42YneRZnqM34l3CtARmN/VI7GNeo12LGKnrKUpCiabcrHtEyotHTS xDMido4TPjmv8394K4ODsgZc7kxM2f29utb0FS34/o31Y1SCfbclJwuxOYGvIM5QYrmi CB08OQxyyIDuhgcvR06sDuPwmEqGbR7PYBNg6ORVrhz6+w8jYjK9zsceegJz1CXmT5Fv hshLKSUxA3o8xsgPKMd0YVV6L7/60rjPo+jr/cFSVY10DfMLOAgAjBEXvIT7MWZqkZqq evtg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701957654; x=1702562454; 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=crXCQahgBU6DVgrPtmIJ+xYhVu87GFEfmyAnFxYm9SChjaxpbOK5gsSTn+q7DQONmD /dXLsDBml+NdGjGCCj8XxDGuQiK1xdCu4QzB1NPCR28X44jFM2/tPwac/iJJuD7lSuMB daUf9eDvtxrDuaWSYd8tgxt5JmGQKWsKQI1DvBBxiQKamPLRGi91NGPSls46HBNvcPZI VowQN2V//WpRkuAwmU4YlsaDm8/ubY3wzPDpJdwqu2izYfambm+fcou0z/NWEGy7smKE HWLwC+7ChrhP1u4DN83+U6jANeUFNuwTg8D8wwb3nq7zfvkhuHpuaKqgBdCKkPLXYrRO HmNw== X-Gm-Message-State: AOJu0YzmsGSV1BiaOrXC2pk2rzuUub966iuYSSFaRK/agfIz/PTO1qUC 6QP4cq5PGFovfv0OjbZt9x8MAoaDb88= X-Google-Smtp-Source: AGHT+IEhcLXHEMKoMBa6+3sp28zGXwlgAeq4xO3Z11Uv9AglHIeSo0z8utuKIU84YhfZ4uJBGW9ipg== X-Received: by 2002:a05:620a:15a4:b0:77f:d39:ea3c with SMTP id f4-20020a05620a15a400b0077f0d39ea3cmr1214456qkk.87.1701957653794; Thu, 07 Dec 2023 06:00:53 -0800 (PST) Received: from LOCLAP699.rst-02.locus ([208.195.13.130]) by smtp.gmail.com with ESMTPSA id px24-20020a05620a871800b0077dc1476413sm407699qkn.131.2023.12.07.06.00.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 06:00:53 -0800 (PST) From: James Prestwood To: iwd@lists.linux.dev Cc: James Prestwood Subject: [PATCH v3 2/4] doc: document [Security].PasswordIdentifier Date: Thu, 7 Dec 2023 06:00:47 -0800 Message-Id: <20231207140049.2614514-2-prestwoj@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231207140049.2614514-1-prestwoj@gmail.com> References: <20231207140049.2614514-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 14:00:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Prestwood X-Patchwork-Id: 13483330 Received: from mail-oo1-f46.google.com (mail-oo1-f46.google.com [209.85.161.46]) (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 223D741212 for ; Thu, 7 Dec 2023 14:00:55 +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="Af5VIlox" Received: by mail-oo1-f46.google.com with SMTP id 006d021491bc7-59064bca27dso376112eaf.0 for ; Thu, 07 Dec 2023 06:00:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701957655; x=1702562455; 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=Af5VIloxHNugf9WBiR4uTyPrUtBr5MqDR3dhutZECwxvQG9MgkLYKsGH0b7jjQuczn qpvsPO3oXJTtRMB5oroxX5dAZ4vC1Dbv6MaecdytUn1jGSvMs7Su2ET/srYq+eeN5OtC YfiG3eIl0jvxzmC+mxHQVaapHQnpiug4kM313Ao+MgYRgqmC2clkPtQ5F+axtG6IA+C/ p5P3tbyUGQhEgJEJl8Tc5KOsxawmCGKOgvOPCdoj9GfoQWyl+pfrGN/4GL6FQvO/wqJ1 k4CSkZYHaxqkMd/DDKRRw/c3LN+qiU5oG19uUxSjeSAKPCiQdAV0SO+lc6wcIG+gOOKY 966Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701957655; x=1702562455; 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=N+RLVZ8VWEAj4AzTyV/X99f6gvuee2TgtvwV5YzBRIN+/4Bqlb47BnwuTVFW4OveAB 9CDjOmc9LZr+8pM2EFkwKl6wz56cdpg0XpMF02eY/ohHVjnehz94t3dJrf73KlLD1fdf t4WqhysqFXkesnNBnUpIER1F0sUJ5QwAbr9Qf9wLHMI6kZKE43KtYeBxjd0Jr8uj5y6z ODXF/pX17yzHTyKFoxAXwRqjksvlch7XqQoGQW4thsqbla9GcQXhinB030rQ7/o3g2W0 fCrPIWMF2PashVva9WTkcLpppdSskQVFyecitnjwKAcAorP9AJX9/LuE02kYyKWsMFKn ZVkg== X-Gm-Message-State: AOJu0Yz2sQNt1uiEgvUurmeqOpJ1oIViIzVug3GPlMzWlpgGZyCAwXJ+ a12AvXNexJjQUehllFJNkcHyeU0EgWE= X-Google-Smtp-Source: AGHT+IGNq9z1+DIw4hKJYTG6FvwEVbJKLVDWDFzfZxfPqwv06EMRV3DasUvkOriE/HjJp5djxtLs2A== X-Received: by 2002:a05:6358:2917:b0:170:87d:f307 with SMTP id y23-20020a056358291700b00170087df307mr2755404rwb.19.1701957654772; Thu, 07 Dec 2023 06:00:54 -0800 (PST) Received: from LOCLAP699.rst-02.locus ([208.195.13.130]) by smtp.gmail.com with ESMTPSA id px24-20020a05620a871800b0077dc1476413sm407699qkn.131.2023.12.07.06.00.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 06:00:54 -0800 (PST) From: James Prestwood To: iwd@lists.linux.dev Cc: James Prestwood Subject: [PATCH v3 3/4] auto-t: add H2E password identifier test Date: Thu, 7 Dec 2023 06:00:48 -0800 Message-Id: <20231207140049.2614514-3-prestwoj@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231207140049.2614514-1-prestwoj@gmail.com> References: <20231207140049.2614514-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 14:00:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Prestwood X-Patchwork-Id: 13483331 Received: from mail-qk1-f171.google.com (mail-qk1-f171.google.com [209.85.222.171]) (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 51D4640C03 for ; Thu, 7 Dec 2023 14:00:57 +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="HNuE+FfV" Received: by mail-qk1-f171.google.com with SMTP id af79cd13be357-77f3c84e0f6so37410785a.1 for ; Thu, 07 Dec 2023 06:00:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701957656; x=1702562456; 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=HNuE+FfViRwd8tQgyN1AmXYEAA4k3Rqueybw7gEsbxq2NOLOcSJn1rU8w4r+sV/QWH Wj8XXUyldGM0PMtGIJoj2dVSTS+5LKoqVCfMKNP3V2AOMihfbx3XyPN07Q3rgL0PrWNo Z1oNQ9bSGnxRlp4qApEBGrWjG7MS+NG6UdFst0kuQD3o17uHIHZZ+rjqv3CEBF8mAq/E fpJnVcGXUxpGR/tBnTXkm5Al0kKU4y7DCFYZOp91+45LnwngOnyKlXbWSqaICEjSeSd1 W98U0U4YUDZ0Jfwxs7O1+87iM0gDQOEpZ5uYvyCEEUnioA97Ezl3dAzzvXgIucBCkoXG a01Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701957656; x=1702562456; 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=KpfEuSD8AgCNNEPQUJxloQ2cDIGWdU6WdnyMmMwO3KhHAlueIdx5+d+3QFR/1OUTQC yphcdbGjiNUCxoaAV06P5p+KG1Bbtjiwp2IlcJyPP8uWI0+Q1tuDsN65+TIiiwarPvNc kcpLZsZJppRQjf8dXRuvofMvqQ29CHJuuXn8g2c5vQm84dh2O0j+zGrbIf6+/wVvsu4x VOMPpDzHQMEDhoBFQzOIZbnnVwvZHtI2njF7MLFHI7LBdI6uz6lH4xJZzOzOJ+aud/5m ApIXxqr87poPmUv7T9YmTaEZeQaWgBD90tfxZcvTQR/J2D3UiDTeL40mJIxYezWm3tDV Zi0Q== X-Gm-Message-State: AOJu0YzTdeI++PH54FbzoXdpNirJ6+9Dv5nL9MhW/9yAXu5m+r+klwBq IFapQp8akUUNOr1xEAjZyM07PHHV/fw= X-Google-Smtp-Source: AGHT+IEbBnvcaSCSEW3svTRRO24d1RzdCBSAn4wFRmQB6l17lpvt/7i+L9uQf6BMW10kkyTtm6QIvw== X-Received: by 2002:a05:620a:ce4:b0:77e:fba3:a1fe with SMTP id c4-20020a05620a0ce400b0077efba3a1femr1192163qkj.88.1701957655708; Thu, 07 Dec 2023 06:00:55 -0800 (PST) Received: from LOCLAP699.rst-02.locus ([208.195.13.130]) by smtp.gmail.com with ESMTPSA id px24-20020a05620a871800b0077dc1476413sm407699qkn.131.2023.12.07.06.00.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 06:00:55 -0800 (PST) From: James Prestwood To: iwd@lists.linux.dev Cc: James Prestwood Subject: [PATCH v3 4/4] auto-t: throw exception if executable is missing Date: Thu, 7 Dec 2023 06:00:49 -0800 Message-Id: <20231207140049.2614514-4-prestwoj@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231207140049.2614514-1-prestwoj@gmail.com> References: <20231207140049.2614514-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