]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Replace "dummy" with "stub" in SAE
authorArowa Suliman <arowa@chromium.org>
Sun, 19 Sep 2021 06:24:29 +0000 (23:24 -0700)
committerJouni Malinen <j@w1.fi>
Mon, 11 Oct 2021 17:51:44 +0000 (20:51 +0300)
Replace the word "dummy" with the inclusive word "stub".

Signed-off-by: Arowa Suliman <arowa@chromium.org>
src/common/sae.c

index 74920a78e46a06157e3a3fa9e6ee99f7e87947e7..b768c22faa9d54b87a24c3acb389eef68e317000 100644 (file)
@@ -286,7 +286,7 @@ static int sae_derive_pwe_ecc(struct sae_data *sae, const u8 *addr1,
        u8 addrs[2 * ETH_ALEN];
        const u8 *addr[2];
        size_t len[2];
-       u8 *dummy_password, *tmp_password;
+       u8 *stub_password, *tmp_password;
        int pwd_seed_odd = 0;
        u8 prime[SAE_MAX_ECC_PRIME_LEN];
        size_t prime_len;
@@ -301,10 +301,10 @@ static int sae_derive_pwe_ecc(struct sae_data *sae, const u8 *addr1,
 
        os_memset(x_bin, 0, sizeof(x_bin));
 
-       dummy_password = os_malloc(password_len);
+       stub_password = os_malloc(password_len);
        tmp_password = os_malloc(password_len);
-       if (!dummy_password || !tmp_password ||
-           random_get_bytes(dummy_password, password_len) < 0)
+       if (!stub_password || !tmp_password ||
+           random_get_bytes(stub_password, password_len) < 0)
                goto fail;
 
        prime_len = sae->tmp->prime_len;
@@ -354,7 +354,7 @@ static int sae_derive_pwe_ecc(struct sae_data *sae, const u8 *addr1,
                }
 
                wpa_printf(MSG_DEBUG, "SAE: counter = %03u", counter);
-               const_time_select_bin(found, dummy_password, password,
+               const_time_select_bin(found, stub_password, password,
                                      password_len, tmp_password);
                if (hmac_sha256_vector(addrs, sizeof(addrs), 2,
                                       addr, len, pwd_seed) < 0)
@@ -415,7 +415,7 @@ static int sae_derive_pwe_ecc(struct sae_data *sae, const u8 *addr1,
 fail:
        crypto_bignum_deinit(qr, 0);
        crypto_bignum_deinit(qnr, 0);
-       os_free(dummy_password);
+       os_free(stub_password);
        bin_clear_free(tmp_password, password_len);
        crypto_bignum_deinit(x, 1);
        os_memset(x_bin, 0, sizeof(x_bin));