Add HAVE_WOLFSSL_MSG_EX define when WOLFSSL_MSG_EX is available

This commit is contained in:
Juliusz Sosinowicz
2022-08-12 16:09:17 +02:00
parent 90c65bd50b
commit 126a570a37
2 changed files with 5 additions and 0 deletions

View File

@ -181,7 +181,11 @@ static int GetX509Error(int e)
case ASN_SIG_KEY_E:
return X509_V_ERR_CERT_SIGNATURE_FAILURE;
default:
#ifdef HAVE_WOLFSSL_MSG_EX
WOLFSSL_MSG_EX("Error not configured or implemented yet: %d", e);
#else
WOLFSSL_MSG("Error not configured or implemented yet");
#endif
return e;
}
}

View File

@ -164,6 +164,7 @@ WOLFSSL_API void wolfSSL_Debugging_OFF(void);
WOLFSSL_API int WOLFSSL_IS_DEBUG_ON(void);
#if !defined(_WIN32) && defined(XVSNPRINTF)
WOLFSSL_API void WOLFSSL_MSG_EX(const char* fmt, ...);
#define HAVE_WOLFSSL_MSG_EX
#else
#define WOLFSSL_MSG_EX(m, ...)
#endif