From 87971ff0595dc987cb47d4c61a3d07fc7af7a6d4 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Fri, 31 Jul 2020 20:32:35 +0300 Subject: [PATCH] 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 --- src/common/sae_pk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;