From: Jouni Malinen Date: Fri, 31 Jul 2020 17:32:35 +0000 (+0300) Subject: SAE-PK: Fix SAE confirm writing in some AP cases with transition mode X-Git-Tag: hostap_2_10~1050 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=87971ff0595dc987cb47d4c61a3d07fc7af7a6d4;p=thirdparty%2Fhostap.git 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 --- diff --git a/src/common/sae_pk.c b/src/common/sae_pk.c index cd0ccb729..e839bde4e 100644 --- a/src/common/sae_pk.c +++ b/src/common/sae_pk.c @@ -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;