summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2022-08-23 02:26:28 +0200
committerSlávek Banko <slavek.banko@axis.cz>2022-08-23 13:13:23 +0200
commitcb87252f7d1ceaef052074bc1b8290cf21df5818 (patch)
treec58f465a6b6aaf6d9388b1f9578a45b4d7b3ddd3
parent63758dcca1921e0b6aadcf15788f6851fcb0e1ec (diff)
downloadtdelibs-cb87252f7d1ceaef052074bc1b8290cf21df5818.tar.gz
tdelibs-cb87252f7d1ceaef052074bc1b8290cf21df5818.zip
KSSL: Add names for OpenSSL 3.x libraries to SSL libraries search.
Use OPENSSL_SHLIB_VERSION for default libraries version. This relates to issue #176. Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
-rw-r--r--tdeio/kssl/kopenssl.cpp56
1 files changed, 33 insertions, 23 deletions
diff --git a/tdeio/kssl/kopenssl.cpp b/tdeio/kssl/kopenssl.cpp
index 312c85c17..abcd7e0f0 100644
--- a/tdeio/kssl/kopenssl.cpp
+++ b/tdeio/kssl/kopenssl.cpp
@@ -33,6 +33,8 @@
#include <unistd.h>
#include "kopenssl.h"
+#define STRINGIFY(x) #x
+
#define GET_CRYPTOLIB_SYMBOL(a) ((_cryptoLib->hasSymbol(a)) ? _cryptoLib->symbol(a) : NULL)
#define GET_SSLLIB_SYMBOL(a) ((_sslLib->hasSymbol(a)) ? _sslLib->symbol(a) : NULL)
@@ -345,8 +347,8 @@ TDEConfig *cfg;
<< "";
#else
libpaths
- #ifdef _AIX
- << "/opt/freeware/lib/"
+ #ifdef _AIX
+ << "/opt/freeware/lib/"
#endif
<< "/usr/" SYSTEM_LIBDIR "/"
<< "/usr/ssl/" SYSTEM_LIBDIR "/"
@@ -355,41 +357,49 @@ TDEConfig *cfg;
<< "/usr/local/ssl/" SYSTEM_LIBDIR "/"
<< "/opt/openssl/" SYSTEM_LIBDIR "/"
<< "/" SYSTEM_LIBDIR "/"
- << "";
+ << "";
// FIXME: #define here for the various OS types to optimize
libnamess
#ifdef hpux
- << "libssl.sl"
- #elif defined(_AIX)
- << "libssl.a(libssl.so.0)"
+ << "libssl.sl"
+ #elif defined(_AIX)
+ << "libssl.a(libssl.so.0)"
#elif defined(__APPLE__)
<< "libssl.dylib"
<< "libssl.0.9.dylib"
- #else
- #ifdef SHLIB_VERSION_NUMBER
- << "libssl.so." SHLIB_VERSION_NUMBER
- #endif
- << "libssl.so"
- << "libssl.so.0"
- #endif
+ #else
+ #ifdef OPENSSL_SHLIB_VERSION
+ << "libssl.so." STRINGIFY(OPENSSL_SHLIB_VERSION)
+ #endif
+ #ifdef SHLIB_VERSION_NUMBER
+ << "libssl.so." SHLIB_VERSION_NUMBER
+ #endif
+ << "libssl.so"
+ << "libssl.so.3"
+ << "libssl.so.0"
+ #endif
;
libnamesc
- #ifdef hpux
- << "libcrypto.sl"
- #elif defined(_AIX)
- << "libcrypto.a(libcrypto.so.0)"
+ #ifdef hpux
+ << "libcrypto.sl"
+ #elif defined(_AIX)
+ << "libcrypto.a(libcrypto.so.0)"
#elif defined(__APPLE__)
<< "libcrypto.dylib"
<< "libcrypto.0.9.dylib"
#else
- #ifdef SHLIB_VERSION_NUMBER
- << "libcrypto.so." SHLIB_VERSION_NUMBER
- #endif
- << "libcrypto.so"
- << "libcrypto.so.0"
- #endif
+ #ifdef OPENSSL_SHLIB_VERSION
+ << "libcrypto.so." STRINGIFY(OPENSSL_SHLIB_VERSION)
+ #endif
+ #ifdef SHLIB_VERSION_NUMBER
+ << "libcrypto.so." SHLIB_VERSION_NUMBER
+ #endif
+ << "libcrypto.so"
+ << "libcrypto.so.3"
+ << "libcrypto.so.0"
+ #endif
;
#endif