SAE-PK: Fix SAE confirm writing in some AP cases with transition mode

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>
This commit is contained in:
Jouni Malinen 2020-07-31 20:32:35 +03:00 committed by Jouni Malinen
parent 240e9af4d1
commit 87971ff059
1 changed files with 1 additions and 1 deletions

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