瀏覽代碼

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 年之前
父節點
當前提交
97ba54d693
共有 1 個文件被更改,包括 6 次插入0 次删除
  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.