]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
SAE-PK: Fix SAE confirm writing in some AP cases with transition mode
authorJouni Malinen <jouni@codeaurora.org>
Fri, 31 Jul 2020 17:32:35 +0000 (20:32 +0300)
committerJouni Malinen <j@w1.fi>
Fri, 31 Jul 2020 17:32:35 +0000 (20:32 +0300)
sae_check_confirm_pk() and sae_write_confirm_pk() were using different
checks for determining whether SAE-PK was used. It was apparently
possible to miss the checks in sae_write_confirm_pk() in some AP cases
where SAE H2E is being used. Fix this by checking sae->pk in the
write-confirm case similarly to the way this was done in check-confirm.

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

index cd0ccb729ae16fbf2434b918fc340d6ea0e3bf06..e839bde4e4d7f000b95ab6490ae06696265abf71 100644 (file)
@@ -389,7 +389,7 @@ int sae_write_confirm_pk(struct sae_data *sae, struct wpabuf *buf)
                return -1;
 
        pk = tmp->ap_pk;
-       if (!pk)
+       if (!sae->pk || !pk)
                return 0;
 
        key = pk->key;