Explorar o código

Automatically select the API version, if NO_SSL_DL is set

If we include OpenSSL headers directly and do not load it dynamically
during runtime based on the configuration, we can detect if OpenSSL 1.1
API or OpenSSL 1.0 (0.9.x) API should be used.

See also https://github.com/civetweb/civetweb/issues/623#issuecomment-394069688
bel2125 %!s(int64=7) %!d(string=hai) anos
pai
achega
97ba54d693
Modificáronse 1 ficheiros con 6 adicións e 0 borrados
  1. 6 0
      src/civetweb.c

+ 6 - 0
src/civetweb.c

@@ -1720,6 +1720,12 @@ typedef struct SSL_CTX SSL_CTX;
 #include "wolfssl_extras.inl"
 #endif
 
+#if (OPENSSL_VERSION_NUMBER >= 0x10100000L)
+/* If OpenSSL headers are included, automatically select the API version */
+#define OPENSSL_API_1_1
+#endif
+
+
 #else
 
 /* SSL loaded dynamically from DLL.