From 98c67f661daa23112cef0bedffebf9f285f24dbe Mon Sep 17 00:00:00 2001 From: rnhmjoj Date: Wed, 18 Sep 2024 14:32:23 +0200 Subject: [PATCH] nixos/wpa_supplicant: test a naughty passphrase This ensures ASCII punctuation characters are not handled specially. --- nixos/tests/wpa_supplicant.nix | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/nixos/tests/wpa_supplicant.nix b/nixos/tests/wpa_supplicant.nix index 71b9ba358fa1..bdbab88c8b55 100644 --- a/nixos/tests/wpa_supplicant.nix +++ b/nixos/tests/wpa_supplicant.nix @@ -8,6 +8,8 @@ let maintainers = [ oddlama rnhmjoj ]; }; + naughtyPassphrase = ''!,./;'[]\-=<>?:"{}|_+@$%^&*()`~ # ceci n'est pas un commentaire''; + runConnectionTest = name: extraConfig: runTest { name = "wpa_supplicant-${name}"; inherit meta; @@ -27,7 +29,7 @@ let ssid = "nixos-test-sae"; authentication = { mode = "wpa3-sae"; - saePasswords = [ { password = "reproducibility"; } ]; + saePasswords = [ { password = naughtyPassphrase; } ]; }; bssid = "02:00:00:00:00:00"; }; @@ -36,8 +38,8 @@ let authentication = { mode = "wpa3-sae-transition"; saeAddToMacAllow = true; - saePasswordsFile = pkgs.writeText "password" "reproducibility"; - wpaPasswordFile = pkgs.writeText "password" "reproducibility"; + saePasswordsFile = pkgs.writeText "password" naughtyPassphrase; + wpaPasswordFile = pkgs.writeText "password" naughtyPassphrase; }; bssid = "02:00:00:00:00:01"; }; @@ -45,7 +47,7 @@ let ssid = "nixos-test-wpa2"; authentication = { mode = "wpa2-sha256"; - wpaPassword = "reproducibility"; + wpaPassword = naughtyPassphrase; }; bssid = "02:00:00:00:00:02"; }; @@ -65,7 +67,7 @@ let # secrets secretsFile = pkgs.writeText "wpa-secrets" '' - psk_nixos_test=reproducibility + psk_nixos_test=${naughtyPassphrase} ''; } extraConfig