From: Jouni Malinen Date: Wed, 11 Sep 2024 18:15:37 +0000 (+0300) Subject: SAE: Mark the groups argument to sae_derive_pt() const X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7d13410a8241d0bea1cd9dc1e47fd194db9d3b37;p=thirdparty%2Fhostap.git SAE: Mark the groups argument to sae_derive_pt() const This makes it clearer that the list of groups is not going to be modified. Signed-off-by: Jouni Malinen --- diff --git a/src/common/sae.c b/src/common/sae.c index a65da6134..358485588 100644 --- a/src/common/sae.c +++ b/src/common/sae.c @@ -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) diff --git a/src/common/sae.h b/src/common/sae.h index a353aa8da..c3ca4d41b 100644 --- a/src/common/sae.h +++ b/src/common/sae.h @@ -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 *