DPP: Add crypto_ec_key_cmp() in crypto.h and use it

This gets rid of one more direct OpenSSL call in the DPP implementation.

Signed-off-by: Cedric Izoard <cedric.izoard@ceva-dsp.com>
This commit is contained in:
Cedric Izoard 2021-06-28 18:25:34 +02:00 committed by Jouni Malinen
parent 984faf9634
commit c88b7fcaef
3 changed files with 17 additions and 2 deletions

View file

@ -2370,8 +2370,7 @@ skip_groups:
goto fail;
dpp_debug_print_key("DPP: Received netAccessKey", key);
if (EVP_PKEY_cmp((EVP_PKEY *) key,
(EVP_PKEY *) auth->own_protocol_key) != 1) {
if (crypto_ec_key_cmp(key, auth->own_protocol_key)) {
wpa_printf(MSG_DEBUG,
"DPP: netAccessKey in connector does not match own protocol key");
#ifdef CONFIG_TESTING_OPTIONS