]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
SAE: Debug print group support in the crypto library
authorJouni Malinen <jouni@codeaurora.org>
Fri, 2 Mar 2018 10:29:30 +0000 (12:29 +0200)
committerJouni Malinen <j@w1.fi>
Fri, 2 Mar 2018 19:27:30 +0000 (21:27 +0200)
This makes it easier to understand why "SAE: Failed to select group"
debug entry shows up in cases the selected crypto library does not
support a specific group.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
src/common/sae.c

index 3b3249092836b0a1cfbe7411b2ae51d6f7336512..fa28dfb1d9cf6659250960c6a1966d41bd8a4559 100644 (file)
@@ -29,6 +29,8 @@ int sae_set_group(struct sae_data *sae, int group)
        /* First, check if this is an ECC group */
        tmp->ec = crypto_ec_init(group);
        if (tmp->ec) {
+               wpa_printf(MSG_DEBUG, "SAE: Selecting supported ECC group %d",
+                          group);
                sae->group = group;
                tmp->prime_len = crypto_ec_prime_len(tmp->ec);
                tmp->prime = crypto_ec_get_prime(tmp->ec);
@@ -39,6 +41,8 @@ int sae_set_group(struct sae_data *sae, int group)
        /* Not an ECC group, check FFC */
        tmp->dh = dh_groups_get(group);
        if (tmp->dh) {
+               wpa_printf(MSG_DEBUG, "SAE: Selecting supported FFC group %d",
+                          group);
                sae->group = group;
                tmp->prime_len = tmp->dh->prime_len;
                if (tmp->prime_len > SAE_MAX_PRIME_LEN) {
@@ -66,6 +70,8 @@ int sae_set_group(struct sae_data *sae, int group)
        }
 
        /* Unsupported group */
+       wpa_printf(MSG_DEBUG,
+                  "SAE: Group %d not supported by the crypto library", group);
        return -1;
 }