mirror of
https://github.com/kakwa/uts-server
synced 2025-01-09 13:14:31 +01:00
add special matching for LibreSSL
Thank you LibreSSL for setting OPENSSL_VERSION_NUMBER to 0x20000000L... It breaks traditional OpenSSL API matching by OPENSSL_VERSION_NUMBER...
This commit is contained in:
parent
dca9231b9f
commit
65357fe736
@ -16,6 +16,20 @@
|
||||
#if OPENSSL_VERSION_NUMBER < 0x10000000L
|
||||
#error OpenSSL version too old
|
||||
#endif
|
||||
|
||||
/* LibreSSL is really annoying
|
||||
* the OPENSSL_VERSION_NUMBER #define in opensslv.h
|
||||
* is 0x20000000L but the API is that of openssl 1.0.
|
||||
* That breaks version matching to determine which API
|
||||
* to use.
|
||||
* So, special case here for LibreSSL...
|
||||
* (why didn't you just keep 0x100000L LibreSSL?)
|
||||
*/
|
||||
#ifdef LIBRESSL_VERSION_NUMBER
|
||||
// for now, LibreSSL is 1.0 API only
|
||||
#define OPENSSL_API_1_0
|
||||
#else
|
||||
// for OpenSSL, we must differenciate between 1.0 and 1.1
|
||||
#if OPENSSL_VERSION_NUMBER < 0x10100000L && \
|
||||
OPENSSL_VERSION_NUMBER >= 0x10000000L
|
||||
#define OPENSSL_API_1_0
|
||||
@ -23,6 +37,7 @@
|
||||
#if OPENSSL_VERSION_NUMBER >= 0x10100000L
|
||||
#define OPENSSL_API_1_1
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Name of config entry that defines the OID file. */
|
||||
#define OID_SECTION "oids"
|
||||
|
Loading…
x
Reference in New Issue
Block a user