From 10fd91d8fbca4b7817f8400090153d0c18cbe074 Mon Sep 17 00:00:00 2001 From: Juliusz Sosinowicz Date: Wed, 8 Mar 2023 18:18:46 +0100 Subject: [PATCH] wolfSSL: Better error message in pbkdf2_sha1() for FIPS password failure Signed-off-by: Juliusz Sosinowicz --- src/crypto/crypto_wolfssl.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/crypto/crypto_wolfssl.c b/src/crypto/crypto_wolfssl.c index 45d381063..e84e02a42 100644 --- a/src/crypto/crypto_wolfssl.c +++ b/src/crypto/crypto_wolfssl.c @@ -420,9 +420,8 @@ int pbkdf2_sha1(const char *passphrase, const u8 *ssid, size_t ssid_len, ssid, ssid_len, iterations, buflen, WC_SHA); if (ret != 0) { if (ret == HMAC_MIN_KEYLEN_E) { - wpa_printf(MSG_ERROR, - "wolfSSL: Password is too short. Make sure your password is at least %d characters long. This is a requirement for FIPS builds.", - HMAC_FIPS_MIN_KEY); + LOG_WOLF_ERROR_VA("wolfSSL: Password is too short. Make sure your password is at least %d characters long. This is a requirement for FIPS builds.", + HMAC_FIPS_MIN_KEY); } return -1; }