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 <quic_jouni@quicinc.com>
This commit is contained in:
Jouni Malinen 2024-09-11 21:15:37 +03:00 committed by Jouni Malinen
parent 9edd8b441e
commit 7d13410a82
2 changed files with 5 additions and 3 deletions

View 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)

View 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 *