if (K == NULL)
goto fail;
- if (!crypto_ec_point_is_on_curve(sae->tmp->ec,
- sae->tmp->peer_commit_element_ecc)) {
- wpa_printf(MSG_DEBUG, "SAE: Peer element is not on curve");
- goto fail;
- }
-
/*
* K = scalar-op(rand, (elem-op(scalar-op(peer-commit-scalar, PWE),
* PEER-COMMIT-ELEMENT)))
if (sae->tmp->peer_commit_element_ecc == NULL)
return WLAN_STATUS_UNSPECIFIED_FAILURE;
+ if (!crypto_ec_point_is_on_curve(sae->tmp->ec,
+ sae->tmp->peer_commit_element_ecc)) {
+ wpa_printf(MSG_DEBUG, "SAE: Peer element is not on curve");
+ return WLAN_STATUS_UNSPECIFIED_FAILURE;
+ }
+
return WLAN_STATUS_SUCCESS;
}