summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2020-05-15 03:11:52 +0200
committerSlávek Banko <slavek.banko@axis.cz>2020-05-15 03:11:52 +0200
commit8906dfbea322cdb18e5cfe265dc92b40ec47770f (patch)
tree7167049e7009d5d960797a8fb09f640bc57d9cd7
parenta2c0e6c98197215ac788982fbf5b236888eef79e (diff)
downloadtqca-tls-8906dfbea322cdb18e5cfe265dc92b40ec47770f.tar.gz
tqca-tls-8906dfbea322cdb18e5cfe265dc92b40ec47770f.zip
Move the OpenSSL 0.97 test inside the source code
instead of using the hard-coded definition. Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
-rw-r--r--CMakeLists.txt2
-rw-r--r--tqca-tls.cpp4
2 files changed, 5 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f41a4b5..07a490b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -52,7 +52,7 @@ include( ConfigureChecks.cmake )
###### global compiler settings
-add_definitions( -DHAVE_CONFIG_H -DOSSL_097 -DTQCA_PLUGIN )
+add_definitions( -DHAVE_CONFIG_H -DTQCA_PLUGIN )
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TQT_CXX_FLAGS}" )
set( CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined" )
diff --git a/tqca-tls.cpp b/tqca-tls.cpp
index df9eff1..e17f649 100644
--- a/tqca-tls.cpp
+++ b/tqca-tls.cpp
@@ -34,6 +34,10 @@
#include <openssl/err.h>
#include <openssl/rand.h>
+#if OPENSSL_VERSION_NUMBER >= 0x00907000
+#define OSSL_097
+#endif
+
#ifndef OSSL_097
#define NO_AES
#endif