From patchwork Thu Dec 14 12:33:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Prestwood X-Patchwork-Id: 13492977 Received: from mail-qt1-f173.google.com (mail-qt1-f173.google.com [209.85.160.173]) (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 52D6D2FC21 for ; Thu, 14 Dec 2023 12:34:05 +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="M8aO8Eax" Received: by mail-qt1-f173.google.com with SMTP id d75a77b69052e-425952708afso4688071cf.0 for ; Thu, 14 Dec 2023 04:34:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1702557244; x=1703162044; 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=+ikbPS5hzMOcGfJ18DvoHNc98uuyRJgbrRlnLNeB87k=; b=M8aO8Eaxg7OP2tgjWsaCJq87NlzegRtenUaTMWjORZs1DEBr65cx+6lpb+tDiB2IJn orslQUTW1qoDrog2WcWOsskco27+DmXOaaK1Jx/Ij1NLiQZz5nxe/pTbbgQQDe5zcg9e QgJF224DJp/CBUuQ3boITJQRB8OJWrl6MnVJwj+TKL63oLX9IHN2366ZZWq8pFTuL84V kBl5Wh20sq1M9YisStXEhoym5PbXUn+Mr4G3/LSdmHY7sCeRX3MLPivDXk/fb9GMuVNI N03tpyR9biuVZqgauzujG+RhhwBtsun5XXXh/Vbzmj4Ypl+zKEbzaksFJyPqY9JO/Jbz YTOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702557244; x=1703162044; 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=+ikbPS5hzMOcGfJ18DvoHNc98uuyRJgbrRlnLNeB87k=; b=V05naVOPZzqVsXhaQ9GWIGmuUeAtLEPpjPxQlG0qI+rHqnzyeLfwmwdhoeTPKhLWn7 qBWMFQj2LbViH4kc7wcsDMedtq1lUR9nVodNWpv/I/KcmcLhHlFXuSoUY6SXiicmFJoz Nj6Ox/I68oWRyRyLkFHySu3PxbM7Olp7BSFwpLOQzjz4hL05mTG6Uanyp3Ql3VfW5cv8 o7F2r0QLAKDItpvOtQCmpc5bSNyyFfRVSNQlthvFyTZVygJeSsDVXNRrVH02FYYK1SYT d/A9QDmfngfA1kGvFSjilIZ+bhc2aOIgXYot+IFkXc1+sjY8wNdhb1kHkZpDoy8jRZmJ uLIw== X-Gm-Message-State: AOJu0YywTjx3KmYehWG+QdZwSWqvJnUGaMCNK5ED84u/hhOUQRIFMyJg 3IHLS62Fqn9w52ESA5erV4h/Y413weI= X-Google-Smtp-Source: AGHT+IHc9Xb08psFu3Z0OomJiL0VbKHRwNQPqH156ZEF1cJlMe1Yu/JaDSHw8FX4GJj0j0Ihp3TirA== X-Received: by 2002:ac8:5956:0:b0:425:9668:3b5f with SMTP id 22-20020ac85956000000b0042596683b5fmr17927823qtz.46.1702557243704; Thu, 14 Dec 2023 04:34:03 -0800 (PST) Received: from LOCLAP699.rst-02.locus ([208.195.13.130]) by smtp.gmail.com with ESMTPSA id x3-20020ac87303000000b0042551dce749sm5745883qto.46.2023.12.14.04.34.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Dec 2023 04:34:03 -0800 (PST) From: James Prestwood To: iwd@lists.linux.dev Cc: James Prestwood Subject: [PATCH v4 1/4] network: add support for SAE password identifiers Date: Thu, 14 Dec 2023 04:33:57 -0800 Message-Id: <20231214123400.12924-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. Building the handshake 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 | 37 ++++++++++++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) v4: * Moved the checks out of network_load_psk and into the handshake setup function. This is more consistent to where other BSS-specific checks are made. diff --git a/src/network.c b/src/network.c index 79f964b2..b6723fa9 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"); @@ -495,6 +508,19 @@ int network_handshake_setup(struct network *network, struct scan_bss *bss, switch (network->security) { case SECURITY_PSK: + /* Check the BSS password ID settings match our configuration */ + if (bss->sae_pw_id_exclusive && !network->password_identifier) { + l_error("[Security].PasswordIdentifier is not set but " + "BSS requires SAE password identifiers"); + return -ENOKEY; + } + + if (!bss->sae_pw_id_used && network->password_identifier) { + l_error("[Security].PasswordIdentifier set but BSS " + "does not not use password identifiers"); + return -ENOKEY; + } + r = network_set_handshake_secrets_psk(network, hs); if (r < 0) return r; @@ -631,6 +657,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); @@ -655,6 +684,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 +756,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 14 12:33:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Prestwood X-Patchwork-Id: 13492978 Received: from mail-qt1-f170.google.com (mail-qt1-f170.google.com [209.85.160.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 0DD5C405D7 for ; Thu, 14 Dec 2023 12:34:05 +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="CysL9+1P" Received: by mail-qt1-f170.google.com with SMTP id d75a77b69052e-4257ba1bc5fso60953531cf.0 for ; Thu, 14 Dec 2023 04:34:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1702557245; x=1703162045; 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=CysL9+1PN6GM3FA8UL3gUrMyfz11pCToX3x3j3dj/bVI+pvhMqiAfadctu7CB8pOph MhNs5JQSvN6dQoZ5gGAIARzqUatqhzYm48UV22Gd80dcEwwNgJMMRcWxG/CT5fFGUCcT oIlzOkpC9ugqdjdn4iR4cFn9mhl4DQFRYR0kicT0xgoyKvBnfzSDEgxW3wacnpBqDKp/ 8xdDRz9VXucUsBNxw/OffPfCTSNFEXKxBWWSavpNh/o+ft2G0js/vYJPYuIcoM32Xg/V AFFij/68s9Es4MhD2RNZXkEPWgBmd/V9ZWGvqYIC/nnFVyDup29z0l/tn8fm0HNex2Vi 6L/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702557245; x=1703162045; 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=tteMzW986y4PJQ3mMfVnDJ2gXyr9zcaLW+eZylPiKT8UPL4CbAa62mKkNtJaL/CMXn RfDWwYVaBMm8RbE6qpI44skZks7e/iZTizS+qDGGU+J8FtgAkyJp/oaLIbnrEb1djO0N viZ7ixdpC/OWJgwG2lcAP2rRe9dhWo2/hSbFzi+2HmDD2umsGREHBrevXVeJAnZKrDb9 4tMYXKwF6JZWb7kytQ5NJwEbe87l5gOaon1n6yKyX6R/Po4OCSmOhPST8G3hPuZhyVjr rai5IV8Ie3PEKO/ApzvzAALyq1Ii4FFi3SCZJQd3SJizvz8jPFxYSP2pe8XV/1VLuatH eUgg== X-Gm-Message-State: AOJu0Yy75QdCemj/hJfCqM+D4wRy9jxuO/7eo+K58ZmTyaMIOaPs+cr1 JRKNNI1bM9lSaEGt+nIlODt4VuBcU14= X-Google-Smtp-Source: AGHT+IHP2uUjww4gS5elmbwrLxGb4ZJ0NL3L6ZgP09kb6sQ1F8zJBHZL5rDqitHMXUE9HTD69PKalg== X-Received: by 2002:ac8:5843:0:b0:423:98ce:48e with SMTP id h3-20020ac85843000000b0042398ce048emr14148689qth.22.1702557244647; Thu, 14 Dec 2023 04:34:04 -0800 (PST) Received: from LOCLAP699.rst-02.locus ([208.195.13.130]) by smtp.gmail.com with ESMTPSA id x3-20020ac87303000000b0042551dce749sm5745883qto.46.2023.12.14.04.34.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Dec 2023 04:34:04 -0800 (PST) From: James Prestwood To: iwd@lists.linux.dev Cc: James Prestwood Subject: [PATCH v4 2/4] doc: document [Security].PasswordIdentifier Date: Thu, 14 Dec 2023 04:33:58 -0800 Message-Id: <20231214123400.12924-2-prestwoj@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231214123400.12924-1-prestwoj@gmail.com> References: <20231214123400.12924-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 14 12:33:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Prestwood X-Patchwork-Id: 13492979 Received: from mail-oa1-f49.google.com (mail-oa1-f49.google.com [209.85.160.49]) (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 C592A4AF7D for ; Thu, 14 Dec 2023 12:34:06 +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="iGiK+FsZ" Received: by mail-oa1-f49.google.com with SMTP id 586e51a60fabf-2031ebf11d9so690615fac.3 for ; Thu, 14 Dec 2023 04:34:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1702557246; x=1703162046; 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=iGiK+FsZlb6wUMVpZIE+4666gZXmIjrEiTUxRjRtb1Z7Saa90/tv8YgEbCoqcTUlgp R/PX5OmsmdBDLup+ua80YVE9NNH2AJt8OUXah6cl4lHvl/6GEWyqjNIwUAVTjAfiZHUW svtLVO/rlVmdD7TiJixeGcKM5u4hNOppJaM3+ioJnfFTs6IMebliYYwcE5/RUuUALz1/ SjN7XqiDFMamtO3BC/DZJ0UsebIeAvM7LuWkzkz8NjZcFdb+1FVCBIOb6tEZFcERP2nN DfdOkpRe9h0Bq76Qqv+bDnzzL04b3uJDo4G1QbGfkhtRW4MxxunN3rxTYg2fEy1PYcBf vbFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702557246; x=1703162046; 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=jtYam1ertusZBjYKBRpxKyywCHXoF/WEgkJ/6JvFjVKuHoTJ20yF204qaSVA5BaT// e3T0AQ/WG09BFXLjaDPEuQnJX6a55mFGV074bVmLHpLNAFtuKKOhnqZOGRo8d47BdoWl FzSWYTpcJgJSANks05bZqA8F+WLB4gQztdhdp8e1zpBDWt+B0HgjSc8o2Vycu0qLLLfB RuPtN7d1hPPc3v4Aa4YFVGIkIJ3i4lZFpr/oHNbnZjCCujxOhKFz3wgG8F3YUqszbtjJ dFqgx3tPjfxDRefM3mN356MNlxLtII56yZ/CLH0NdP6nNJ7en27AZUUuqjJiOqLRIUbG qQlg== X-Gm-Message-State: AOJu0Yy2KUUcTw6fyNKkgeECEWqdxDAzwxfVQ1ufjxyD8DaAGP8vG4xT mXddpDl3Dx+C+1gv5UR/4GFDfcPybIQ= X-Google-Smtp-Source: AGHT+IGc0v2tzk5aqsM++O1isAU2YEttfxbOZWkAJDi/39QfGPv8U5exSI9gPWhlAgsM1hTnXWgCDw== X-Received: by 2002:a05:6870:ef06:b0:1fb:75b:2ba9 with SMTP id qq6-20020a056870ef0600b001fb075b2ba9mr6017905oab.101.1702557245613; Thu, 14 Dec 2023 04:34:05 -0800 (PST) Received: from LOCLAP699.rst-02.locus ([208.195.13.130]) by smtp.gmail.com with ESMTPSA id x3-20020ac87303000000b0042551dce749sm5745883qto.46.2023.12.14.04.34.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Dec 2023 04:34:05 -0800 (PST) From: James Prestwood To: iwd@lists.linux.dev Cc: James Prestwood Subject: [PATCH v4 3/4] auto-t: add H2E password identifier test Date: Thu, 14 Dec 2023 04:33:59 -0800 Message-Id: <20231214123400.12924-3-prestwoj@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231214123400.12924-1-prestwoj@gmail.com> References: <20231214123400.12924-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 14 12:34:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Prestwood X-Patchwork-Id: 13492980 Received: from mail-qt1-f178.google.com (mail-qt1-f178.google.com [209.85.160.178]) (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 EAB0A405D7 for ; Thu, 14 Dec 2023 12:34:07 +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="llQAofHs" Received: by mail-qt1-f178.google.com with SMTP id d75a77b69052e-4258026a9fdso49623421cf.0 for ; Thu, 14 Dec 2023 04:34:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1702557246; x=1703162046; 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=llQAofHsyk0s3V0C0EPq1uRgkcqLAaR2BcX+aWqbwGMINkEJQLnZBhwiGdLQzlINku xy1jwBnoTEVshGcqhlYy45hxW33M6kYljDGNrUKRaJySWgfghuX/t6WDSFngxxochFHf pkyhavUAnDOFLEjirYBa++P1GBDjJdNmIeKeoj9RMH0lsnnhVPsRfWehBYUUlPpfNmjE RopTXf2h/IDMqe+oHQyejMZOgKI4bfSIqTdNVETpKGMSFv5D/pao6bwHTp4r38Agu3rW KcSzFrU18U8EhsnMg3cjz/rtc/FAVpRyAWFtburJE6JPRTwS3pmcJGqquPbG8xTW+Rnu Pl+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702557246; x=1703162046; 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=r+oykjHc3bHIDmlOW72lBQWFZYb7pNq2ksLkCLgBoEV2FQQofeDKABO57mw/nh0KU6 E/KCMlrgqljoc2Di7SQxW2JHTzaR2rNm5jIZEEKR+7frpqcq8Cj1JInGzz5Rxeowqcmn x9txp7tlaXg1KferVu54soqqBIhJwa4T4UQoFwBRk6LqpcaXxZ3kjkbS61vncECdogXD Ta4cQGi5Y9DdrIOV+VNubct9SKoJpTNxRRgOVA8Z6PEl5hxoozbP0JZ34qZP5wh3FFxF h5KLgAOXLoH7J3Iie591ck3M603v3FyTCkFSgkGCEmq92Nyri7V+r52uym02ug/pI93i 6WYQ== X-Gm-Message-State: AOJu0YwMYuhoZdK0kiZvJgdCmZvYvTr/5ohFypsurZK53idpCWgIAIbE /owTgqttishCIXorIaxd2Vwk7YCl50g= X-Google-Smtp-Source: AGHT+IHsVPnVe+4roP7Yt9FpM2GlY/ckjFL8wOaE74xF0BuTZ2cxXcuuil+TkNgRSdEclEA1jWINCg== X-Received: by 2002:a05:622a:1b8b:b0:425:4043:29f4 with SMTP id bp11-20020a05622a1b8b00b00425404329f4mr11896958qtb.111.1702557246606; Thu, 14 Dec 2023 04:34:06 -0800 (PST) Received: from LOCLAP699.rst-02.locus ([208.195.13.130]) by smtp.gmail.com with ESMTPSA id x3-20020ac87303000000b0042551dce749sm5745883qto.46.2023.12.14.04.34.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Dec 2023 04:34:06 -0800 (PST) From: James Prestwood To: iwd@lists.linux.dev Cc: James Prestwood Subject: [PATCH v4 4/4] auto-t: throw exception if executable is missing Date: Thu, 14 Dec 2023 04:34:00 -0800 Message-Id: <20231214123400.12924-4-prestwoj@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231214123400.12924-1-prestwoj@gmail.com> References: <20231214123400.12924-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