Browse Source

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 7 năm trước cách đây
mục cha
commit
97ba54d693
1 tập tin đã thay đổi với 6 bổ sung0 xóa
  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.