Unverified Commit 98c67f66 authored by rnhmjoj's avatar rnhmjoj
Browse files

nixos/wpa_supplicant: test a naughty passphrase

This ensures ASCII punctuation characters are not handled specially.
parent a065b80b
Loading
Loading
Loading
Loading
+7 −5
Original line number Diff line number Diff line
@@ -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