arun11299 / cpp-jwt

JSON Web Token library for C++
MIT License
387 stars 112 forks source link

OpenSSL 1.1.1 without libressl causes issue #77

Closed williamswhy closed 3 years ago

williamswhy commented 3 years ago

I think there is an issue in this line of code

#if OPENSSL_VERSION_NUMBER < 0x10100000L || LIBRESSL_VERSION_NUMBER < 0x20700000L

I don't have libressl installed so LIBRESSL_VERSION_NUMBER for me is undefined. In this case, the second half of the if statement is always true. I am using openssl-1.1.1f. The code will not compile due to this.

Currently, I manually define the libressl version in cmake as a workaround

add_definitions(-DLIBRESSL_VERSION_NUMBER=0x20700000L)
arun11299 commented 3 years ago

Hello @williamswhy Can we close this if your patch addresses this issue ?

williamswhy commented 3 years ago

I actually think #75 is the correct patch. The patch got merged will produce the same problem if someone is using libressl but not openssl. BTW the patches credit to @saurik and @j0nnyw. I didn't make any of these.

williamswhy commented 3 years ago

Issue resolved! Thank you!