From be2779818bd80c67317e9ed00a6b64241cf16222 Mon Sep 17 00:00:00 2001 From: Jack Date: Fri, 22 Apr 2022 19:30:45 +0800 Subject: [PATCH] fix build error --- components/wpa_supplicant/include/utils/wpa_debug.h | 2 +- components/wpa_supplicant/src/common/dpp.c | 4 ---- components/wpa_supplicant/src/crypto/tls_mbedtls.c | 4 ++-- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/components/wpa_supplicant/include/utils/wpa_debug.h b/components/wpa_supplicant/include/utils/wpa_debug.h index e32c697fe9..571d06160b 100644 --- a/components/wpa_supplicant/include/utils/wpa_debug.h +++ b/components/wpa_supplicant/include/utils/wpa_debug.h @@ -172,7 +172,7 @@ void wpa_hexdump_ascii_key(int level, const char *title, const u8 *buf, * * Note: New line '\n' is added to the end of the text when printing to stdout. */ -void wpa_msg(void *ctx, int level, const char *fmt, ...) PRINTF_FORMAT(3, 4); +#define wpa_msg(...) do {} while(0) /** * wpa_msg_ctrl - Conditional printf for ctrl_iface monitors diff --git a/components/wpa_supplicant/src/common/dpp.c b/components/wpa_supplicant/src/common/dpp.c index f71a22f8f0..452432d81e 100644 --- a/components/wpa_supplicant/src/common/dpp.c +++ b/components/wpa_supplicant/src/common/dpp.c @@ -52,10 +52,6 @@ static const struct dpp_curve_params dpp_curves[] = { { NULL, 0, 0, 0, 0, NULL, 0, NULL } }; -void wpa_msg(void *ctx, int level, const char *fmt, ...) -{ -} - static struct wpabuf * gas_build_req(u8 action, u8 dialog_token, size_t size) { diff --git a/components/wpa_supplicant/src/crypto/tls_mbedtls.c b/components/wpa_supplicant/src/crypto/tls_mbedtls.c index fc770a00c7..c971b1ba3f 100644 --- a/components/wpa_supplicant/src/crypto/tls_mbedtls.c +++ b/components/wpa_supplicant/src/crypto/tls_mbedtls.c @@ -825,10 +825,10 @@ static int tls_connection_prf(void *tls_ctx, struct tls_connection *conn, wpa_hexdump_key(MSG_MSGDUMP, "random", seed, 2 * TLS_RANDOM_LEN); wpa_hexdump_key(MSG_MSGDUMP, "master", ssl->session->master, TLS_MASTER_SECRET_LEN); - if (transform->ciphersuite_info->mac == MBEDTLS_MD_SHA384) { + if (ssl->transform->ciphersuite_info->mac == MBEDTLS_MD_SHA384) { ret = tls_prf_sha384(ssl->session->master, TLS_MASTER_SECRET_LEN, label, seed, 2 * TLS_RANDOM_LEN, out, out_len); - } else if (transform->ciphersuite_info->mac == MBEDTLS_MD_SHA256) { + } else if (ssl->transform->ciphersuite_info->mac == MBEDTLS_MD_SHA256) { ret = tls_prf_sha256(ssl->session->master, TLS_MASTER_SECRET_LEN, label, seed, 2 * TLS_RANDOM_LEN, out, out_len); } else {