]> git.ipfire.org Git - thirdparty/hostap.git/blobdiff - wpa_supplicant/config_ssid.h
DPP2: Allow AP to require or reject PFS
[thirdparty/hostap.git] / wpa_supplicant / config_ssid.h
index 120218f486bda691a3d96d4fbb92fc83b9fb4291..618145e8b203101dc13d053b5c75a0a7f87115b1 100644 (file)
 #define DEFAULT_DISABLE_HT40 0
 #define DEFAULT_DISABLE_SGI 0
 #define DEFAULT_DISABLE_LDPC 0
+#define DEFAULT_TX_STBC -1 /* no change */
+#define DEFAULT_RX_STBC -1 /* no change */
 #define DEFAULT_DISABLE_MAX_AMSDU -1 /* no change */
 #define DEFAULT_AMPDU_FACTOR -1 /* no change */
 #define DEFAULT_AMPDU_DENSITY -1 /* no change */
 #define DEFAULT_USER_SELECTED_SIM 1
+#define DEFAULT_MAX_OPER_CHWIDTH -1
 
 struct psk_list_entry {
        struct dl_list list;
@@ -45,6 +48,15 @@ struct psk_list_entry {
        u8 p2p;
 };
 
+enum wpas_mode {
+       WPAS_MODE_INFRA = 0,
+       WPAS_MODE_IBSS = 1,
+       WPAS_MODE_AP = 2,
+       WPAS_MODE_P2P_GO = 3,
+       WPAS_MODE_P2P_GROUP_FORMATION = 4,
+       WPAS_MODE_MESH = 5,
+};
+
 /**
  * struct wpa_ssid - Network configuration data
  *
@@ -183,6 +195,26 @@ struct wpa_ssid {
         */
        char *passphrase;
 
+       /**
+        * sae_password - SAE password
+        *
+        * This parameter can be used to set a password for SAE. By default, the
+        * passphrase value is used if this separate parameter is not used, but
+        * passphrase follows the WPA-PSK constraints (8..63 characters) even
+        * though SAE passwords do not have such constraints.
+        */
+       char *sae_password;
+
+       /**
+        * sae_password_id - SAE password identifier
+        *
+        * This parameter can be used to identify a specific SAE password. If
+        * not included, the default SAE password is used instead.
+        */
+       char *sae_password_id;
+
+       struct sae_pt *pt;
+
        /**
         * ext_psk - PSK/passphrase name in external storage
         *
@@ -268,6 +300,7 @@ struct wpa_ssid {
        struct eap_peer_config eap;
 #endif /* IEEE8021X_EAPOL */
 
+#ifdef CONFIG_WEP
 #define NUM_WEP_KEYS 4
 #define MAX_WEP_KEY_LEN 16
        /**
@@ -284,6 +317,7 @@ struct wpa_ssid {
         * wep_tx_keyidx - Default key index for TX frames using WEP
         */
        int wep_tx_keyidx;
+#endif /* CONFIG_WEP */
 
        /**
         * proactive_key_caching - Enable proactive key caching
@@ -373,14 +407,7 @@ struct wpa_ssid {
         * CCMP, but not both), and psk must also be set (either directly or
         * using ASCII passphrase).
         */
-       enum wpas_mode {
-               WPAS_MODE_INFRA = 0,
-               WPAS_MODE_IBSS = 1,
-               WPAS_MODE_AP = 2,
-               WPAS_MODE_P2P_GO = 3,
-               WPAS_MODE_P2P_GROUP_FORMATION = 4,
-               WPAS_MODE_MESH = 5,
-       } mode;
+       enum wpas_mode mode;
 
        /**
         * pbss - Whether to use PBSS. Relevant to DMG networks only.
@@ -414,17 +441,6 @@ struct wpa_ssid {
         */
        int disabled_for_connect;
 
-       /**
-        * peerkey -  Whether PeerKey handshake for direct links is allowed
-        *
-        * This is only used when both RSN/WPA2 and IEEE 802.11e (QoS) are
-        * enabled.
-        *
-        * 0 = disabled (default)
-        * 1 = enabled
-        */
-       int peerkey;
-
        /**
         * id_str - Network identifier string for external scripts
         *
@@ -434,7 +450,6 @@ struct wpa_ssid {
         */
        char *id_str;
 
-#ifdef CONFIG_IEEE80211W
        /**
         * ieee80211w - Whether management frame protection is enabled
         *
@@ -448,7 +463,17 @@ struct wpa_ssid {
         * followed).
         */
        enum mfp_options ieee80211w;
-#endif /* CONFIG_IEEE80211W */
+
+#ifdef CONFIG_OCV
+       /**
+        * ocv - Enable/disable operating channel validation
+        *
+        * If this parameter is set to 1, stations will exchange OCI element
+        * to cryptographically verify the operating channel. Setting this
+        * parameter to 0 disables this option. Default value: 0.
+        */
+       int ocv;
+#endif /* CONFIG_OCV */
 
        /**
         * frequency - Channel frequency in megahertz (MHz) for IBSS
@@ -462,6 +487,23 @@ struct wpa_ssid {
         */
        int frequency;
 
+       /**
+        * enable_edmg - Enable EDMG feature in STA/AP mode
+        *
+        * This flag is used for enabling the EDMG capability in STA/AP mode.
+        */
+       int enable_edmg;
+
+       /**
+        * edmg_channel - EDMG channel number
+        *
+        * This value is used to configure the EDMG channel bonding feature.
+        * In AP mode it defines the EDMG channel to start the AP on.
+        * in STA mode it defines the EDMG channel to use for connection
+        * (if supported by AP).
+        */
+       u8 edmg_channel;
+
        /**
         * fixed_freq - Use fixed frequency for IBSS
         */
@@ -498,7 +540,9 @@ struct wpa_ssid {
 
        int vht;
 
-       u8 max_oper_chwidth;
+       int he;
+
+       int max_oper_chwidth;
 
        unsigned int vht_center_freq1;
        unsigned int vht_center_freq2;
@@ -511,6 +555,19 @@ struct wpa_ssid {
         */
        int wpa_ptk_rekey;
 
+       /** wpa_deny_ptk0_rekey - Control PTK0 rekeying
+        *
+        * Rekeying a pairwise key using only keyid 0 (PTK0 rekey) has many
+        * broken implementations and should be avoided when using or
+        * interacting with one.
+        *
+        * 0 = always rekey when configured/instructed
+        * 1 = only rekey when the local driver is explicitly indicating it can
+        *      perform this operation without issues
+        * 2 = never allow PTK0 rekeys
+        */
+       enum ptk0_rekey_handling wpa_deny_ptk0_rekey;
+
        /**
         * group_rekey - Group rekeying time in seconds
         *
@@ -675,6 +732,22 @@ struct wpa_ssid {
         * By default (empty string): Use whatever the OS has configured.
         */
        char *ht_mcs;
+
+       /**
+        * tx_stbc - Indicate STBC support for TX streams
+        *
+        * Value: -1..1, by default (-1): use whatever the OS or card has
+        * configured. See IEEE Std 802.11-2016, 9.4.2.56.2.
+        */
+       int tx_stbc;
+
+       /**
+        * rx_stbc - Indicate STBC support for RX streams
+        *
+        * Value: -1..3, by default (-1): use whatever the OS or card has
+        * configured. See IEEE Std 802.11-2016, 9.4.2.56.2.
+        */
+       int rx_stbc;
 #endif /* CONFIG_HT_OVERRIDES */
 
 #ifdef CONFIG_VHT_OVERRIDES
@@ -766,6 +839,33 @@ struct wpa_ssid {
         */
        int macsec_integ_only;
 
+       /**
+        * macsec_replay_protect - Enable MACsec replay protection
+        *
+        * This setting applies only when MACsec is in use, i.e.,
+        *  - macsec_policy is enabled
+        *  - the key server has decided to enable MACsec
+        *
+        * 0: Replay protection disabled (default)
+        * 1: Replay protection enabled
+        */
+       int macsec_replay_protect;
+
+       /**
+        * macsec_replay_window - MACsec replay protection window
+        *
+        * A window in which replay is tolerated, to allow receipt of frames
+        * that have been misordered by the network.
+        *
+        * This setting applies only when MACsec replay protection active, i.e.,
+        *  - macsec_replay_protect is enabled
+        *  - the key server has decided to enable MACsec
+        *
+        * 0: No replay window, strict check (default)
+        * 1..2^32-1: number of packets that could be misordered
+        */
+       u32 macsec_replay_window;
+
        /**
         * macsec_port - MACsec port (in SCI)
         *
@@ -785,14 +885,16 @@ struct wpa_ssid {
        /**
         * mka_ckn - MKA pre-shared CKN
         */
-#define MACSEC_CKN_LEN 32
-       u8 mka_ckn[MACSEC_CKN_LEN];
+#define MACSEC_CKN_MAX_LEN 32
+       size_t mka_ckn_len;
+       u8 mka_ckn[MACSEC_CKN_MAX_LEN];
 
        /**
         * mka_cak - MKA pre-shared CAK
         */
-#define MACSEC_CAK_LEN 16
-       u8 mka_cak[MACSEC_CAK_LEN];
+#define MACSEC_CAK_MAX_LEN 32
+       size_t mka_cak_len;
+       u8 mka_cak[MACSEC_CAK_MAX_LEN];
 
 #define MKA_PSK_SET_CKN BIT(0)
 #define MKA_PSK_SET_CAK BIT(1)
@@ -805,6 +907,19 @@ struct wpa_ssid {
 
 #ifdef CONFIG_HS20
        int update_identifier;
+
+       /**
+        * roaming_consortium_selection - Roaming Consortium Selection
+        *
+        * The matching Roaming Consortium OI that was used to generate this
+        * network profile.
+        */
+       u8 *roaming_consortium_selection;
+
+       /**
+        * roaming_consortium_selection_len - roaming_consortium_selection len
+        */
+       size_t roaming_consortium_selection_len;
 #endif /* CONFIG_HS20 */
 
        unsigned int wps_run;
@@ -887,23 +1002,94 @@ struct wpa_ssid {
         */
        size_t dpp_csign_len;
 
-       /**
-        * dpp_csign_expiry - C-sign-key expiry in UNIX time stamp
-        *
-        * 0 indicates no expiration.
-        */
-       unsigned int dpp_csign_expiry;
-
        /**
         * owe_group - OWE DH Group
         *
-        * 0 = use default (19)
+        * 0 = use default (19) first and then try all supported groups one by
+        *      one if AP rejects the selected group
         * 1-65535 DH Group to use for OWE
         *
         * Groups 19 (NIST P-256), 20 (NIST P-384), and 21 (NIST P-521) are
         * currently supported.
         */
        int owe_group;
+
+       /**
+        * owe_only - OWE-only mode (disable transition mode)
+        *
+        * 0 = enable transition mode (allow connection to either OWE or open
+        *      BSS)
+        * 1 = disable transition mode (allow connection only with OWE)
+        */
+       int owe_only;
+
+       /**
+        * owe_ptk_workaround - OWE PTK derivation workaround
+        *
+        * Initial OWE implementation used SHA256 when deriving the PTK for all
+        * OWE groups. This was supposed to change to SHA384 for group 20 and
+        * SHA512 for group 21. This parameter can be used to enable older
+        * behavior mainly for testing purposes. There is no impact to group 19
+        * behavior, but if enabled, this will make group 20 and 21 cases use
+        * SHA256-based PTK derivation which will not work with the updated
+        * OWE implementation on the AP side.
+        */
+       int owe_ptk_workaround;
+
+       /**
+        * owe_transition_bss_select_count - OWE transition BSS select count
+        *
+        * This is an internally used variable (i.e., not used in external
+        * configuration) to track the number of selection attempts done for
+        * OWE BSS in transition mode. This allows fallback to an open BSS if
+        * the selection attempts for OWE BSS exceed the configured threshold.
+        */
+       int owe_transition_bss_select_count;
+
+       /**
+        * multi_ap_backhaul_sta - Multi-AP backhaul STA
+        * 0 = normal (non-Multi-AP) station
+        * 1 = Multi-AP backhaul station
+        */
+       int multi_ap_backhaul_sta;
+
+       /**
+        * ft_eap_pmksa_caching - Whether FT-EAP PMKSA caching is allowed
+        * 0 = do not try to use PMKSA caching with FT-EAP
+        * 1 = try to use PMKSA caching with FT-EAP
+        *
+        * This controls whether to try to use PMKSA caching with FT-EAP for the
+        * FT initial mobility domain association.
+        */
+       int ft_eap_pmksa_caching;
+
+       /**
+        * beacon_prot - Whether Beacon protection is enabled
+        *
+        * This depends on management frame protection (ieee80211w) being
+        * enabled.
+        */
+       int beacon_prot;
+
+       /**
+        * transition_disable - Transition Disable indication
+        * The AP can notify authenticated stations to disable transition mode
+        * in their network profiles when the network has completed transition
+        * steps, i.e., once sufficiently large number of APs in the ESS have
+        * been updated to support the more secure alternative. When this
+        * indication is used, the stations are expected to automatically
+        * disable transition mode and less secure security options. This
+        * includes use of WEP, TKIP (including use of TKIP as the group
+        * cipher), and connections without PMF.
+        * Bitmap bits:
+        * bit 0 (0x01): WPA3-Personal (i.e., disable WPA2-Personal = WPA-PSK
+        *      and only allow SAE to be used)
+        * bit 1 (0x02): SAE-PK (disable SAE without use of SAE-PK)
+        * bit 2 (0x04): WPA3-Enterprise (move to requiring PMF)
+        * bit 3 (0x08): Enhanced Open (disable use of open network; require
+        *      OWE)
+        */
+       u8 transition_disable;
 };
 
 #endif /* CONFIG_SSID_H */