diff --git a/CMakeLists.txt b/CMakeLists.txt index 8606d3c5c..7d4b237a9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -127,7 +127,6 @@ if(${JWT_SSL_LIBRARY} MATCHES "wolfSSL") target_link_libraries(jwt-cpp INTERFACE PkgConfig::wolfssl) # This is required to access OpenSSL compatibility API target_include_directories(jwt-cpp INTERFACE ${wolfssl_INCLUDE_DIRS}) - target_compile_definitions(jwt-cpp INTERFACE JWT_WOLFSSL) endif() if(NOT JWT_DISABLE_PICOJSON AND JWT_EXTERNAL_PICOJSON) diff --git a/include/jwt-cpp/jwt.h b/include/jwt-cpp/jwt.h index 0bf154ec7..7369f3764 100644 --- a/include/jwt-cpp/jwt.h +++ b/include/jwt-cpp/jwt.h @@ -12,10 +12,6 @@ #include "base.h" #endif -#ifdef JWT_WOLFSSL -#include -#include -#endif #include #include #include @@ -24,7 +20,6 @@ #include #include #include -#include #include #include @@ -71,6 +66,8 @@ #if defined(LIBWOLFSSL_VERSION_HEX) #define JWT_OPENSSL_1_1_1 +#include +#include #endif #ifndef JWT_CLAIM_EXPLICIT diff --git a/tests/OpenSSLErrorTest.cpp b/tests/OpenSSLErrorTest.cpp index bcc91e81e..8bdaf11e0 100644 --- a/tests/OpenSSLErrorTest.cpp +++ b/tests/OpenSSLErrorTest.cpp @@ -62,7 +62,7 @@ static uint64_t fail_PEM_write_bio_RSA_PUBKEY = 0; static uint64_t fail_RSA_set0_key = 0; #endif -#ifdef LIBWOLFSSL_VERSION_STRING +#ifdef LIBWOLFSSL_VERSION_HEX #define SYMBOL_NAME(s) ("wolfSSL_" s) #else #define SYMBOL_NAME(s) (s)