]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
SAE: Mark the groups argument to sae_derive_pt() const
authorJouni Malinen <quic_jouni@quicinc.com>
Wed, 11 Sep 2024 18:15:37 +0000 (21:15 +0300)
committerJouni Malinen <j@w1.fi>
Wed, 11 Sep 2024 23:58:32 +0000 (02:58 +0300)
This makes it clearer that the list of groups is not going to be
modified.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
src/common/sae.c
src/common/sae.h

index a65da613404ad310c73b585b184968c93cd88122..358485588ad32e2cfdd453ee6f8ca5c4e03792a9 100644 (file)
@@ -1093,12 +1093,13 @@ fail:
 }
 
 
-struct sae_pt * sae_derive_pt(int *groups, const u8 *ssid, size_t ssid_len,
+struct sae_pt * sae_derive_pt(const int *groups,
+                             const u8 *ssid, size_t ssid_len,
                              const u8 *password, size_t password_len,
                              const char *identifier)
 {
        struct sae_pt *pt = NULL, *last = NULL, *tmp;
-       int default_groups[] = { 19, 0 };
+       const int default_groups[] = { 19, 0 };
        int i;
 
        if (!groups)
index a353aa8da357b6214506e64a4938e295020df005..c3ca4d41ba522811b20e003f34d9c46b5762e6bf 100644 (file)
@@ -146,7 +146,8 @@ u16 sae_group_allowed(struct sae_data *sae, int *allowed_groups, u16 group);
 const char * sae_state_txt(enum sae_state state);
 size_t sae_ecc_prime_len_2_hash_len(size_t prime_len);
 size_t sae_ffc_prime_len_2_hash_len(size_t prime_len);
-struct sae_pt * sae_derive_pt(int *groups, const u8 *ssid, size_t ssid_len,
+struct sae_pt * sae_derive_pt(const int *groups,
+                             const u8 *ssid, size_t ssid_len,
                              const u8 *password, size_t password_len,
                              const char *identifier);
 struct crypto_ec_point *