From a8c8d5de0f31ebf8d2c5664f53dc6cced50be682 Mon Sep 17 00:00:00 2001 From: Matthias Andree Date: Tue, 1 Nov 2022 10:21:20 +0100 Subject: wolfSSL: add run-time check of wolfSSL_lib_version_hex() to not only check the OpenSSL compatibility version. --- socket.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'socket.c') diff --git a/socket.c b/socket.c index 43df13ce..67fdea57 100644 --- a/socket.c +++ b/socket.c @@ -1113,6 +1113,12 @@ int SSLOpen(int sock, char *mycert, char *mykey, const char *myproto, int certck if (*tmp) wolfSSL_Debugging_ON(); } } + { + int wver = wolfSSL_lib_version_hex(); + if (wver < LIBWOLFSSL_VERSION_HEX) { + report(stderr, GT_("Loaded wolfSSL library %#lx older than headers %#lx, refusing to work.\n"), (long)wver, (long)(LIBWOLFSSL_VERSION_HEX)); + } + } #endif if (ver < OPENSSL_VERSION_NUMBER) { -- cgit v1.2.3